AN Alpesh Nakrani
BlogBooksPraiseAbout Work with me →
All books
Retrieval That Survives Contact cover
2025 / Free online book · Field Manuals

Retrieval That Survives Contact

RAG for a corpus that won't sit still

Access
Free
Chapters
11
Read time
127 min

Retrieval looks solved in the first week and broken by the first quarterly review. The culprit is almost never the model. It is distribution shift in the corpus and the questions. This manual covers chunking, reranking, query rewriting, and the measurement that tells you which one to fix.

The demo retrieves perfectly; month three it collapses. Building retrieval that holds as the corpus grows and the queries drift.

This edition is free to read onsite. Each chapter has its own URL, so readers can bookmark, share, and return to the exact section they need.

Table of contents
INT Introduction: The Corpus Moved Retrieval is not a one-time index, it is an operating system for a corpus that keeps moving. 8 min 01 The CORPUS Inventory You Skipped Before you embed a single document, you have to know what you actually have, who owns it, and whether you are even allowed to surface it. 12 min 02 Parsing Is Part of Retrieval The quality ceiling of your retrieval system is set the moment a document becomes text, and most teams lose meaning there without noticing. 10 min 03 Chunking Documents That Won't Sit Still A chunk is the unit your system actually retrieves, and the Chunk Boundary Test decides whether it carries enough meaning to be useful alone. 10 min 04 Dense, Sparse, Hybrid, and Late Interaction Every retrieval method has a blind spot, and a corpus that won't sit still will find it; the fix is a stack, not a single method. 10 min 05 Rewriting the Question Before You Answer It The query the user types is rarely the query the corpus can answer, and the gap between them is where most recall is lost. 10 min 06 Reranking and Context Assembly Getting the right chunk into the candidate set is recall; getting it into the few slots the model actually reads is a separate, equally hard job. 9 min 07 Metadata as Operational Control Metadata is the control plane of a living index, the difference between retrieving a vector and retrieving the right, current, authorized vector. 9 min 08 Permissions Before Retrieval If access control runs after the search instead of before it, your retrieval system is a confidential-data leak waiting for the right query. 9 min 09 Freshness, Versioning, Deletion, and Reindexing A corpus is a living system, and an index that does not discover, refresh, and retire documents on a schedule is drifting toward wrong by default. 11 min 10 Evaluating Retrieval Apart from Answers If you only measure the final answer, you cannot tell whether retrieval or generation broke, and you will keep fixing the wrong half. 11 min 11 Where the Answer Begins Most RAG failures are retrieval failures wearing a model's clothes, and the Retrieval Failure Chain tells you which link broke. 10 min END Conclusion: Current, Authorized, Useful The standard for a retrieval system that survives contact is one line: a current, authorized, useful corpus, or no trustworthy answer. 8 min