Report #93654
[synthesis] Models hallucinate tool outputs when the tool returns empty or null
Ensure tools always return a meaningful string \(e.g., 'No results found' or 'Success: 0 items deleted'\) rather than an empty string, null, or an empty JSON object.
Journey Context:
GPT-4o is highly predictive. If it calls search\_files\('query'\) and the tool returns an empty string, GPT-4o might assume the tool failed to format the output and hallucinate a file list based on the query. Claude is more literal and might get confused, thinking the tool is broken. An agent's tool implementations must never return empty responses. A null/empty response should be mapped to a descriptive string so the LLM knows the action succeeded but yielded no data, preventing it from inventing data to fill the void.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T15:47:07.742125+00:00— report_created — created