Term
Contextual Retrieval
Contextual Retrieval is an Anthropic RAG technique that prepends an LLM-generated context sentence to every chunk before indexing — sharply raising retrieval quality.
Contextual Retrieval — explained in more detail
Classic RAG splits documents into chunks and embeds them in isolation — losing the link back to the surrounding document. A chunk like “revenue rose 12%” carries no meaning without its chapter and quarter. Contextual Retrieval has an LLM (e.g. Claude) generate a short context sentence for every chunk before indexing, anchoring the chunk inside the document, and prepends it to the chunk text. The enriched text is then written into both a vector index (contextual embeddings) and a BM25 index (contextual BM25) — both run in parallel and their hits are merged.
Example / Practical context
Anthropic reports 35% fewer retrieval failures from contextual embeddings alone, 49% with contextual embeddings combined with contextual BM25, and 67% on top of that when a reranker is added. The one-off indexing cost — one LLM call per chunk — amortises because the index is static and only needs rebuilding on updates. Prompt caching cuts costs further, since the source document gets reused across the per-chunk LLM calls.
Distinction from related concepts
Query expansion operates at query time and enriches the search query; contextual retrieval operates at indexing time and enriches the chunks being searched. Reranking runs after retrieval and re-orders hits without touching the index. In practice all three can be stacked.
Entdecke mehr
AI Workflows by Keyword: How We Make Recurring Routines Enforceable
A typed keyword triggers a fixed AI routine — and every single step must be committed before the next one appears. Why that's the actual trick.
GlossarS-RAG
S-RAG (Search-optimized RAG) is boostN.ai's take on Retrieval-Augmented Generation. It extends classic RAG with search-engine principles: relevance ranking, recency decay and typed links between chunks for deterministic follow-up retrieval.
LexikonRAG Tuning and Balancing — Embeddings, Weights, Decay and MCP for Advanced Setups
How to steer retrieval on purpose: embedding choice, hybrid weights, reranker cascades, time decay, authority boost, MMR and MCP as a retrieval tool.