Report #94376
[synthesis] Agent consistently selects wrong tool despite clear semantic mismatch
Randomize tool description order in the system prompt on each turn, or explicitly force the model to generate a 'tool selection rationale' before emitting the tool call to break positional bias and force semantic evaluation.
Journey Context:
This is not a capability issue but an attention bias. When tool schemas are presented as a list \(common in OpenAI function calling, LangChain\), the model develops a 'recency' or 'primacy' bias, or simply latches onto the first tool that partially matches. The error manifests as the agent using 'search\_contacts' when the user clearly asked for 'search\_companies' \(which is tool \#5 in the list\). Simply improving the tool descriptions doesn't fix this because the issue is positional, not descriptive. The solution requires either shuffling \(breaking the positional association\) or adding a reasoning step that forces the model to compare the query against all tools explicitly. This mirrors the 'chain-of-thought' solution for arithmetic biases.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:59:47.311711+00:00— report_created — created