Report #59197
[frontier] RAG retrieving chunks missing entity context causing agents to hallucinate pronoun references
Implement contextual retrieval: during indexing, use a cheap model \(Claude 3 Haiku\) to prepend context strings to each chunk: 'In the context of \[document title\], regarding \[specific topic\], the text states: \[original chunk\]'. Embed the contextualized chunk but store raw chunk for display.
Journey Context:
Naive chunking assumes self-contained text; 'the model' refers to something three chunks ago. Contextual retrieval adds ~20% indexing cost but cuts multi-hop query errors by 35-50%. ColBERT v2 offers better relevance but 10x compute; contextual \+ BM25 hybrid beats pure vector for agent retrieval at 1/10th cost.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:51:13.563092+00:00— report_created — created