Inky

An AI study tutor for high schoolers that makes them do the thinking. The hard part of a tutor for teenagers is the one thing a normal chatbot does by default: give the answer.

Built for The Ethics Lab, the nonprofit I co-founded. I'm the only human author of the tutor code, and I build it with AI coding tools. It's in private beta.

INKY's public demo: a student and the tutor working through anaphase and telophase in AP Bio
The public demo, with sample data
774commits on the current development branch
130,000lines of TypeScript, TSX and SQL, roughly
46serverless edge functions
196database migrations
what happens when a kid hits send

One message

A single question goes through several separate checks before any student sees a reply. Scroll through it.

Student message
Second model: safeguarding + jailbreak check
Tutor drafts a reply
Second model: did the draft leak the answer?
Student gets a hint
Mastery updates, teacher alerted if needed

The student asks

Homework and exam text is deliberately kept out: it's never saved or indexed, so an assignment can't quietly become a stored answer key.

Read the message before answering it

A second model pass labels the message for safeguarding concerns and jailbreak attempts. It also looks across turns, because the attacks that work build up slowly (a "crescendo"), and no single message looks bad on its own.

Draft, and doubt the draft

The tutor writes a reply that scaffolds instead of solving. When its own confidence is low, measured from the model's token probabilities, it takes a second attempt rather than sounding sure about something it isn't.

Assume the draft failed

Language models are very good at being talked into things, so the instruction "don't give the answer" isn't trusted. A separate pass grades the draft for answer leaks and unsafe content, and a planted canary string catches attempts to pull out the system prompt.

The student does the work

What gets through is a hint or a question. Repeated attempts to break the rules lead to strikes and a lockout, and because automated systems get it wrong, students can appeal.

Learn from it, and tell a human

Mastery updates through a Bayesian knowledge tracing model and SM-2 spaced repetition. If something looks like a safeguarding issue, teachers get a dashboard alert and an email. Supervisor summaries load through the caller's own login, so database row-level security decides what each adult can see.

under the hood

The build

Built and in the main codebase

Anti-answer validation

A second LLM pass checks every draft for answer leaks and unsafe content before it's shown.

Crescendo detection

Multi-turn jailbreak detection, with strike lockouts and student appeals.

Answer isolation

Homework and exam text is never persisted or chunked for retrieval.

Adaptive learning

BKT-style mastery, SM-2 spaced repetition, and a retry when logprob confidence is low.

Oversight by design

Row-level security on supervisor views, plus dashboard and email alerts for teachers.

Data rights

Account deletion, data export, and a screen for under-13 signups.

Classroom tools

A platform gradebook and Google Classroom sync for students.

Red-team harness

A script that attacks the deployed tutor function, so safety gets tested from the outside.

Any model provider

Swap between Anthropic, OpenAI-compatible and Gemini models without rewriting the tutor.

Next version, on the development branch

Crisis-first gate

A deterministic check for crisis language that runs before any model does.

Hybrid retrieval

Grounding in class materials, with deterministic checks that citations are real.

Agent loop & routing

A tutor agent, per-job model routing with provider failover, and server-side grading.

Stack
React + ViteVercelSupabase PostgresRow-level securityDeno edge functionspgvectorTypeScript

Where it actually is

INKY is in private beta and isn't in classrooms yet. Before it can be, it needs finished legal review, parental consent flows and signed data agreements, so I don't call it FERPA or COPPA compliant. That work comes first because the users are kids. The numbers above come from the development branch, and they count code, not students.

Anik Sahai · about · projects