Inspiration

I grew up in Tanzania. In primary school you learn in Swahili; in secondary school every subject switches to English, and you sit the NECTA national exams in a language you're still learning. Students understand the math but get stuck on the words. Now in New York, I see the same gap with English learners in public schools. Private tutoring is out of reach for most of these families, and AI chatbots give answers, not diagnosis, and rarely in the student's language or curriculum.

Somo is Swahili for "lesson."

What it does

  1. Snap a photo of a problem and your handwritten working.
  2. Somo circles the first wrong line in red pen, like a teacher would, with a short note in your language.
  3. You confirm what Somo read before it teaches anything.
  4. A lesson streams in English, Swahili or Spanish: the idea in plain words, where it went wrong, an analogy from your world (a market scale in Dar es Salaam, a subway swipe in New York), a worked example with different numbers, and the English exam terms you'll need.
  5. A check question follows. Wrong: Somo re-explains more simply with a new analogy. Right: practice like the real exam with an actual NECTA or NY Regents past-paper question, found live on the web.

How I built it

  • Gemini reads handwriting and diagnoses the mistake with structured output, verifies the answer with a second, independent solve, and streams the lessons.
  • Gemma 4 grades answers quickly and cheaply.
  • Nimble searches official NECTA and Regents past-paper sites; Somo downloads the papers, reads their full text, and picks a real question on the same topic.
  • Claude takes over automatically through a circuit breaker when Gemini is overloaded.
  • Sentry traces every model and web call and flags each failover.
  • FastAPI backend with streamed lessons; verification, question prep and the past-paper search run in parallel while the lesson streams.
  • A single-file mobile interface designed like a school exercise book: grid paper, a red margin line, and a teacher's red pen.

Challenges I ran into

  • Gemini's free quota ran out mid-build. We built multi-provider failover with a circuit breaker, and diagnosis went from about 116 seconds to about 10.
  • Verification can't catch reading errors. When a photo is ambiguous, both model calls agree on the same wrong reading, so we added a human-in-the-loop confirm step.
  • Search results for PDFs are short summaries, so Somo downloads and reads the full papers itself.
  • Our own pipeline mislabeled a UK worksheet as a "real exam" question. We added honest source labels (past paper, web practice, or written by Somo) and a check that the question tests the same concept.
  • Sentry's trace showed one NECTA server taking 3.6 minutes to send a PDF. The timeout was per chunk, so a slow trickle never tripped it. We added a hard 12-second deadline per file.

Accomplishments that I'm proud of

  • On all three handwritten test problems, Somo found the exact wrong line and verified the correct answer.
  • It pulled a real question from the NECTA CSEE 2023 Basic Mathematics paper for a student who had just fixed their mistake.
  • Every question Somo shows says honestly where it came from.

What I learned

Reliability is most of AI engineering: verification, failover, honest labeling and tracing mattered more than any single prompt. And the best safeguard against a misread photo was simply asking the student.

What's next for Somo

  • An offline mode on Gemma for classrooms without internet
  • Full NECTA Form 1–4 and Regents syllabus coverage
  • The sciences, where the vocabulary gap is widest
  • A teacher view of the most common mistakes in a class
  • Pilots with schools in Dar es Salaam and New York, measured on whether students fix their own mistakes.

Built With

Share this project:

Updates