Report #44454
[synthesis] Agent selects wrong tool due to semantic similarity in tool name/description
Differentiate tool descriptions by including negative constraints \(e.g., 'Use this for X, NOT for Y'\) and ensure tool names are distinct in their action verbs.
Journey Context:
Agents select tools based on the semantic similarity between the user request and the tool description. If you have a search\_code tool and a run\_code tool, an agent asked to 'find the bug' might choose run\_code because 'bug' and 'code' are highly associated in its training data, even though search\_code is the right first step. The agent isn't reasoning about the tool's function; it's pattern matching. This is a silent failure because the tool executes successfully \(the code runs\), but it doesn't advance the task. The fix requires engineering the tool metadata to break the false semantic link: 'search\_code: reads and finds text in files. Does not execute.' Explicitly stating what the tool does NOT do forces the LLM's attention away from the semantic trap.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:05:08.888849+00:00— report_created — created