Dashboard
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
51 small wins to finish your pathNext question →

Q38HardSystem design

Design an AI tutor platform that teaches with voice, adapts to each learner, and supports thousands of concurrent users.

30-second answerSay your answer out loud first, then reveal.
AI tutor architecture: the learner connects through a realtime gateway and voice pipeline to a tutoring engine with a pedagogy policy, which uses tools for lessons (RAG over a content graph), grading and code runs, and hints and quizzes; it writes events for analytics and updates a learner model that feeds a planner choosing the next activity.

Deep dives

  1. Pedagogy policy: diagnose first, explain at the right level, check understanding with questions, give hints before answers (hint ladder), praise effort, adapt to errors. Encode this in the system prompt and evaluate it with rubric-based judging.
  2. Grounding: explanations and code examples come from vetted course content (RAG) to avoid outdated or incorrect teaching, with citations to lessons.
  3. Learner modelling: update mastery from quiz results and interactions (Bayesian knowledge tracing or simpler heuristics); schedule reviews (spaced repetition); generate a weekly study plan from available hours.
  4. Voice: low-latency pipeline (Q34); teach with short spoken turns; show code and diagrams on screen while speaking.
  5. Code labs: sandboxed execution with timeouts; automated tests for feedback.
  6. Cost model: per-learner monthly token budget; route routine turns to cheaper models. Bring-your-own-key shifts inference cost to users (store keys encrypted, client-side or in a vault, never logged).
  7. Safety: age-appropriate content, academic integrity (exam mode), privacy of learner data.
  8. Evaluation: pre/post quiz gains, concept mastery progression, completion and retention, tutor rubric scores (correctness, helpfulness, not giving away answers).

Slow is fine. Stopping is the only problem.