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.
Five generation calls. Six learning steps. One lesson.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
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.
Lessons assemble from fourteen structured blocks. Not flat HTML.
textStandard prose paragraphs.
calloutTone-of-voice highlights — note, warning, tip.
definitionNamed-term definitions surfaced as standalone blocks.
diagramMermaid diagrams with auto-sanitised node labels.
guided_diagramStep-by-step diagram reveals with play, pause, and zoom.
hierarchy_treeAnimated taxonomy trees — concept hierarchies, org structures, syntax trees.
comparisonTwo-column structured comparison of options or approaches.
tableStructured tabular data with sortable headers.
timelineTime-ordered sequences for historical or process content.
quiz_inlineKnowledge-check inside the lesson — non-graded, immediate feedback.
codeCode blocks with language-aware syntax highlighting.
accordionOptional-depth expand surfaces for dive-deeper content.
key_takeawaySingle-line concept anchors at lesson close.
imageAI-generated illustrations — STEM and applied subjects only.
What the generator actually does.
- 01
Five generation calls compose six pedagogical steps: introduction · key_concepts · detailed_explanation · real_world_applications · summary · practice_questions.
- 02
Country-specific examples are mandatory in the generation prompt: Pakistan → PKR / cricket / local institutions; UAE → AED / desert ecology; USA → USD / domestic context.
- 03
Learning-support-aware adaptation: ADHD → shorter blocks, more inline knowledge checks, more callouts; dyslexia → simpler sentence structure, fewer dense paragraphs, more definition blocks.
- 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.
- 05
14 supported content block types: text · callout · definition · diagram · guided_diagram · hierarchy_tree · comparison · table · timeline · quiz_inline · code · accordion · key_takeaway · image.
- 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.
- 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.