Retrieval & RAGintermediate11 min · 9 steps
Contextual Retrieval
Before indexing a chunk, prepend a short note on where it came from — and cut retrieval failures by up to two-thirds.
top-20 failures5.7%
requesterrordatatoken
metrics are illustrativeProblemStep 1 of 9
Chunk 17 no longer says what it's about
Acme's Q3 report says “The Standard plan costs $200/month.” After chunking, chunk 17 reads only “It costs $200/month.” A user asks “How much does Acme's Standard plan cost?” — and the chunk contains none of “Acme”, “Standard” or “plan”.
This is context dilution. Anthropic measured a 5.7% top-20 retrieval failure rate with traditional chunking: roughly 1 query in 18 misses information that is in the knowledge base.
Lesson 10 of 37 in Retrieval & RAG