RAG & Embeddings
Put a number on the retrieval
Everyone can draw the pipeline. Almost nobody can say what theirs scores. This is the arithmetic: what two vectors actually rank, what a chunk setting actually produces, what the index quietly dropped, and what recall at five means on a result you are holding.
- Modules
- 5
- Drills
- 10
- Build steps
- 4
- Time
- ~4h
Walk out able to
Read a retrieval system you have never seen, write down four integers about it, and say which line of its configuration produced each one.
What you drill
Similarity, by hand
Cosines, lengths, and the ranking one division changes.
Search and what it drops
Approximate recall, and fusing two ranked lists.
Chunks and their edges
Counts, overlap cost, and the boundary that ate the answer.
Measuring, then pricing
Recall, precision, first hit — and what moving them costs.
The pitch
What you practise, and what you leave with
A retrieval bench you run yourself — a ranker, a sentence-aware chunker, and the numbers they print — plus a reflex for scoring a system cold.
You will practise
- Cosines, lengths and what normalising moves
- Index recall, and fusing two ranked lists
- Chunk counts, overlap cost and boundaries
- Recall, precision, first hit, and the price
Afterwards you can
- Compute a cosine from two stated vectors
- Count what an approximate index dropped
- Say which chunk the answer landed in
- Score a ranked result and price a fix
Modules
5 modules, 21 items
Lessons explain one idea. Drills repeat it until it sticks. Build steps make something that exists afterwards.
- 1
Measure meaning with a vector
~42 minCompute a similarity by hand, and say which ranking normalising changes.
- LessonWhat retrieval actually decides4 min
- LessonRank passages by hand13 min
- DrillCompute a cosine as a percent13 min
- DrillSay what normalising changed12 min
- 2
Search without scanning
~58 minCount what an approximate index dropped, fuse two rankings, and rank a corpus yourself.
- LessonTwo stages, and what each costs13 min
- DrillCount what the index dropped11 min
- DrillFuse two ranked lists13 min
- Build stepRank a corpus you generated12 min
- Build stepSee the two metrics disagree9 min
- 3
Split without losing the answer
~1hCount the chunks a setting produces, and name the chunk a given sentence landed in.
- LessonLose the sentence that answered14 min
- DrillCount what a setting produces13 min
- DrillFind the chunk the answer is in14 min
- Build stepChunk by sentence, and count11 min
- Build stepRead what greedy packing left8 min
- 4
Name the stage that failed
~38 minRead a symptom, say which stage lost the answer, and price the fix in its own unit.
- LessonRead the symptom, name the stage13 min
- DrillName the stage that failed13 min
- DrillCost the cascade12 min
- 5
Measure it, or it is a demo
~1hCompute the ranking metrics by hand, pick the right one, and score a whole system cold.
- LessonThree numbers, not one14 min
- DrillScore a ranked result13 min
- DrillPick the metric that fits11 min
- LessonScore a system you have not seen22 min
More in AI & machine learning
Keep going
Retrieval is arithmetic. Do the arithmetic.
The first item is free. ~4h of focused work, at your own pace.
Intermediate~4h5 modules