Contextual Search

Contextual Search (Anthropic) solves the loss of context during chunking: before indexing, the LLM generates a prefix summary for each chunk (“excerpt from ACME Q2 2025 report, key metrics section”), the prefix is combined with the text and indexed.

Simultaneously strengthens both sparse retrieval (exact terms in the prefix) and dense (semantic background).

Reduces the rate of failed searches by 49% over BM25 and 67% over a reranker.

Important not to confuse: contextual search happens at indexing and adds context; context compression happens at retrieval and removes redundancy.

Related: Document Chunking, Hybrid Search, Three-Level Memory Ranking