Report #29971
[frontier] Why does my RAG retrieve irrelevant chunks despite high vector similarity?
Prepend document-level context to each chunk before embedding and storage \(Contextual Retrieval\). Use an LLM to generate a concise context summary \(explaining the document and where the chunk fits\) for each chunk, then embed the combined context\+chunk text. Query against this enriched embedding space.
Journey Context:
Naive chunking loses document-level semantics; a chunk about 'the algorithm' is meaningless without knowing if it's from a sorting paper or cryptography manual. Contextual Retrieval \(Anthropic's 2024 pattern\) fixes this by embedding with surrounding narrative context. Tradeoff: increases storage \(2x embeddings\) and preprocessing time, but dramatically improves retrieval accuracy without changing the vector DB.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:41:50.915713+00:00— report_created — created