Report #85681
[frontier] Vector RAG retrieval fails on boundary splits losing document context
Implement Contextual Retrieval: prepend chunk-specific explanatory context to each embedding using a cheap LLM before storage
Journey Context:
Naive RAG splits documents blindly, destroying semantic context at boundaries \(e.g., 'the defendant' becomes orphaned\). Anthropic's Contextual Retrieval uses an LLM \(Claude 3 Haiku\) to generate 'contextualized chunks' where each chunk is prepended with metadata about the surrounding document. This beats HyDE and cross-encoder reranking alone with 67% fewer false negatives. Cost is ~1% increase in embedding costs for 20%\+ recall improvement. Essential for legal/medical docs with dense citations where boundary information is critical.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:24:03.681517+00:00— report_created — created