Executive view
Studeia AI tutor is not ChatGPT in iframe. It's a pedagogical system built for online education:
Student message
↓
1. StudentModelService → loads ConceptMastery (Bayesian), misconceptions, quiz history
↓
2. RetrievalAgent → searches tenant-scoped RAG, boost by weak areas in quizzes
↓
3. PedagogicalAgent → selects strategy (5 options) based on mastery
↓
4. Orchestrator → assembles enriched prompt
↓
5. LLM (Vercel AI SDK) → streaming, with fallback Claude → GPT → Grok → Gemini
↓ after response (after())
6. EvaluationAgent → classifies misconceptions (Haiku, $0.001)
7. ContentAgent → pre-generates follow-up exercise
8. SupervisorAgent → moderates (5 severity levels, 8 categories)
Pedagogical strategies
| Mastery | Strategy | Behavior |
|---|---|---|
| < 0.3 | direct_instruction | Clear explanation, concrete examples |
| 0.3-0.5 | scaffolding | Progressive hints |
| 0.5-0.7 | socratic | Questions leading to discovery |
| 0.7-0.9 | guided_practice | Exercises with feedback |
| > 0.9 | challenge | Complex problems, conceptual connections |
Per-tenant RAG
Each course can be ingested in tenant RAG: POST /api/institution/courses/[id]/rag-ingest. Tutor cites correct institution material, not generic content.
Multi-provider AI
LLM-backed tutor/admin components use TenantTaskModelConfig. Deterministic TypeScript components such as orchestration, retrieval and pedagogy do not select a provider. Fallback chain per tier (Haiku/Sonnet/Opus → equivalents). Circuit breaker per provider (Redis state).
Known limitations
- Output text-to-speech and a visual tutor avatar are available as opt-in tutor experiences.
- Voice input/STT and real-time WebRTC avatar via external providers remain on the roadmap.
- RAG is per-course, not per-institution.
- Misconceptions can regress (re-detected) — expected; system marks regression in evidence.