Wire up an AI Socratic tutor
What you'll build: a chat box your child can talk to about a homework problem, and that never hands over the answer. Instead it asks the next good question, the way a patient tutor does.
Who it's for: parents comfortable getting an API key (we'll walk through it). Most regular AI chatbots are answer-vending machines; this flips that with one carefully written instruction.
Before you start
You'll need a free AI-assisted editor (v0.app, Claude, or Cursor) and one model API key (OpenRouter gives you access to many models with a single key). Keep the key private. it's like a password.
Jargon, defined once: a system prompt is a hidden instruction the AI reads before every reply. It sets the rules. Productive struggle is the slightly-uncomfortable thinking that actually builds understanding, the thing an answer-vending bot quietly destroys.
Step 1. Describe the chat page
Build a single-page chat app. Messages stack in a column, newest at the bottom. A text box and send button at the bottom. The child types, the tutor replies. Big readable text, calm colors, works on a phone. No login.
Step 2. Get a model key
Add a settings field where I paste an OpenRouter API key, saved in the browser's local storage only. Use it to call the model. Never send the key anywhere except the model API.
Step 3. Paste the Socratic system prompt
This is the heart of the tool. Tell the editor: "Send this as the system prompt on every request."
You are a Socratic tutor for a child (roughly ages 7-12).
Your single rule: NEVER give the final answer, and never do the step
that the child could do themselves.
Instead, on every turn:
1. Figure out where the child is stuck.
2. Ask ONE small question that moves them one step forward.
3. If they're frustrated, shrink the step. make the next question easier,
not the answer closer.
4. Celebrate the thinking, not the result ("Nice. how did you know to
start there?").
Style: warm, short, plain words. One question at a time. Never lecture.
If the child begs for the answer, say kindly that you know they can get
there, and offer a smaller hint instead.
If the child is completely lost, give a worked EXAMPLE of a *different*
problem, then point them back to theirs.
Step 4. Show your work first
Before the tutor answers, require the child to type what they've already tried. Add a first prompt: "Show me what you've tried so far. even a guess counts." The tutor responds to their attempt, never to a blank.
Step 5. One question at a time
Keep replies to one or two sentences and exactly one question. If the model returns a paragraph, that's wrong. tighten the system prompt until replies are short.
Step 6. Add an "I'm stuck" button
Add a button "I'm really stuck". Pressing it tells the tutor to give a smaller hint or a worked example of a similar problem, but still not the child's actual answer.
Step 7. Keep it on-task
If the child changes the subject to something unrelated, the tutor gently brings them back to the problem once, then it's fine to chat briefly and return.
Step 8. A parent peek
Add a "Copy conversation" button so a parent can read the whole exchange afterward. This keeps it transparent. no hidden tutor.
Step 9. Calm the urgency
No timers, no scores, no streaks. The goal is thinking, and thinking doesn't like a stopwatch.
Test it
Give it a real problem your child has, a tricky subtraction, a "why is the sky blue", and play the child. Try to make it give you the answer. If you can pry the answer out of it, your system prompt isn't firm enough; add the failing case as an explicit rule and try again. A good tutor here is mildly, lovingly stubborn.
The one guardrail to add before your child uses it
Never gives the final answer. verify it under pressure. Sit with your child the first two times and try to break it together. The single most valuable property of this tool is that it refuses to do the thinking for them; if that ever slips, the tool quietly becomes the opposite of what you built. Re-test it whenever you change the prompt.
This guide recreates a tool we already run for free.
Pressure-test the idea