Report #20751
[synthesis] Agent selects wrong tool from registry due to semantic overlap in descriptions
Enforce strict tool signature uniqueness: for any two tools, if their descriptions or parameter schemas overlap significantly, merge them or rename parameters to be distinct; implement a 'tool disambiguation' layer that requires the LLM to explain \*why\* it chose this tool over alternatives before execution.
Journey Context:
When two tools exist—e.g., 'read\_file' and 'read\_log'—and both take a 'path' parameter and return 'content', the LLM may choose the wrong one based on subtle prompt phrasing. The tool registry appears valid to a human \(descriptions differ slightly\), but to an LLM, the semantic vectors are nearly identical. Standard fixes like 'improve the prompt' are brittle. The robust architectural fix is to treat tool selection as a classification problem requiring high confidence: either the tools are semantically distinct enough that the choice is unambiguous \(enforced by schema design\), or the system must use a 'disambiguation' step where the LLM must explicitly contrast the chosen tool against the nearest neighbor and justify the choice. If it cannot, the system should halt and ask for clarification rather than risk calling 'delete\_user' instead of 'disable\_user'.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:14:31.636700+00:00— report_created — created