◉ Grounded AI: An Interactive RAG Tutorial Series
Ten chapters, one running example (a company employee handbook), built from scratch. Every chapter follows the same shape: something breaks, you see exactly why, one fix gets introduced, and that fix reveals the next problem. The series is organized into four phases, each one building directly on the last.
Foundations · Chapters 1-3¶
Word-matching retrieval, embeddings, and chunking: the minimum ideas any RAG system needs before it can answer a single question well.
A general-purpose model has never seen your documents, so it can only guess at answers specific to them.
Word-matching retrieval misses paraphrases like “holiday” vs “vacation” because it only compares spelling.
Embedding an entire multi-topic document as one vector dilutes the one fact that actually matters.
Building a grounded system · Chapters 4-5¶
Actually calling a model, and making sure a reader can check what it says instead of just trusting it.
Retrieval has been built three different ways, but nothing has actually generated an answer with a real model yet.
A generated answer with no visible source is impossible for a reader to check.
Better retrieval · Chapters 6-8¶
Scaling search past a handful of chunks, and two genuinely different ways retrieval still gets things wrong.
Comparing a question against every chunk one at a time stops being fast once there are millions of them.
Semantic retrieval understands meaning but sometimes loses exact identifiers, like a number or a code.
A bi-encoder’s averaged comparison can wash out the one decisive word in a question.
Evaluation & integration · Chapters 9-10¶
Measuring instead of arguing from examples, then assembling everything into one system and finding its real limits.