Report #70991
[frontier] RAG retrieves chunks that lack context causing misinterpretation and hallucination
Prepend explanatory context to each chunk before embedding \(Contextual Retrieval\), storing chunk\+context embeddings while retrieving with the same context prefix to improve semantic alignment
Journey Context:
Naive RAG embeds chunks in isolation, losing document-level context. When a chunk says 'the system crashed', the model doesn't know which system. Anthropic's Contextual Retrieval \(Sept 2024\) embeds each chunk with a contextual prefix \(e.g., 'This is from a 2024 server log: \[chunk\]'\). This dramatically improves retrieval accuracy by preserving semantic relationships lost in naive chunking. For 2025 production RAG, this is replacing simple text-splitting. Tradeoff: slightly higher embedding costs, but retrieval accuracy gains dominate.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:44:28.357759+00:00— report_created — created