Problem
Adaptive tutoring used to be an ed-tech research niche. By 2026 it is a consumer product. Khanmigo is deployed across most US school districts. Duolingo Max hit tens of millions of MAUs. Google's LearnLM / Gemini for Education powers tutoring in Google Classroom. Quizlet Q-Chat sits alongside flashcards. Synthesis Tutor hit virality with tutor-for-curious-kids. The common elements: multimodal input (type, speak, photograph equations), Socratic pedagogy (ask first, explain later), a learner model that updates after each interaction, and strict age-appropriate safety.
You will build one of these for a specific cohort. The measurement bar is an actual efficacy study: pre-test and post-test scores over two weeks with 10 learners. The voice loop must feel natural (capstone 03 sub-stack). The memory must be privacy-respecting. The safety filter must pass COPPA-aware red-team for K-12.
Concept
Four components. Tutor policy is a Socratic loop: when the learner asks for the answer, the policy asks a leading question; when they get it right, it moves to the next concept; when they are stuck, it offers a scaffolded hint. Learner model is Bayesian knowledge tracing (or a simple variant) that updates mastery probability per curriculum node after each interaction. Curriculum graph is a Neo4j of concepts with prerequisite edges; the policy walks the graph to pick the next concept. Memory is an episodic + semantic store (agentmemory-style) holding past interactions, mistakes, and preferences.
The UX is multimodal. Text input for typed answers. Voice input via LiveKit + Whisper (reuse capstone 03). Photo input for math problems via dots.ocr or PaliGemma 2. Voice output via Cartesia Sonic-2. Safety uses Llama Guard 4 plus an age-appropriate filter (blocks adult content, violence, self-harm) and a COPPA-aware memory retention policy.
The efficacy study is the deliverable. 10 learners, pre-test and post-test, two weeks. Report learning gain delta and confidence interval. Compare against a non-adaptive baseline (the same content delivered linearly without the tutor policy).
Architecture
learner device
|
+-- text -> web app
+-- voice -> LiveKit Agents (ASR + TTS)
+-- photo math -> dots.ocr / PaliGemma 2
|
v
tutor policy (LangGraph)
- Socratic decision head
- next-concept chooser (curriculum graph walk)
- hint scaffolder
- mastery update
|
v
learner model (BKT / item-response theory)
- per-concept mastery probability
- spaced-repetition scheduler (SM-2 or FSRS)
|
v
memory (agentmemory-style)
- episodic: every interaction
- semantic: learned mistakes, preferences
- retention policy: COPPA / GDPR aware
|
v
curriculum graph (Neo4j)
- prerequisite edges
- OER content attached
|
v
safety:
Llama Guard 4 + age-appropriate filter
memory access guarded by learner ID scope
Stack
- Subject choice: K-12 algebra or intro Python (pick one for depth)
- Tutor policy: LangGraph over Claude Sonnet 4.7 (with prompt caching)
- Learner model: Bayesian knowledge tracing (classic) or FSRS for spacing
- Curriculum graph: Neo4j of concepts + prerequisite edges + OER content
- Memory: agentmemory-style persistent vector + episodic + semantic store
- Voice: LiveKit Agents 1.0 + Cartesia Sonic-2 (reuse capstone 03 sub-stack)
- Photo math: dots.ocr or PaliGemma 2 for equation recognition
- Safety: Llama Guard 4 + custom age-appropriate filter
- Eval: Bloom-level question generation, pre/post test harness, efficacy study tooling
Interactive figure coming later.
Build It
-
Curriculum graph. Build a Neo4j of 50-150 concept nodes (e.g., K-12 algebra from "number line" to "quadratic formula") with prerequisite edges. Attach OER content per node (Open Textbook, OpenStax).
-
Learner model. Initialize Bayesian knowledge tracing with priors: guess, slip, learn-rate. Update per-concept mastery after each interaction. Persist per learner.
-
Tutor policy. LangGraph with nodes:
read_signal(was the learner's answer correct / partial / stuck?),select_concept(walk curriculum graph picking the highest-priority concept),scaffold(Socratic prompt),update_mastery. -
Memory. Every interaction writes to an episodic store. Mistakes and preferences promote to semantic memory. COPPA-aware retention policy: auto-delete after 1 year, parent-accessible.
-
Voice path. LiveKit Agents worker attached to the tutor policy. ASR via Whisper-v3-turbo. TTS via Cartesia Sonic-2. Barge-in supported (reuse capstone 03 mechanics).
-
Photo-math path. Upload or capture image; run dots.ocr or PaliGemma 2 to recognize the equation; feed to tutor as structured input.
-
Safety. Every model output passes Llama Guard 4 + an age-appropriate filter (blocks self-harm, adult content, violence). Memory access scoped by learner ID; parental access surface for deletion.
-
Efficacy study. 10 learners, pre-test (standardized 30-question baseline), two weeks of tutor interaction (3 sessions/week), post-test. Compare against a non-adaptive baseline cohort of 10 learners on the same content.
-
Weekly progress reports. Per learner, auto-generate a PDF summary of topics explored, mastery trajectories, and recommended next steps.
Use It
learner: "I don't understand why 3x + 6 = 12 means x = 2"
[signal] stuck
[concept] 'isolating variables' (prerequisite: addition-subtraction-equality)
[scaffold] "what number would you subtract from both sides to start?"
learner: "6"
[signal] correct
[mastery] addition-subtraction-equality: 0.62 -> 0.77
[concept] continue 'isolating variables'
[scaffold] "great. now what is 3x / 3 equal to?"
Ship It
outputs/skill-ai-tutor.md is the deliverable. A subject-specific adaptive tutor with multimodal input, a learner model, memory, safety, and measured efficacy.
| Weight | Criterion | How it is measured |
|---|---|---|
| 25 | Learning gain delta | Pre/post-test delta in a 10-learner two-week study |
| 20 | Socratic fidelity | Rubric score on transcript samples |
| 20 | Multimodal UX | Voice + photo + text coherence end to end |
| 20 | Safety + privacy posture | Llama Guard 4 pass rate + COPPA-aware retention |
| 15 | Curriculum breadth and graph quality | Concept coverage + prerequisite graph consistency |
| 100 |
Exercises
-
Run the efficacy study with and without the adaptive learner model (random concept order). Report the delta. Expect adaptive to win, but the size is the interesting number.
-
Add a multimodal probe: the same concept question delivered as text, voice, and photo. Measure whether learners converge faster with the modality they prefer.
-
Build a parent dashboard: topics practiced, mastery trajectories, upcoming concepts, safety events (any guardrail hits). COPPA-aligned.
-
Add a language-switch mode: the tutor accepts Spanish input and teaches in Spanish. Measure X-Guard coverage.
-
Stress the memory privacy: verify that learner A cannot see learner B's data even through a voice-clip re-ingest attack. Log the attempted access and alert.
Key Terms
| Term | What people say | What it actually means |
|---|---|---|
| Socratic policy | "Ask, do not dump" | Tutor asks a leading question rather than giving the answer |
| Bayesian knowledge tracing | "BKT" | Classic learner-model equations for mastery probability per concept |
| FSRS | "Free Spaced Repetition Scheduler" | 2024 spaced-repetition scheduler, better than SM-2 |
| Curriculum graph | "Concept DAG" | Neo4j of concepts with prerequisite edges |
| Episodic memory | "Per-interaction log" | Every interaction stored for later retrieval |
| Semantic memory | "Learned pattern store" | Compacted mistakes and preferences promoted from episodic |
| COPPA | "Kids privacy law" | US law restricting data collection from children under 13 |
Further Reading
- Khanmigo (Khan Academy) — reference consumer K-12 tutor
- Duolingo Max — reference language-learning tutor
- Google LearnLM / Gemini for Education — hosted reference model
- Quizlet Q-Chat — alternate reference
- Synthesis Tutor — startup reference
- FSRS algorithm — spaced-repetition scheduler
- Bayesian Knowledge Tracing — learner-model classic
- LiveKit Agents — voice stack
Code
ts/package.json
Open on GitHub ↗ts/README.md
Open on GitHub ↗ts/src/curriculum.ts
npx tsx phases/19-capstone-projects/17-personal-ai-tutor/code/ts/src/curriculum.tsOpen on GitHub ↗ts/src/index.ts
npx tsx phases/19-capstone-projects/17-personal-ai-tutor/code/ts/src/index.tsOpen on GitHub ↗ts/src/mastery.ts
npx tsx phases/19-capstone-projects/17-personal-ai-tutor/code/ts/src/mastery.tsOpen on GitHub ↗ts/src/repetition.ts
npx tsx phases/19-capstone-projects/17-personal-ai-tutor/code/ts/src/repetition.tsOpen on GitHub ↗ts/src/server.ts
npx tsx phases/19-capstone-projects/17-personal-ai-tutor/code/ts/src/server.tsOpen on GitHub ↗ts/src/types.ts
npx tsx phases/19-capstone-projects/17-personal-ai-tutor/code/ts/src/types.tsOpen on GitHub ↗ts/tests/curriculum.test.ts
npx tsx phases/19-capstone-projects/17-personal-ai-tutor/code/ts/tests/curriculum.test.tsOpen on GitHub ↗ts/tsconfig.json
Open on GitHub ↗
Take-away files
skill-ai-tutor.md
--- name: ai-tutor description: Ship an adaptive multimodal personal tutor for a specific subject with Bayesian knowledge tracing, a curriculum graph, safety filters, and a measured two-week efficacy study. version: 1.0.0 phase: 19 lesson: 17 tags: [capstone, tutor, adaptive, bkt, fsrs, livekit, multimodal, coppa] --- Given a subject (K-12 algebra or intro Python), build a personal tutor with text + voice + photo-math input, Bayesian knowledge tracing learner model, curriculum-graph-driven concept selection, COPPA-aware memory, and safety filters. Run a two-week efficacy study with 10 learners. Build plan: 1. Curriculum graph in Neo4j: 50-150 concept nodes with prerequisite edges and attached OER content (OpenStax, Open Textbook). 2. Learner model: Bayesian knowledge tracing with priors for guess/slip/learn-rate per concept; per-learner persisted state. 3. Tutor policy (LangGraph over Claude Sonnet 4.7 with prompt caching): read_signal -> select_concept (graph walk) -> scaffold (Socratic) -> update_mastery. 4. Memory: agentmemory-style persistent episodic + semantic store; COPPA-aware auto-delete after 1 year; parent-accessible deletion. 5. Voice: LiveKit Agents worker with Whisper-v3-turbo ASR and Cartesia Sonic-2 TTS; reuse capstone 03 pipeline. 6. Photo math: dots.ocr or PaliGemma 2 for equation recognition; feed structured input to the tutor. 7. Safety: Llama Guard 4 input/output; age-appropriate filter blocking self-harm/adult/violence; learner-scoped memory isolation. 8. Weekly PDF progress reports per learner. 9. Efficacy study: 10 learners, pre-test (standardized 30-question baseline), 2 weeks of sessions (3/week), post-test; compare against non-adaptive linear cohort. Assessment rubric: | Weight | Criterion | Measurement | |:-:|---|---| | 25 | Learning gain delta | Pre/post-test delta in the 10-learner 2-week study | | 20 | Socratic fidelity | Rubric score on transcript samples | | 20 | Multimodal UX | Voice + photo + text coherence end to end | | 20 | Safety + privacy posture | Llama Guard 4 pass rate + COPPA-aware retention + cross-learner isolation | | 15 | Curriculum breadth and graph quality | Concept coverage + prerequisite graph consistency | Hard rejects: - Tutor policies that answer-dump instead of asking the next question. Socratic is a hard requirement. - Learner models that do not update per interaction. BKT is a floor. - Memory without COPPA-aware retention. Unacceptable for a K-12 audience. - Efficacy claims without a non-adaptive baseline cohort. Refusal rules: - Refuse to deploy without Llama Guard 4 on both input and output. - Refuse to persist learner data without a parent-accessible deletion surface. - Refuse to claim "adaptive" without running the non-adaptive baseline alongside. Output: a repo containing the curriculum graph, the BKT learner model, the LangGraph tutor policy, the multimodal input handlers, the LiveKit voice pipeline, the safety pipeline, the parental dashboard, the efficacy-study runner, the pre/post test harness, and a write-up documenting the learning gain delta versus the linear baseline with confidence intervals.