A narrated, hands-on workshop · ~70 min · for builders whose AI needs to know their documents
Teach your AI to read your documents.
Press play and we build retrieval together, piece by piece, on this page. Real vectors, real similarity scores, a real chunker, and — the part almost every course skips — a real measurement of whether any of it is working.
13 chapters · player controls live at the bottom
Ask the handbook a question
The document being searched is a seventeen-section support handbook embedded in this page. Nothing leaves your browser.
→
Without retrieval simulated model output
With retrieval computed live on this page
What is real here. The retrieval on the right — the chunk that comes back and the similarity score next to it — is computed in your browser from the handbook text, right now. The panel above it is a stand-in for what a model says when it has never seen your document; it is labelled simulated because that is what it is.
Ch. 1 / The first fork in the road ▶ narrated
Do not put your knowledge in the weights.
Two ways to make a model act like it knows your documents. They are not competitors — they solve different problems — but people reach for the expensive one first.
🏋️
Change the weights
Fine-tuning adjusts the model's parameters. It is very good at teaching behaviour: a house tone, a rigid output format, a classification boundary, a domain vocabulary.
TEACHES: HOW TO ACT
📎
Change the prompt
Retrieval finds the relevant passage at question time and pastes it into the prompt. The model reads it like a person reads a handed-over page.
TEACHES: WHAT IS TRUE TODAY
🕓
The deciding question
How often does the answer change? If a document edit must be reflected in the next question, that fact cannot live inside frozen weights.
FRESHNESS DECIDES
The honest version of the trade. Fine-tuning a fact into a model does not give you a lookup table. It nudges probabilities. The model may still produce a near-miss, and you will have no way to point at the source. Retrieval keeps the fact as text you can quote, cite, permission-check, and delete.
They compose. The strongest systems often do both: retrieval for what is true, a fine-tune or a well-drilled system prompt for how to say it. This workshop builds the retrieval half, because that is the half that decides whether the answer is right.
Ch. 2 / The mental model ▶ narrated
Turn text into a direction, then compare directions.
Every retrieval system does the same trick: it converts text into a list of numbers so that similar meaning becomes similar direction. Then finding relevant text is just finding the nearest direction. Try it — the number below is computed from what you type.
Cosine similarity—
Shared terms after stopword removal—
Dimensions in play (vocabulary)—
Press compute — the term-by-term contributions appear here.
Labelled honestly. These vectors are built from word statistics (TF-IDF), not from a learned embedding model. The geometry — direction, angle, cosine — is identical. What a learned embedding adds is that "refund" and "money back" end up pointing the same way even though they share no letters. We will hit that exact wall on purpose in chapter 10.
Ch. 3 / The first real skill ▶ narrated
Six steps. Two of them decide everything.
📄
1 · Ingest
Get the raw text out of PDFs, wikis, tickets, code.
→
✂️
2 · Chunk
Cut documents into retrievable pieces. Quietly decides your ceiling.
→
🧭
3 · Index
Turn each chunk into a vector and store it.
→
🔍
4 · Retrieve
Vectorise the question, rank chunks, take the top few.
→
🧱
5 · Assemble
Build one prompt: instructions, sources, question.
→
💬
6 · Answer
Model reads the sources and answers, with citations.
Steps 2 and 4 are the whole game. Ingest is plumbing. Assembly is craft. Generation is somebody else's model. If the right passage is not in the top few, nothing downstream can save the answer — and no amount of prompt polish will invent a fact that was never handed over.
OFFLINE
Ingest · Chunk · Index
Runs when documents change. Slow is fine. This is where you spend your care.
PER QUESTION
Retrieve · Assemble
Runs in milliseconds, thousands of times a day. Keep it lean and measurable.
THE PART YOU RENT
Answer
Any competent model will do if the context is right. Swap it freely.
Ch. 4–12 / Locked
That's the free preview.
You've heard the setup. The remaining 9 chapters are where
RAG From Scratch actually gets built — the guardrails, the hands-on builds, the
full narrated walkthrough and the end-of-workshop check.