Report #96457
[synthesis] Models Hallucinate Data When Tool Returns Empty or Null Results
Never return empty strings, nulls, or empty JSON objects from tool executions. Always return a semantically explicit string like 'No results found for the query.'
Journey Context:
Handling 'void' responses is a hidden trap. When a tool returns an empty result \(e.g., a database query yielding \[\] or null\), Claude 3.5 Sonnet tends to 'fill the void' by hallucinating plausible data or apologizing unnecessarily. GPT-4o usually handles nulls gracefully, accurately reporting no results. Gemini 1.5 Pro may misinterpret the null as a tool execution failure and retry. Providing explicit semantic feedback prevents Claude's hallucinations and gives Gemini clear context to proceed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T20:29:15.235465+00:00— report_created — created