Report #59137
[frontier] Agent retrieves irrelevant chunks from large document stores causing hallucinations
Prepend document-level context to each chunk using Contextual Retrieval: embed 'context \+ chunk' but retrieve on chunk, store context separately for reconstruction
Journey Context:
Naive RAG embeds chunks in isolation losing document context; many try larger chunks or overlap but hit token limits. Contextual Retrieval generates a context string \(using an LLM\) for each chunk that describes the document and section, then concatenates for embedding. This beats naive RAG by ~20% on retrieval accuracy without increasing chunk size. The cost is one-time LLM processing for context generation. Wrong approach: thinking bigger chunks solve context loss; they just introduce noise.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:45:05.011751+00:00— report_created — created