AI & ML

Retrieval and Grounding

Part of Language, level 5. About 13 hours of study across the topics below.

Create free account

Semantic EmbeddingsSimilarity SearchLexical Retrieval: BM25Approximate Nearest Neighbor IndexesHybrid Retrieval and Rank FusionTraining Dense RetrieversChunkingRetrievalRerankingEvaluating Retrieval-Augmented GenerationRetrieval-Augmented GenerationGrounding and CitationQuery Transformation and Multi-Hop Retrieval

1Search

  1. Semantic EmbeddingsSentences as vectors: meaning geometry for retrieval. 1–2 h
  2. Similarity SearchNearest neighbors at scale: exact scan vs approximate indexes. 1–2 h
  3. Lexical Retrieval: BM25The strong sparse baseline: term frequency with saturation and document-length normalisation. 1–2 h
  4. Approximate Nearest Neighbor IndexesGraph and partition indexes (HNSW, IVF, product quantisation) that trade exactness for speed at scale. 1–2 h
  5. Hybrid Retrieval and Rank FusionCombining lexical and dense retrievers and merging their rankings with reciprocal rank fusion. 1–2 h
  6. Training Dense RetrieversBi-encoders trained contrastively on query-passage pairs, with hard negatives doing most of the work. 1–2 h

2Evidence

  1. ChunkingSplitting documents for retrieval: boundaries, overlap, and the trade-offs. 1–2 h
  2. RetrievalQuery to evidence: scoring chunks and returning the top-k. 1–2 h
  3. RerankingCheap first, precise second: the retrieve-then-rerank cascade. 1–2 h
  4. Evaluating Retrieval-Augmented GenerationSeparating retrieval quality from generation quality: context recall, faithfulness, and answer correctness. 1–2 h

3Grounding

  1. Retrieval-Augmented GenerationConditioning on evidence: retrieved context changes what generation may say. 1–2 h
  2. Grounding and CitationClaims pinned to sources: support mapping and its limits. 1–2 h
  3. Query Transformation and Multi-Hop RetrievalRewriting, decomposing, and iterating queries when one retrieval step cannot find the evidence. 1–2 h