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

Bin Wu, Edgar Meij, Emine YilmazACL 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.

Introduction

Large Language Models (LLMs) are increasingly deployed as agents capable of invoking external APIs (tools) to address complex user requests. To bolster accuracy, current paradigms often employ "Inference Scaling" techniques like Chain-of-Thought (CoT) or Tree-of-Thought (DFS), which permit the model to explore multiple reasoning paths. However, these methods incur a substantial "efficiency tax," frequently resulting in redundant or erroneous tool calls that drive up latency and operational costs.

This research identifies incomplete context as a primary driver of this inefficiency. Human-authored instructions and developer-provided tool descriptions often lack the precision required for seamless agent-tool interaction. While existing optimization strategies typically target either the prompt or the tool description in isolation, they fail to account for the synergistic relationship between the two.

Methodology: Joint Context Optimization

The proposed framework is an automated, training-free system that utilizes an LLM to refine context through natural language feedback. The architecture comprises three core components:

  1. Stepwise and Pairwise Feedback Generator: This module analyzes the full trajectory of tool calls, identifying specific points of failure or redundancy rather than merely evaluating the final output.
  2. Improvement Suggestion Coordinator: Acting as the central logic unit, it determines whether a failure stems from general behavioral instructions or specific tool descriptions, coordinating refinements accordingly.
  3. Batch Context Refiner: To ensure stability and prevent overfitting to single instances, this component aggregates suggestions from a batch of requests before updating the global context.
Overview of the joint optimization framework, illustrating the iterative refinement of instructions and tool descriptions.

The authors also introduce the Cost-Aware Pass Rate (CAPR) metric. Unlike traditional pass rates, CAPR evaluates the area under the curve of success versus computational cost, incentivizing agents that achieve high accuracy with minimal tool calls.

Experimental Evaluation

The framework was rigorously tested on two benchmarks:

  • StableToolBench: A stabilized version of ToolBench containing thousands of real-world REST APIs.
  • RestBench: A human-annotated benchmark focusing on TMDB and Spotify API scenarios.

Evaluation included both seen and unseen queries, as well as scenarios involving tools encountered during the optimization phase.

Key Results and Insights

The experimental results highlight significant improvements in agent performance and efficiency:

  • Efficiency Gains: On StableToolBench, optimized agents demonstrated up to a 70% reduction in tool calls required to reach specific success thresholds.
  • Redundancy Mitigation: On RestBench, the framework successfully eliminated 47% of redundant tool calls compared to baseline configurations.
  • Generalization: Optimized instructions and descriptions consistently yielded higher Pass Rates and lower cost thresholds on unseen "Agent Test Sets."
Comparison of Pass Rate vs. Average Number of Tool Calls, demonstrating the efficiency gains of the proposed framework (OURS) over baseline contexts.

A critical insight from the study is that context optimization is a "two-way street." Jointly refining instructions and tool descriptions prevents conflicting signals, ensuring the agent understands both how to behave and what the tools specifically offer. Furthermore, the study identified an optimization "sweet spot," noting that excessive refinement iterations can lead to overfitting and decreased efficiency on novel tasks.

Conclusion and Future Work

This work demonstrates that "leaner" context is a powerful lever for improving LLM agent performance. By treating instructions and tool descriptions as a unified optimization target, the framework significantly reduces computational overhead without sacrificing effectiveness.

Future research will focus on developing robust regularization techniques to mitigate overfitting during verbalized optimization and expanding the framework's application to diverse domains such as robotic control and specialized scientific software.

Summary updated

BibTeX
@inproceedings{wu2025joint,
  author = {Bin Wu and Edgar Meij and Emine Yilmaz},
  title = {{A Joint Optimization Framework for Enhancing Efficiency of Tool Utilization in LLM Agents}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
  url = {https://openreview.net/forum?id=qbuMTKCxkH},
}
Figure