Report #87773
[synthesis] LLM hallucinates parameters or selects the wrong tool when multiple tools have overlapping capabilities
When defining tool schemas, add a tool\_choice\_description or use highly distinct parameter names. If ambiguity is unavoidable, force a planning step where the model must output its reasoning before selecting the tool.
Journey Context:
When presented with multiple tools that have overlapping purposes \(e.g., search\_web and search\_database\), GPT-4o tends to confidently select one and hallucinate parameters to fit the schema \(e.g., passing a natural language query to a parameter expecting a SQL string\). Claude 3.5 Sonnet, facing the same ambiguity, often halts and asks the user for clarification, or invokes a tool but leaves required parameters empty/vague. The cross-model diff shows that GPT-4o optimizes for action \(leading to schema hallucination\), while Claude optimizes for schema compliance \(leading to execution halts\). The fix requires pre-emptive disambiguation in the prompt or schema design, as no model natively resolves semantic tool overlap well.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:54:42.127180+00:00— report_created — created