The student model
Before each tutor turn, StudentModelService assembles an enriched snapshot:
- ConceptMastery — a Bayesian probability per concept (Beta distribution) with a confidence interval and a relative learning speed.
- Misconceptions — active/resolving items with an evidence trail.
- Episodic memory — what worked before (an analogy that landed, a breakthrough), scored by effectiveness.
- Quiz context — average score, pass rate, weak areas.
Pedagogical strategy by mastery
| Mastery | Strategy |
|---|---|
| < 0.3 | direct instruction (clear explanation, concrete examples) |
| 0.3–0.5 | scaffolding (progressive hints) |
| 0.5–0.7 | socratic (guiding questions) |
| 0.7–0.9 | guided practice (exercises + feedback) |
| > 0.9 | challenge (complex problems, connections) |
Thresholds are configurable per tenant (PedagogicalConfig), with overrides by domain, age and learning style. The agent also adjusts when chat mastery and quiz performance diverge (shallow understanding vs. a quiet but capable student).
Misconception lifecycle
Misconceptions move through active → resolving → resolved with an evidence trail. They are created with full traceability — source (chat / quiz / interactive / inline_quiz), the triggering question, the student's answer, a context snippet, and linked concepts. The tutor injects active misconceptions into its prompt and addresses them proactively; frequent ones trigger an inline quiz in the chat. Resolution requires mastery + quiz/interactive evidence; re-detection regresses to active. Teachers can also resolve/reopen manually.
Spaced repetition & knowledge graph
A modified SM-2 algorithm schedules reviews per topic, with difficulty calibration from correctness and a per-subject prerequisite knowledge graph so reviews and new concepts arrive in the right order.
Inline quizzes
When the tutor detects a frequent misconception it can render an interactive inline quiz in the chat. Correct answers are kept server-side (Redis, never sent to the client before submit); on submit, mastery updates and the misconception can transition toward resolved — and the tutor follows up proactively.