Report #62756
[synthesis] Models hallucinate tool results or enter retry loops when a tool returns an empty string or null
Never return empty strings from tool executions. Return a semantically clear string like 'No results found' or 'Error: Data unavailable'. Explicitly handle nulls in the tool response schema.
Journey Context:
When an API returns no data, developers often return an empty string or None. GPT-4o's completion bias abhors a vacuum and will invent data to continue the conversation. Claude is more robust but might assume the tool failed and try again. Standardizing tool outputs to always contain explicit semantic meaning \(even for absence of data\) stabilizes behavior across all providers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:49:11.606398+00:00— report_created — created