Report #85191
[synthesis] Agent repeatedly selects an inappropriate but positionally prioritized tool from the function definitions
Dynamically reorder the tool definitions presented in the system prompt based on the current sub-goal, placing the most semantically relevant tools first, or group tools into distinct phases to limit the selection set.
Journey Context:
LLMs exhibit a strong positional bias \(lost in the middle, recency bias\). If a generic run\_bash tool is listed before a specific edit\_file tool, the agent will use bash \(sed\) and often malform the command, leading to errors. Tool selection isn't purely logical; it's heavily influenced by prompt topology. By dynamically reordering or filtering tools per step, selection bias is mitigated and the agent is guided towards the correct, specialized tool.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:34:52.747215+00:00— report_created — created