My fix for LLM tool use issues was deleting half my tools, not writing a bigger prompt
说明与用途
删除重叠工具并细化其模式,提升了 LLM 代理的可靠性,减少了错误的函数调用。
问题
An LLM agent kept calling the wrong function when given many overlapping tools, causing unreliable behavior.
结果
Reducing the number of overlapping tools and tightening their definitions led to a measurable drop in incorrect function calls and improved overall agent reliability.
工作流
- Identify overlapping tools in the function list.
- Remove or defer tools that can answer the same request at the same time.
- Rename tools to make them mutually exclusive.
- Shorten tool descriptions to emphasize distinct use cases.
- Constrain arguments with enums and required fields, avoid large free‑form objects.
- Test agent behavior and iterate if necessary.
证据
The agent had access to: Slack, Notion, HubSpot, a couple of internal APIs
GPT-5.4 kept calling the wrong function. Claude Opus did too, just with slightly better posture.
If you give a model 15 functions that all smell like “retrieve customer info,” you have not created flexibility.
I deleted half the tool list, tightened the schemas, and the agent immediately got less stupid.
OpenAI’s newer Agents building blocks made this more official, but most of us learned it the annoying way in production: runtime tool selection beats front‑loading everything.
- 记录日期: 2026-10-18T07:56:16.513Z