API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMs

Minghao Li, Yingxiu Zhao, Bowen Yu, Feifan Song, Hangyu Li, Haiyang Yu, Zhoujun Li, Fei Huang, Yongbin Li

Introduction

Large Language Models (LLMs) have demonstrated remarkable capabilities in natural language processing, yet they remain constrained by the static nature of their training data. To perform tasks requiring real-time information or complex external interactions—such as checking weather, managing calendars, or executing code—LLMs must effectively utilize external tools via APIs. Despite the importance of this capability, the research community has lacked a comprehensive, standardized benchmark to measure and improve tool-augmented LLMs.

API-Bank addresses this gap by providing a rigorous evaluation framework and a cost-effective training methodology. It moves beyond simple formatting tests to evaluate how models search for, plan with, and execute API calls in dynamic, multi-turn environments.

The API-Bank Evaluation Framework

The core of API-Bank is a three-tiered "Ability Grading" system designed to simulate the increasing complexity of real-world tool usage:

  1. Level 1 (Call): Tests the model's ability to correctly format an API call when the specific tool is already provided in the context.
  2. Level 2 (Retrieve+Call): Introduces a large pool of available APIs. The model must first retrieve the relevant tool based on the user's query before executing the call.
  3. Level 3 (Plan+Retrieve+Call): The most challenging level, requiring the model to decompose complex requests into multiple steps, identifying and sequencing various APIs to reach a solution.
The three levels of tool-use ability evaluated in API-Bank: Call, Retrieve+Call, and Plan+Retrieve+Call.

Unlike previous benchmarks, API-Bank utilizes a "runnable" environment. The evaluation set consists of 73 APIs and 314 manually annotated dialogues where API calls actually trigger database changes or search results, providing a "live" feedback loop for the model.

Scaling Training with Multi-Agent Systems

A significant hurdle in developing tool-augmented models is the high cost of human-annotated data. To overcome this, the authors developed a novel multi-agent system to "mass-produce" high-quality training dialogues. This system employs five specialized LLM agents (Domain, API, Query, Generator, and Tester) to collaborate on defining tools, simulating user requests, and validating the resulting dialogues.

This automated pipeline reduced the cost of data generation from $8.00 per dialogue (human) to just $0.10, a 98% reduction. Using this method, the authors created a massive training set featuring 1,888 dialogues across 1,000 domains and 2,138 distinct APIs. This data was used to fine-tune Lynx, a tool-augmented model based on Alpaca-7B, to demonstrate the utility of synthetic data.

Key Results and Performance Analysis

The benchmarking of several prominent LLMs revealed critical insights into the current state of tool augmentation and the specific challenges models face when moving from simple calls to complex planning.

Performance comparison of various LLMs on API-Bank across different ability levels, highlighting the gap in planning capabilities.

GPT-4 as the Benchmark Leader

GPT-4 emerged as the top performer, achieving a total correctness score of 60.24%. Its most significant advantage lies in Level 3 (Planning), where it achieved 70% accuracy—more than triple the performance of GPT-3.5-turbo (22%). This suggests that while many models can handle simple calls, sophisticated reasoning and sequencing remain a major differentiator for high-end models.

The "Planning Gap" and Hallucination

A notable finding was that tool-use ability is not strictly tied to model size. For instance, the original GPT-3 (Davinci) showed near-zero ability to use tools, indicating that these skills are likely "unlocked" through specific instruction tuning rather than just scale. Furthermore, even advanced models like GPT-3.5 saw a significant performance drop when moving from simple calls to multi-step planning.

For fine-tuned models like Lynx, the primary bottleneck was "API Hallucination"—the tendency to call APIs from the training set that were not available in the current evaluation context. Despite this, Lynx significantly outperformed its base model (39.58% vs 15.19%), proving that high-quality automated data can effectively substitute for human effort.

Conclusion and Future Directions

API-Bank establishes a new standard for evaluating tool-augmented LLMs, highlighting that the path to "perfect" tool use involves more than just better formatting. Future work will need to address the "API Search" bottleneck—where even GPT-4 struggled—and improve model adherence to strict parameter constraints. By providing both a rigorous benchmark and a scalable training path, API-Bank paves the way for the next generation of truly interactive and capable AI agents.

Summary updated

BibTeX
@inproceedings{li2023api,
  author = {Minghao Li and Yingxiu Zhao and Bowen Yu and Feifan Song and Hangyu Li and Haiyang Yu and Zhoujun Li and Fei Huang and Yongbin Li},
  title = {{API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMs}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-main.187},
}
Figure