Skip to main content
All terms
Patterns

Contextual Retrieval

Adding a short context blurb to each chunk before indexing so retrieval is more accurate.

Definition

Contextual retrieval improves RAG by prepending a short, model-written description of where each chunk came from before indexing it. Giving isolated chunks back their context — which document and section they belong to — makes them much easier to retrieve correctly. The approach was popularized by Anthropic.