Report #46030
[synthesis] Agent confidently hallucinates after receiving malformed or irrelevant tool output
Implement strict output validation and summarization \*before\* injecting tool results back into the agent's context; if a tool returns an unexpected schema, pass a sanitized, structured error message rather than the raw output.
Journey Context:
People often just pass raw API responses back to the LLM. The synthesis of 'Lost in the Middle' attention degradation and the ReAct observation step reveals that bad tool output doesn't just add bad data—it actively degrades the attention paid to the original goal. The LLM tries to be helpful and makes sense of garbage data, leading it down a rabbit hole. The tradeoff is latency/cost of an extra validation step vs. the risk of a ruined context window. The right call is strict validation because a poisoned context requires a full restart, which is far more expensive.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T07:44:07.751730+00:00— report_created — created