Contextual retrieval
Contextual retrieval prepends a chunk's surrounding context (document title, section, summary) to each chunk before embedding, dramatically improving retrieval relevance on long documents.
In more detail
What it means
Introduced by Anthropic in 2024 and now standard in 2026 RAG stacks, contextual retrieval addresses a core RAG failure: a chunk that says "the company recorded record revenue" is ambiguous without knowing which company and which quarter. The fix: prepend a model-generated summary of the chunk's surrounding context ("From Acme Corp's Q3 2025 earnings call: ...") before embedding. Empirically reduces retrieval failure rates by 35-67% on long-document corpora vs naive chunking. Pairs naturally with hybrid (vector + BM25) and re-ranking for state-of-the-art retrieval in 2026.
Part 1 of 2
When to use it, and when not
Use it for
- RAG over long structured documents (earnings calls, legal filings, books).
- Multi-document corpora where chunks lose meaning without context.
Part 2 of 2
Common mistakes
- Generating context with a weak model — degrades the signal.
- Forgetting that re-embedding the corpus is required when the contextualisation prompt changes.
FAQ
Questions readers ask.
What is contextual retrieval?
Contextual retrieval prepends a chunk's surrounding context (document title, section, summary) to each chunk before embedding, dramatically improving retrieval relevance on long documents.
When should you use contextual retrieval?
RAG over long structured documents (earnings calls, legal filings, books). Multi-document corpora where chunks lose meaning without context.
What are the common mistakes with contextual retrieval?
Generating context with a weak model — degrades the signal. Forgetting that re-embedding the corpus is required when the contextualisation prompt changes.
Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/contextual-retrieval.md. Found a mistake? Tell us.