Building a real-time AI tutor for 5-year-olds
6 hours ago
- #AI tutor
- #real-time systems
- #child education
- Sub-second responses are essential for keeping children engaged in learning; long pauses cause attention to wander.
- The standard AI agent tool loop was abandoned due to latency issues, with custom harness enabling streaming of multiple actions for real-time interaction.
- Two agents were implemented: a 'converser' for immediate interaction and a 'planner' for pedagogical reasoning, running asynchronously to anticipate child's actions.
- Safety checks run in parallel with generation to avoid delays, using an LLM classifier to block inappropriate content without slowing responses.
- Anticipating child responses allows pre-generation of answers to closed-ended questions, reducing wait times.
- The architecture emphasizes balancing instruction following, latency, and action flexibility, requiring custom observability and tracing.
- Key lessons include owning the interaction loop, leveraging child's thinking time for planning, and gating safety on execution rather than generation.