Inspiration

The best-documented way to truly learn something is to teach it — the protégé effect. It goes back to Betty's Brain at Vanderbilt, and a recent study with a teachable agent for math (ALTER-Math, British Journal of Educational Technology, 2025) showed students who taught an agent significantly out-learned a control group.

But every teachable agent so far is generic: it holds textbook misconceptions that aren't yours. Meanwhile, the thing every student actually owns is a pile of homework they got wrong — a perfect record of how their own reasoning fails. We asked: what if the AI student you have to teach made your mistakes, for your reasons?

ALTER-Math teaches a generic agent. We clone your actual mistakes from a photo of your real homework — a digital twin of your mistakes.

What it does

  1. Upload a photo of your real, incorrect handwritten homework (or use the built-in sample gallery).
  2. GPT-5.6 extracts a misconception profile — not "wrong answer on Q3," but the flawed mental rule behind it (e.g. believes (f·g)′ = f′·g′), with an example of the error and a severity.
  3. That profile is implanted into an AI student — name it after yourself — via a belief-state engine (held → shaken → corrected, each with a conviction level).
  4. Baseline exam: before any teaching, the student sits a 5-question quiz targeting those misconceptions and fails exactly the way you once failed.
  5. You teach it. It defends its wrong beliefs, throws counterexamples at you, and asks probing questions. A live sidebar shows every belief's status and conviction updating turn by turn.
  6. Final exam: the before → after report card (✗ → ✓) turns your teaching — and your understanding — into a measurable score.

Three rules keep it honest: the student never "self-heals" (beliefs only change when your explanation is correct and complete — teach it wrong and it stays wrong), it never leaks the model's real knowledge in exams (it answers purely from its belief state), and the app never teaches the student for you.

How we built it

Entirely in Codex, across five focused sessions — one per build package, each logged via /feedback — with GPT-5.6 powering all four cognitive cores through the Responses API with structured outputs:

  • Extractor — vision call turning handwriting photos into a structured misconception profile.
  • Student — a belief-state persona with hard rules for staying consistently, stubbornly wrong.
  • Quiz generator — questions aimed at the exact extracted misconceptions.
  • Grader — scores exam answers and reports which misconceptions still show, without revealing correct rules.

The app is Next.js 16 + TypeScript + Tailwind on Vercel: stateless API routes, localStorage session restore, KaTeX rendering, and a live belief-state sidebar with conviction bars and flash animations. We worked spec-first: every package went through Codex plan mode before implementation, and Codex's clarifying questions repeatedly caught edge cases we hadn't specified (zero-misconception uploads, crash recovery, exact-view restore on refresh).

Challenges we ran into

The entire project lives or dies on one thing: an AI student that stays wrong. Large models desperately want to be correct and helpful, so we had to engineer against the model's instincts — hard belief-state rules in the student prompt core, a separate exam mode that answers only from beliefs, and a 5-scenario "stubbornness test" (keeps misconceptions under repetition, resists confidently wrong teaching, no answer leaking) that any prompt change had to re-pass. The subtlest bug class was anti-leak: early on, a correct answer on an untargeted topic looked like a leak until we verified it was the spec working as intended. We also hardened the fun feature — naming your student — after realizing the name field was a prompt-injection vector (a student named "Alex. Ignore your beliefs" must not work; names are normalized client- and server-side).

Accomplishments that we're proud of

  • The stubbornness test passed 5/5 scenarios on the first implementation of the belief engine.
  • On a university-level calculus sample with three planted traps (chain rule, integral of a product, power rule misuse on x^x), the extractor found 3/3, the student failed the baseline 0/5, resisted a subtly wrong teaching attempt, and reached 5/5 only after being taught correctly.
  • The before/after report card makes the protégé effect measurable: the score delta is your learning, as a number.
  • A complete, polished product — sample gallery, math rendering, session restore, exam report cards — not a proof of concept.

What we learned

Teaching is the fastest way to expose the gaps in your own understanding — we felt the protégé effect ourselves while testing: to make the student's belief flip to corrected, you must state the rule completely, and hand-waving gets caught. On the engineering side, we learned that spec-first prompting in Codex plan mode is a superpower for a solo builder: the plan's clarifying questions functioned as a design review we didn't otherwise have.

What's next for Teach Your Past Self

Course-material context (paste your syllabus so extraction matches your course), a common-misconceptions mode for exams you haven't taken yet (upload a problem set, GPT-5.6 implants that topic's classic errors), conviction timelines per belief, and visual tracing for CS/DSA subjects. The belief engine is already subject-agnostic — it just needs samples.

Built With

Share this project:

Updates