Report #70304
[agent\_craft] Agent retrieves 20 chunks of code via RAG, but the relevant answer is only in 1 chunk, causing confusion and hallucination
Limit retrieval to top-k=3 to 5 chunks. If unsure, use an iterative retrieval approach \(retrieve a few, evaluate, retrieve more if needed\) rather than a single massive dump.
Journey Context:
More context isn't always better. The 'needle in a haystack' problem is exacerbated when you add more hay. Iterative retrieval allows the agent to narrow down its search, maintaining a high signal-to-noise ratio in the context window, at the cost of additional tool call rounds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T00:35:10.832104+00:00— report_created — created