Retrieval & RAG
Vector stores, hybrid retrieval and reranking, and when to retrieve instead of fine-tune.
14concepts
161flashcards
115minutes of reading
- 01 Choosing and Adapting an Embedding Model Why the top of the MTEB leaderboard is a bad way to pick an embedding model, what dimension, context length, and asymmetry actually cost you in production, and when fine-tuning on your own hard negatives beats buying a bigger model.
- 02 Chunking Strategies for Retrieval Why the unit you index decides the ceiling on retrieval quality, how fixed, recursive, semantic and contextual chunking differ, and what each one loses.
- 03 Contextual Retrieval and Chunk Augmentation Chunks lose the context that made them meaningful; prepending a short LLM-written situating sentence to each chunk before embedding cuts retrieval failures by roughly a third, and the technique only became affordable because of prompt caching.
- 04 Fine-tuning vs RAG When to teach the model new behaviour vs when to retrieve fresh context at runtime.
- 05 Hybrid Retrieval - BM25 + Vector + Reranking Why pure vector search misses exact-match queries, how RRF combines lexical and semantic results, and where a cross-encoder reranker buys back the precision you lost.
- 06 Query Transformation for Retrieval Why the user's question is often a bad search query, and how rewriting, decomposition, multi-query fan-out and HyDE close the gap between how people ask and how documents are written.
- 07 RAG Evaluation and Groundedness How to separate retrieval failures from generation failures, which metrics actually diagnose each stage, and why groundedness is measurable while helpfulness mostly is not.
- 08 Reranking and Cross-Encoders Why a second-stage model that reads the query and document together fixes most retrieval failures, what it costs in latency, and how to size the candidate set.
- 09 Retrieval Augmented Generation The end-to-end RAG pipeline from chunking through retrieval, reranking, and grounded generation.
- 10 Vector Databases Compared - pgvector, Qdrant, Milvus, Weaviate, LanceDB A practitioner's guide to picking a vector store, weighing index trade-offs against the operational cost of running yet another database alongside your primary store.
- 11 ANN Indexes: HNSW, IVF and PQ How approximate nearest neighbour indexes trade recall for latency and memory, what HNSW, IVF-PQ, ScaNN and DiskANN each optimise for, and why recall is a knob rather than a property.
- 12 Agentic and Iterative Retrieval Why a single retrieve-then-read pass cannot answer questions whose second search depends on the first result, and how retrieve-reason interleaving, self-reflection tokens, and search agents trade latency and cost for multi-hop accuracy.
- 13 GraphRAG and Community Summarisation Why top-k retrieval cannot answer "what are the main themes in this corpus", how building an entity graph and pre-summarising its communities turns a global question into a map-reduce over summaries, and what that indexing bill buys you.
- 14 Late Interaction and Multi-Vector Retrieval How ColBERT-style models keep one vector per token instead of one per document, why MaxSim recovers most cross-encoder quality at index-time cost, and what the storage bill looks like.