Anthropic's Contextual Retrieval helps search recover document fragments that lose their meaning when separated from the surrounding text. Before indexing, a model adds a short explanation of each fragment's place in the whole document. Both meaning-based search and exact-word search then use that enriched text.
In its reported experiments, averaged across test collections that included codebases, fiction and scientific papers, combining those two contextualized searches reduced the top-20 retrieval failure rate from 5.7% to 2.9%. That measures how often relevant material failed to appear among the 20 retrieved fragments, so it concerns the search step itself rather than the quality of final answers.
Terms in this piece · Glossary
chunking — Splitting documents into passages small enough to embed and retrieve individually — the step that quietly determines whether retrieval works at all.
context window — The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
reranking — A second pass that re-scores retrieved candidates by reading each one against the query, fixing the ordering that fast vector search got approximately right.
prompt caching — Reusing the model's processed form of a repeated prompt prefix so subsequent calls skip re-reading it, cutting cost and latency substantially.