Jargonautica
Retrieval and Knowledge

Contextual Retrieval

Adding a sentence of surrounding context to each chunk before it is indexed, explaining what document and section it came from. It fixes the most common retrieval failure, where a chunk is perfectly relevant but contains none of the words that identify the topic, and it is cheap to implement.

Technical view

Prepends a model-generated, document-aware description to each chunk prior to embedding and indexing, substantially reducing failed retrievals. Cost is one generation pass per chunk at index time, mitigated by prompt caching of the source document. Combines additively with hybrid search and reranking, and is generally the highest-return single change to a mediocre retrieval pipeline.


Part of AI Terminology Index, section: Retrieval and Knowledge.

How it connects

Contextual Retrieval links to 4 other terms. The faint lines are links between those terms. See it in the full graph.

Retrieval Augmented GenerationRetrieval Augmented…ChunkingChunkingRetrieval MetricsRetrieval MetricsCachingCachingContextual Retrieval