13. Advanced Retrieval Techniques
Beyond plain top-k — metadata filtering, MMR for diversity, small-to-big retrieval, and parent-document retrieval.
Beyond plain top-k — metadata filtering, MMR for diversity, small-to-big retrieval, and parent-document retrieval.
One question, many phrasings — generating query variants to widen recall and catch chunks a single wording would miss.
How to merge multiple ranked result lists into one — the RRF formula, why it drops scores and keeps ranks, and a clean implementation.
Combining dense (vector) and keyword (BM25) retrieval so you get both semantic recall and exact-match precision.
Part 3 of the learning path — Retrieval-Augmented Generation in 17 sections, from first principles to production retrieval, each with summary points, code, and diagrams.
Implementing the retriever — embedding the query, finding the nearest chunks, and the top-k / threshold knobs that control quality.
The math that ranks chunks — cosine similarity, why it ignores magnitude, and why normalized vectors let you use a fast dot product.