How to give a language model access to a hundred thousand documents without ever putting a hundred thousand documents in the prompt. Every number on screen is real output — nothing here is an illustration.
Behind this: an embedding space. Every few seconds one point becomes a query and reaches for its nearest neighbours — which is all retrieval is.
The same lesson, cut two ways. Same rigour, the same eight terminal demos, the same code — the short edit just carries fewer slides around them. Neither is a summary of the other; either works on its own.
Why RAG, both pipelines, what an embedding really is, the build, and the mistake that fails silently. All eight demos. Two playgrounds.
Full lesson · 54 slides · ~78 minPlus the reference tables, the loader gotchas, the re-run trap, troubleshooting, the check-yourself drills, and all five playgrounds.
All 54 slides as a document, self-paced, with what the presenter says under each one and the playgrounds where they belong. Reads properly on a phone. Prefer slides? The deck has the same narration on T.
Presenting or recordingPress S for the speaker window — notes, a timer, and the next slide on your second monitor. Plus every demo cue in order, so you know when to switch to the terminal.
Not one. People collapse them in their heads, and that is exactly where the mental model breaks. Ingestion runs once, ahead of time. Retrieval runs on every question.
The same embedding model appears in both rows. That is not a drawing shortcut — and the last playground breaks it on purpose to show you why.
They run in your browser. No API key, no sign-up, no install. Two of them are driven by real precomputed OpenAI vectors.
Drag from one megabyte to one petabyte and watch the cost, the token count, and the number of context windows you would need.
Playground 02 · real vectorsClick any word. Watch twelve real embeddings re-rank themselves by meaning — and see the clusters nobody labelled.
Playground 03Drag chunk_size and chunk_overlap and see the seams move,
the duplication climb, and sentences get cut in half.
Type a question, move top k, and read the exact prompt that would reach the model. Then ask something the documents cannot answer.
Playground 05 · real vectorsFlip the model that embeds the question. Same store, same question — and retrieval quietly falls apart with zero errors raised.
The full lessonThe theory and the build, end to end, as one document you can read straight through — with every playground in place.
Every terminal block in the lesson is pasted from a real run. Where reality disagreed with the source material, the lesson says so:
The retrieval playground scores with character-trigram vectors so it runs with no key — the mechanism is identical, and the page says so rather than implying otherwise.
The whole thing is a repo. One entry point, eight demos, and the finished sixty-line pipeline. Costs well under a cent in embeddings.
# clone it, then:
./run.sh setup # venv, packages, documents
./run.sh check # preflight, tests your API key
./run.sh slides # this deck, locally
./run.sh demo 5 # chunking, in the terminal
./run.sh demo all # all eight, in order