An AI learning platform built on Maharashtra's own textbooks
Designed for schools across Maharashtra, state board and CBSE. Chapter tests, a tutor that only answers from the textbook, and teacher dashboards, built so a child's data never reaches a model.
- Spend model calls per chapter, not per student. Then cost grows with the syllabus, not with enrolment.
- The generator should not grade its own homework. A second, cheaper model checks every question.
- With minors, privacy is a product feature. The model never sees a name, roll number, answer or score.
Every school in Maharashtra teaches from a fixed set of textbooks: Balbharati for the state board, NCERT for CBSE. Teachers find out what a class did not understand only after the term exam, when it is too late to re-teach. The idea behind this platform is simple: test every chapter when the class finishes it, score it instantly, and show the teacher where the gaps are while the chapter is still fresh.
It is designed to work for any school in the state, on either board, in English or Marathi.
The problem#
Three things make this harder than “add AI to a quiz app”:
- The content has to be the textbook, not the internet. A question or explanation that goes beyond the syllabus is wrong for that classroom, even if it is factually true.
- The users are minors. Their data is a special category under India’s DPDP Act 2023, they can’t opt out of school, and they can’t churn. “Collect everything and decide later” is not acceptable.
- Cost has to work at state scale. If every test or every student triggers a model call, cost grows with enrolment and the product can’t scale.
Key decisions#
- One question bank per chapter, shared by every school. Generation runs once per chapter and the bank is reused. With roughly 70 chapters in a first rollout, cost depends on the syllabus, not on how many children sit the test.
- Scoring uses no model at all. Tests are timed MCQs that a teacher unlocks in the room. Scoring is deterministic and instant.
- A generator and a separate verifier. GPT-5 writes a chapter’s questions, and o4-mini checks each question against the chapter text. Measured cost: $0.12 and about 2.5 minutes per chapter, with verification at 44% of that cost. In a test with 16 deliberately wrong answers planted, the verifier caught all 16.
- The board is data, not code. Each school belongs to one board, and that decides which books its children can open. Adding a board means adding rows, not branching the code.
What I built#
- A corpus pipeline. 1,046 books ingested, split into 4,020 chapters and 44,092 chunks across 81 subjects, in Postgres with pgvector. Embeddings (bge-m3) are computed locally on CPU. On Apple’s MPS backend, the same text came back as a different vector depending on its batch, without any error, so “CPU only” is now an invariant with a test behind it.
- A bounded tutor. A student can ask a doubt about the chapter they are on. The tutor retrieves from that chapter first and refuses anything the chapter does not answer. It is off by default and keeps nothing a child types. Its eval set has 55 questions per chapter: 40 answerable, 10 outside the chapter and 5 about people or marks. Release thresholds were set before the first run, for example 100% refusal on out-of-chapter questions.
- Teacher and principal views. In the results grid, a red column is a teaching gap and a red row is a child who needs help. Remediation packs and an intervention tracker follow from there.
- Explainer videos for chapter sections, told three ways (simple, logical, story) and rendered on CPU so they cost little to produce.
- A Marathi interface alongside English.
Privacy by construction#
- The model only ever sees chapter text, never a child’s name, roll number, answer or score.
- Every table holding student data has row-level security, and a database switch turns off every cross-school ranking view the moment a real school is added.
- The platform runs on synthetic data only until a named data protection officer and a signed processing agreement are in place. The full demo has 12 schools, 690 synthetic students, 232 tests and 102,504 answers, and an end-to-end check runs every role through the live deployment after each release (80 of 80 passing, in English and Marathi).
What the audits found#
I count these as results too, because each one would have quietly hurt real students:
- 12.4% of the corpus was invisible to retrieval. Mostly tables, which were neither embedded nor searchable. It is now logged as a tracked gap rather than a hidden one.
- Higher-order questions fell short. The client’s goal was at least 15% “thinking-level” questions. By subject the generator produced 20%, 10% and 0%, with maths at zero. That is better than the first attempt (6%), but it does not meet the goal yet, and the eval report says so plainly.
- Eight Marathi and Hindi books had chapters but no text, because large print was being read as headings. Six were fixed; two are scans that still need OCR.
What’s next#
The riskiest assumption has not been tested yet: that a real teacher accepts or lightly edits at least 80% of the generated questions. That needs a named teacher grading a real question sheet, and it is the one test that could change the product. Everything else is built and waiting for it.
- Postgres + pgvector (Supabase)
- bge-m3 embeddings on CPU
- Express on AWS Lambda
- React
- GPT-5 + o4-mini
- AWS S3