KT
AboutWorkExperienceWritingContact
← All posts

RAG for exam prep: lessons from PrepMate AI

Sep 27, 2026 · 5 min read

  • AI
  • RAG
  • Next.js

PrepMate turns a student's notes and syllabus into practice questions and summaries. The model is the easy part. Getting the right context in front of it is where the quality comes from.

Chunk by meaning, not by size

Fixed-size chunks split definitions from their examples. Splitting on headings and paragraph boundaries, with a small overlap, kept related ideas together and made retrieved context far more coherent.

Retrieve, then re-rank

Vector search gets you candidates; a cheap re-rank against the actual question picks the few that matter. Fewer, better chunks beat a long noisy context both on quality and on cost.

Ground the output

Every generated question carries a pointer back to its source chunk. Students can check the answer against their own notes, which builds trust and makes bad generations easy to spot.