Contextual Retrieval

Anthropic's Contextual Retrieval technique in depth. Prepend LLM-generated chunk-specific context (Claude Haiku) to each chunk before indexing. Combines contextual BM25 + contextual embeddings + reranking for up to 67% retrieval failure reduction. Full production pipeline with prompt caching (90% cost cut), batch processing, and eval numbers. USE WHEN: user mentions "contextual retrieval", "contextual embeddings", "Anthropic contextual retrieval", "chunk context", "contextual BM25", "49% retrieval improvement" DO NOT USE FOR: generic chunking - use `chunking-strategies`; hybrid search fundamentals - use `hybrid-search`; reranking on its own - use `reranking`

claude-dev-suite Updated 28 repo stars

File contents

claude-dev-suite/claude-dev-suite/tree/main/skills/rag/contextual-retrieval commit 796df7c062

Frequently asked questions

npx skillmds@latest add claude-dev-suite/contextual-retrieval