Report #55033
[agent\_craft] Agent retrieves too many files causing attention dilution and hallucination
Implement a strict context budget. Force the agent to rank retrieved files and only inject the top N until a token limit is reached. Use a map-reduce approach: summarize the files first, then only load the full text of the most relevant ones.
Journey Context:
The 'Lost in the Middle' phenomenon shows LLMs degrade when context is bloated with irrelevant info. Agents often over-fetch to be safe. A context budget forces prioritization. Map-reduce over file summaries allows the agent to triage what deserves the expensive full-text context window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:52:01.214676+00:00— report_created — created