A Joint Optimization Framework for Enhancing Efficiency of Tool Utilization in LLM Agents (2025)

Abstract: Large Language Models (LLMs) augmented with external tools have demonstrated remarkable capabilities in complex problem solving. Existing efforts for tool utilization typically involve an LLM agent that contains instructions on using the description of the available tools to determine and call the tools required to solve the problem. Inference Scaling techniques, such as chain-of-thought and tree-of-thought reasoning, are commonly used but require significant computational overhead and rendering such methods impractical in real-world applications. In this work, we recognize and formalize the critical role of instructions provided in agent prompts and tool descriptions—collectively referred to as *context*—and show that incomplete *context* is one of the reasons for this computational overhead.To fill this efficiency gap, we propose an optimization framework that jointly refines both the instructions provided in the agent prompt and tool description, enhancing their interaction. Experiments on StableToolBench and RestBench demonstrate that our optimized agents achieve superior efficiency while maintaining effectiveness. Our findings underscore the critical role of context optimization in improving LLM agents for tool utilization, paving the way for more responsive and cost-effective LLM agents. Our code is available at [https://github.com/Bingo-W/ToolOptimization](https://github.com/Bingo-W/ToolOptimization).

## introduction recent advancements in large language models (llms) have significantly enhanced their ability to solve complex problems, particularly when integrated with external tools that provide access to private or specialized data and operations @xcite . these tool-augmented llm agents are capable of executing multi-step tasks with increasing effectiveness @xcite . to further improve llm agent capabilities when utilizing tools, existing efforts aim to extend the inference ability by adding more steps. for example, react @xcite combines the chain-ofthought (cot) reasoning and tool interaction, to maximize the llm agent's capabilities @xcite . further research extends the cot approach to a tree-based structure @xcite , largely enhancing effectiveness. despite the success of inference scaling methods in tool utilization, the significant computational overhead required by these methods makes them less useful in practical scenarios, leading to poor user engagement due to high latency in a real-time, enduser-facing system. some recent works aim to further enhance efficiency by adding a backup mechanism to enable quick restart from the last successful tool call instead of beginning @xcite , or by grouping similar tools as a toolkit @xcite . however, they ignore the critical role of instructions provided in the agent prompt and tool descriptions, which together constitute what we refer to as context. instructions provided in the agent prompt are usually designed by extensive human effort via many trials and errors, and tend to guide the interaction between the agent and the tools. such human-designed instructions may result in being incomplete without covering all the necessary guidance @xcite . the tool description is expected to contain information about the functionality of the tool, so that llm agents can identify which tool is needed for the current task at hand. however, tool descriptions may not fully reflect the exact functionalities of the tool, which is difficult to capture for tools with broad/complex functionalities. in our work, we first recognize the need to formalize the critical role of instructions provided in agent prompts and tool descriptions. we posit that an incomplete context often degrades efficiency by increasing the number of tool calls required to yield correct responses, leading to the substantial computational overhead of inference scaling methods (shown in figure 1 ). to address the inefficiency issue caused by an incomplete context, we introduce an automated optimization system that optimizes context for efficient tool utilization. while previous work has explored improving instructions @xcite or refining tool descriptions @xcite @xcite , these efforts primarily focus on effectiveness rather than efficiency. furthermore, existing methods tend to optimize only one aspect-either the instructions provided in the prompt or the tool descriptions-failing to capture the interaction between the instructions and tool descriptions. instruction optimization often lacks fine-grained toolrelated knowledge, such as criteria that the input parameters should satisfy or tool availability. this omission can lead to wrong or unnecessary tool calls. on the other hand, tool description optimization typically focuses on tool-specific details but neglects task-dependent information, such as intertool dependencies @xcite , which are crucial for efficient multi-tool orchestration. instead, our proposed optimization system systematically refines both instruction and tool descriptions incorporating the interaction between them, to meet the best of both worlds. specifically, our framework consists of three key components: (1) a feedback generator, (2) a suggestion coordinator, and (3) a context updater. the feedback evaluator is employed to generate a systematic evaluation regarding the effectiveness and efficiency of tool calling. the suggestion coordinator generates separate improvement suggestions for instruction and tool description from the feedback that contains a coupled evaluation. the context updater processes a batch of suggestions to refine the context, in order to ensure the stability and efficiency of updating. the whole optimization pipeline is operated in a verbalized way @xcite , utilizing the power of text and reducing the updating cost by avoiding parameter weight changes. our contributions are summarized as follows. (1) we highlight the critical role of context, which encompasses both the instructions provided in the prompt and the description of the tool, where an incomplete context would require more inference steps leading to inefficiency in inference. ( 2) we propose an automated optimization framework, refining the instruction and tool descriptions, to enhance the efficiency of tool utilization. the optimization is performed in a verbalized manner, benefiting from the expressivity and explainability of language. (3) we conduct experiments on two benchmarks, demonstrating that our optimized agents achieve up to 70% reduction of required tool calls on stabletoolbench and avoid 47% redundant tool calls on restbench while maintaining a comparable or even better performance. ## related work in what follows, we discuss two lines of related works, i.e., llm for tool utilization and verbalized optimization. ## incomplete context leads to inefficient tool utilization recent efforts have focused on inference scaling methods by adding additional inference steps to enhance the effectiveness of llm agents in tool utilization @xcite . however, these approaches overlook the critical role of agent instructions and tool descriptions. in real-world scenarios, both elements are often incomplete. agent instructions are typically crafted by engineers through iterative trial-and-error processes, making it difficult to provide comprehensive guidance @xcite . similarly, tool descriptions-provided by developers-may not fully capture a tool's functionalities, especially when dealing with complex or multi-purpose tools. thus, in this section, we empirically explore the role of context in tool utilization and analyze its effect when equipping the inference scaling methods. specifically, we evaluate different inference scaling methods on the stabletoolbench dataset @xcite , including chain-of-thought-based (i.e., ## optimizing llm agents for efficient tool utilization to address the inefficiency issue of llm agents for tool utilization caused by an incomplete context, we introduce an automated optimization framework that jointly updates both instructions in the agent prompt and tool descriptions. inspired by tool learning of humans through trial and error @xcite , our approach begins with a batch of requests and their initial trials on the system. the system then generates verbalized feedback based on the final response and tool call sequence, providing separate improvement suggestions for instructions and tool descriptions. these suggestions are aggregated to refine both instructions in agent prompt and tool descriptions. the whole pipeline is shown in figure 3 . our optimization framework consists of three key components: (1) stepwise and pairwise feedback generator (section 4.2) (2) improvement suggestion coordinator (section 4.3) (3) batch context refiner (section 4.4). ## results and discussion in this section, we present and analyze the results to show the effectiveness of our approach and metrics. ## conclusion in this work, we recognize and formalize the critical role of instructions provided in agent prompts and tool descriptions in efficient llm agents for tool utilization. our findings reveal that incomplete context, involving instructions and tool descriptions, often degrades the efficiency of inference scaling methods on tool utilization, by increasing the number of tool calls required to yield a correct response. to fill this efficiency gap, we propose an automated optimization system that jointly refines both instructions and tool descriptions, enabling more efficient llm agents for tool utilization. this optimization process leverages verbalized feedback, capitalizing on the power of language. the experiments show that our approach leads to a remarkable reduction of tool calls by up to 70% on the stabletoolbench dataset and avoids 47% redundant tool calls on restbench, demonstrating the effectiveness of our optimization system in improving the efficiency of tool utilization.