AI & ML
Retrieval and Grounding
Part of Language, level 5. About 13 hours of study across the topics below.
1Search
- Semantic EmbeddingsSentences as vectors: meaning geometry for retrieval. 1–2 h
- Similarity SearchNearest neighbors at scale: exact scan vs approximate indexes. 1–2 h
- Lexical Retrieval: BM25The strong sparse baseline: term frequency with saturation and document-length normalisation. 1–2 h
- Approximate Nearest Neighbor IndexesGraph and partition indexes (HNSW, IVF, product quantisation) that trade exactness for speed at scale. 1–2 h
- Hybrid Retrieval and Rank FusionCombining lexical and dense retrievers and merging their rankings with reciprocal rank fusion. 1–2 h
- Training Dense RetrieversBi-encoders trained contrastively on query-passage pairs, with hard negatives doing most of the work. 1–2 h
2Evidence
- ChunkingSplitting documents for retrieval: boundaries, overlap, and the trade-offs. 1–2 h
- RetrievalQuery to evidence: scoring chunks and returning the top-k. 1–2 h
- RerankingCheap first, precise second: the retrieve-then-rerank cascade. 1–2 h
- Evaluating Retrieval-Augmented GenerationSeparating retrieval quality from generation quality: context recall, faithfulness, and answer correctness. 1–2 h
3Grounding
- Retrieval-Augmented GenerationConditioning on evidence: retrieved context changes what generation may say. 1–2 h
- Grounding and CitationClaims pinned to sources: support mapping and its limits. 1–2 h
- Query Transformation and Multi-Hop RetrievalRewriting, decomposing, and iterating queries when one retrieval step cannot find the evidence. 1–2 h
