My niece kept getting stuck on quadratics. I built a Socratic-method tutor that never just gives the answer. Her grade went from C+ to A-. Here is what I learned about edtech from watching a 14-year-old use it.
|
THE STACK • GPT-4o • Desmos API • Manim • React • Vercel |
The Tutoring Problem
My niece Priya is 14 and convinced she's bad at math. She isn't — she has gaps from pandemic remote learning that never got filled, and quadratic equations are sitting right on top of one of them. She doesn't understand why completing the square works. Her teacher has 32 students. There is no time.
I've been building with LLMs for two years. I decided to build something that would meet her where she was without just giving her the answer. Six weeks later, her grade went from C+ to A-. Her teacher emailed me to ask for the link.
The Stack
• GPT-4o — the tutor model; handles Socratic dialogue, detects misconceptions, adjusts explanation strategy
• Desmos API — renders live interactive graphs in response to equations the student is working on
• Manim — generates short animated math explanations for concepts that benefit from visual proof
• React — the frontend; chat interface with embedded Desmos calculator and Manim video panels
• Vercel — hosting; deploys in two minutes, costs essentially nothing at one-student scale
The Socratic Prompt Is the Product
The system prompt is doing most of the work. The key constraints:
Never give the answer directly. If Priya writes "x² + 5x + 6 = 0, what's x?" the tutor responds with a question, not a solution. "What do you know about factoring? Can you think of two numbers that multiply to 6 and add to 5?" This is the Socratic method — effective and, for a student who just wants the answer, correctly frustrating.
Name the misconception, not the mistake. When Priya wrote "-b ± √b² - 4ac / 2a" (missing the parentheses around 2a), the tutor didn't say "that's wrong." It said "you're really close — look at the denominator in the formula. What does it apply to?"
Trigger Desmos for any equation. Whenever a specific function appears in the conversation, the React frontend detects it (simple regex) and renders it in an embedded Desmos panel. Priya can drag the parabola and watch the discriminant change. That tactile interaction taught her the discriminant faster than any explanation I could have written.
The Manim Integration
I pre-generated about 40 Manim animations covering key Algebra II concepts — completing the square animated geometrically, the quadratic formula derived step by step, graphing transformations. Stored as MP4s on Vercel Blob storage.
The tutor triggers a video when it detects a student struggling with a concept that has a matching animation. Priya watched the completing-the-square animation three times in a row during her first session. She said "oh, it's literally completing a square" in a tone that implied she couldn't believe nobody had told her this before. That's the moment you build for.
Where It Almost Went Wrong
GPT-4o was initially too patient with wrong answers. After the same wrong answer twice, the tutor would rephrase its Socratic question rather than adjusting strategy. By the fourth wrong answer Priya would close the tab in frustration — and I couldn't blame her.
Fix: I added a frustration-detection layer. After three unsuccessful attempts on the same problem, the model shifts from pure Socratic questioning to a worked example with one step shown, then a parallel problem for the student to try. Knowing when to stop being Socratic matters as much as being Socratic. After this change, Priya's average session length went from 9 minutes to 24 minutes.
The Number
Grade improvement: C+ to A- over six weeks. On a 10-problem diagnostic: 3/10 before, 9/10 after. Her teacher shared the link with four other struggling students. Unplanned distribution is the best kind.
Try This
1. Write your system prompt with three explicit constraints: never give the answer directly, name the misconception not the mistake, and define a frustration threshold after which strategy changes. These rules determine whether a student stays or quits.
2. Integrate Desmos via their API — it's free, and visual feedback on equations is worth more than any explanation text. Detect equations with a simple regex and render them automatically.
3. Pre-generate your Manim animations rather than on-demand — Manim is too slow for real-time use. Build a library of 20-40 key concept animations and store them as static MP4s.
4. Watch a real student use it for 30 minutes before you ship to anyone else. What they do that you didn't expect will tell you everything about what to fix.
5. Deploy on Vercel with zero auth for initial testing — a link the student can click without an account is infinitely more likely to actually get used.
DIAGRAM_HINT: architecture diagram showing React chat interface → GPT-4o Socratic tutor with frustration detection → equation regex trigger → embedded Desmos API graph panel + Manim video library on Vercel Blob → student interaction feedback loop

Figure 8. architecture diagram showing React chat interface → GPT-4o Socratic tutor with frustration detection → equation regex trigger → embedded Desmos API graph panel + Manim video library on Vercel Blob …


Comments (0)
Join the conversation!