The ability to use tools is fundamental for large language model (LLM) agents. Given a task, existing systems use LLMs to plan and generate tool calls, which are executed by real-world tools to complete the task. However, tool calls are prone to errors because they are derived merely from LLM intrinsic capabilities. What is more, while it is useful to let LLMs iteratively refine the tool-call sequence using execution results from real tools, this process can be expensive and lead to unsafe results. To improve LLM tool calls and address issues caused by using real tools for refinement, we introduce Gecko, a comprehensive environment that simulates tool responses using a combination of rules and LLMs. Specifically, Gecko checks the validity of tool calls including input arguments and tool names, synthesizes reasonable responses that adhere to the output schema, and assesses whether all task objectives have been achieved. These three types of feedback provided by Gecko allow LLMs to refine their tool calls, forming a simple yet effective test-time scaling method named GATS. On BFCLv3 and $τ^2$-bench, GATS consistently improves the tool calling performance of various LLMs including GPT-4o, GPT-5, and Gemini-3.0-pro. We further discuss working mechanisms of our method and share future possibilities.
翻译:工具使用能力对于大型语言模型(LLM)智能体至关重要。现有系统针对给定任务利用LLM进行规划并生成工具调用,再通过实际工具执行以完成任务。然而,工具调用仅依赖LLM的内在能力,极易产生错误。此外,虽然利用实际工具的执行结果让LLM迭代优化工具调用序列具有价值,但这一过程成本高昂且可能导致不安全的结果。为改进LLM工具调用并解决使用实际工具进行优化所引发的问题,我们提出了Gecko——一个结合规则与LLM模拟工具响应的综合环境。具体而言,Gecko会检查工具调用的有效性(包括输入参数和工具名称),合成符合输出模式的合理响应,并评估所有任务目标是否达成。Gecko提供的这三类反馈使LLM能够优化其工具调用,形成一种简洁高效的测试时扩展方法GATS。在BFCLv3与$τ^2$-bench基准测试中,GATS持续提升了包括GPT-4o、GPT-5和Gemini-3.0-pro在内的多种LLM的工具调用性能。我们进一步探讨了该方法的工作机制,并展望了未来可能的发展方向。