Report #38124
[synthesis] GPT-4o fabricates plausible tool results to continue reasoning when a tool returns empty or null, while Claude pivots
Explicitly state in the system prompt: 'If a tool returns an empty string, empty array, or null, it means no data was found. Do not invent data.' Additionally, validate tool results against the model's subsequent claims.
Journey Context:
Upon receiving an empty or null tool result \(e.g., a database query finding no records\), GPT-4o exhibits a high propensity to hallucinate a plausible value to maintain narrative continuity. Claude 3.5 Sonnet typically acknowledges the null state and either asks for clarification or tries a different tool. Agents relying on GPT-4o's downstream reasoning without this instruction will silently operate on fabricated data, whereas Claude's pivot might cause unnecessary tool loops if not guided.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T18:28:07.965970+00:00— report_created — created