{
  "id": "contextual-retrieval",
  "code": "PTL-0132",
  "term": "Contextual Retrieval",
  "aliases": [
    "contextual embeddings",
    "contextual BM25",
    "chunk contextualization"
  ],
  "category": "retrieval-tools",
  "definition": "Contextual retrieval is a RAG preprocessing technique in which a language model writes a short explanation of where each chunk fits in its source document and prepends it to the chunk before the chunk is embedded and indexed for keyword search.",
  "description": "Splitting removes context, so a chunk such as \"revenue grew 3% over the previous quarter\" no longer says which company or quarter it describes. Adding that context back improves both embedding and BM25 matching. Anthropic reported that contextual embeddings plus contextual BM25 cut the top-20 retrieval failure rate by 49% on its benchmarks, and by 67% with reranking added. Prompt caching keeps the cost of generating the context for every chunk low.",
  "example": null,
  "broader": [],
  "narrower": [],
  "related": [
    "chunking",
    "bm25",
    "hybrid-search",
    "reranking",
    "prompt-caching"
  ],
  "introduced": 2024,
  "added": "2026-10-10",
  "sources": [
    {
      "title": "Introducing Contextual Retrieval",
      "authors": "Anthropic",
      "year": 2024,
      "url": "https://www.anthropic.com/news/contextual-retrieval"
    }
  ],
  "url": "https://protologue.com/t/contextual-retrieval/",
  "citation": "Protologue. (2026). Contextual Retrieval. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.4.0, PTL-0132). https://protologue.com/t/contextual-retrieval/"
}