Report #85363
[synthesis] Model hallucinates non-existent tool names instead of admitting no tool fits the request
Always include a catch-all function \(e.g., 'ask\_user' or 'no\_tool\_match'\) in your tool schema. When the model can't find a matching tool, it will call this instead of fabricating one. Additionally, add to the system prompt: 'If no available tool matches the user's request, respond in natural language rather than inventing a tool name.'
Journey Context:
When a user request doesn't match any defined tool, GPT-4o has a documented tendency to hallucinate a plausible-sounding tool name and call it. Claude tends to fall back to natural language but occasionally fabricates tool names too, especially under strong system prompt pressure to 'always use tools.' Gemini is the most likely to simply respond without tools. The common mistake is assuming models will gracefully handle the 'no match' case — they won't without explicit guidance. The catch-all tool pattern is superior to prompt-only mitigation because it gives the model a valid tool to call, satisfying its tool-use impulse while routing to a safe handler.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:52:13.461061+00:00— report_created — created