Lesson enginePer-learner, per-lesson, per-day

Every lesson is generated for the individual learner.

The lesson engine is not a recommendation layer over static content. It is a generation pipeline that produces a new lesson, per learner, for every lesson position in the curriculum. Five sequential generations build the six pedagogical steps; each generation receives the learner’s age, country, native language, learning-support needs, LCP profile, and yesterday’s practice mastery. The output is a structured assembly of fourteen interactive block types — not flat HTML.

Six pedagogical steps

Five generation calls. Six learning steps. One lesson.

  1. 01

    Introduction

    Grounds the learner. Why this concept now. What the learner is about to be asked to hold in mind. Surface tone tuned to age and language.

  2. 02

    Key concepts

    The concepts the lesson commits to teaching, structured as named entities. Visual-strong learners see comparison tables and hierarchy trees here; verbal-strong learners see definitions.

  3. 03

    Detailed explanation

    The expansion. Country-specific examples (PKR / cricket / Pakistani institutions for a Pakistani learner; AED / desert ecology for a UAE learner; USD / domestic context for a US learner). LaTeX math where applicable.

  4. 04

    Real-world applications

    Where the concept lives outside the lesson. Tuned to learner geography and institutional context — a corporate L&D learner gets workplace examples; a K-12 learner gets developmentally appropriate ones.

  5. 05

    Summary

    A consolidation pass. Strong sequential learners see a step-by-step recap; strong global learners see a high-level synthesis. Same content, two structurally different summaries.

  6. 06

    Practice questions

    Five-format assessment — MCQ, true/false, fill-blank, multi-select, matching. Misconception-probing distractors. Server-authoritative grading. The accuracy here becomes tomorrow’s mastery signal.

Six adaptations baked into the prompt

Mandated in the generator. Not optional. Not configurable.

  • Country-specific examples

    Mandatory in the generation prompt. The system is instructed verbatim: when the learner’s country is known, use culturally relevant examples — Pakistan → PKR, cricket; UAE → AED, desert ecology; USA → USD, American context.

  • ADHD adaptation

    Shorter text blocks. More frequent inline knowledge-checks (quiz_inline blocks every few concepts rather than once at the end). More callout blocks to break visual rhythm.

  • Dyslexia adaptation

    Simpler sentence structure. Dense paragraphs avoided. Definition blocks used for complex terms. The label is never surfaced to the learner — the adaptation happens without diagnosis exposure.

  • LCP visual-strong

    More guided_diagram, hierarchy_tree, comparison, table, and timeline blocks. One or two image blocks per lesson (subject permitting).

  • LCP verbal-strong

    More text, definition, and accordion blocks. Diagrams minimised; image blocks zero.

  • Mastery scaffolding

    Yesterday’s practice accuracy is passed into today’s generation as mastery signal. Lower accuracy → more scaffolding, more repetition, slower pacing, more explicit explanation. Never skip concepts. Never reduce correctness.

Fourteen block types

Lessons assemble from fourteen structured blocks. Not flat HTML.

  • text

    Standard prose paragraphs.

  • callout

    Tone-of-voice highlights — note, warning, tip.

  • definition

    Named-term definitions surfaced as standalone blocks.

  • diagram

    Mermaid diagrams with auto-sanitised node labels.

  • guided_diagram

    Step-by-step diagram reveals with play, pause, and zoom.

  • hierarchy_tree

    Animated taxonomy trees — concept hierarchies, org structures, syntax trees.

  • comparison

    Two-column structured comparison of options or approaches.

  • table

    Structured tabular data with sortable headers.

  • timeline

    Time-ordered sequences for historical or process content.

  • quiz_inline

    Knowledge-check inside the lesson — non-graded, immediate feedback.

  • code

    Code blocks with language-aware syntax highlighting.

  • accordion

    Optional-depth expand surfaces for dive-deeper content.

  • key_takeaway

    Single-line concept anchors at lesson close.

  • image

    AI-generated illustrations — STEM and applied subjects only.

Code is truth

What the generator actually does.

  1. 01

    Five generation calls compose six pedagogical steps: introduction · key_concepts · detailed_explanation · real_world_applications · summary · practice_questions.

  2. 02

    Country-specific examples are mandatory in the generation prompt: Pakistan → PKR / cricket / local institutions; UAE → AED / desert ecology; USA → USD / domestic context.

  3. 03

    Learning-support-aware adaptation: ADHD → shorter blocks, more inline knowledge checks, more callouts; dyslexia → simpler sentence structure, fewer dense paragraphs, more definition blocks.

  4. 04

    LCP-aware composition: visual-strong learners receive more guided_diagram, hierarchy_tree, comparison, table, timeline blocks plus AI-generated illustrations. Verbal-strong learners receive more text, definition, accordion blocks.

  5. 05

    14 supported content block types: text · callout · definition · diagram · guided_diagram · hierarchy_tree · comparison · table · timeline · quiz_inline · code · accordion · key_takeaway · image.

  6. 06

    Closed-loop adaptive pre-generation: when a student completes ≥50% of a day’s lessons, the entire next day’s content set is queued for generation, with the prior practice accuracy passed in as mastery signal.

  7. 07

    Image generation is subject-eligibility-gated: STEM, applied sciences, business/economics, arts/design ALLOWED; literature, language, law, religious studies, philosophy, sociology FORBIDDEN.

Tomorrow’s lesson is in flight before the learner finishes today’s.

When a learner crosses 50% completion of the day’s lessons, the system queues generation of the entire next day’s lesson set — with today’s practice accuracy passed in as mastery signal. The learner does not wait. The platform does not cache. Each day’s content is freshly generated against the freshest profile.

That is closed-loop adaptive learning. A new lesson, every day, calibrated to who the learner is and what they just demonstrated they did or did not master. Not a recommendation engine. A generation engine.

See it in deployment

Across four institutional editions. In two dozen institutions. In two languages shipped, more on the pipeline.