SEAL: Suite for Evaluating API-use of LLMs

Woojeong Kim, Ashish Jagmohan, Aditya Vempaty

TL;DR

Evaluating how large language models (LLMs) use external APIs is broken: existing benchmarks suffer from real-time API downtime, lack standardized holdouts, and evaluate only isolated parts of the tool-use pipeline. SEAL is an open-source, end-to-end evaluation suite built on AutoGen that standardizes major API benchmarks, employs a cached GPT-4-powered API simulator for deterministic testing, and assesses every stage from API retrieval to parameter parsing and final answers.

What Problem Does This Paper Address?

While modern LLMs can leverage external tools and APIs for real-time data or calculations, current benchmarks for measuring tool capabilities suffer from severe flaws:

  1. Benchmark Instability & API Drift: Evaluating against live endpoints leads to non-reproducible runs due to rate limits, endpoint deprecation, authentication errors, and shifting service responses (e.g., ~40% of ToolBench queries fail or are deemed "unsolvable").
  2. Narrow Generalizability: Datasets often lack holdout splits or overfit to specific ecosystems (e.g., retrievers trained purely on RapidAPI fail on OpenAI plugins).
  3. Superficial "Multi-Step" Complexity: Most multi-step benchmarks test parallel calls (e.g., "get the weather and generate a random password") rather than true sequential, dependent reasoning where call $B$ requires outputs from call $A$.
  4. Fragmented Evaluations: Existing suites evaluate only single stages—such as API retrieval (AnyTool, MetaTool) or rigid single-path function execution (APIGen)—rather than the entire pipeline from query to final synthesized output.

Methods

SEAL organizes API-calling evaluation into a modular, multi-agent architecture built on the AutoGen framework:

User Proxy ──> API Retriever ──> Orchestrator ──> API Execution Manager <──> API Executor ──> Cached API Simulator
  • Modular Agent Roles: An API Retriever fetches relevant APIs from vector storage (Faiss); an API Execution Manager (LLM) decides tool calls and arguments; an API Executor executes those calls; and an Orchestrator coordinates the pipeline.
  • Deterministic API Simulation: To eliminate live-API flakiness, SEAL replaces live servers with a GPT-4-based simulator prompted with endpoint documentation and expected JSON outputs. Responses are fully cached, ensuring 100% deterministic, reproducible evaluation runs.
  • Full-Pipeline Evaluation Metrics:
  • API Retrieval: Evaluated using Recall@10 and Mean Reciprocal Rank (MRR).
  • API Call & Parameters: Evaluated via API Call Recall@$N$ (ignoring order) and strict exact-match parameter accuracy.
  • Final Response: Assessed using an LLM-as-a-judge critique method to determine query pass rate (solved, unsolved, or unsure).

Datasets

The authors sanitized and transformed five widely-used tool benchmarks into a unified schema:

  • ToolBench (RapidAPI): Sanitized down from 72,783 to 34,055 multi-step/multi-tool queries across 7,559 APIs after filtering out broken, hallucinated, or unparseable calls.
  • APIGen (RapidAPI): 60,000 queries (20,448 multi-step) covering 3,605 APIs.
  • AnyTool (RapidAPI): 407 queries across 16,464 APIs (tool selection focus).
  • MetaTool (OpenAI Plugins): 21,047 queries across 437 plugin tools.
  • APIBench (HuggingFace): 8,191 single-step queries across 914 APIs.

Key Insights and Ideas

  • Trained retrievers fail to transfer: Dense retrievers fine-tuned specifically on RapidAPI-based benchmarks (e.g., ToolBench) beat OpenAI's text-embedding-3-small on in-domain datasets, but their retrieval performance sharply declines on out-of-domain benchmarks like MetaTool.
  • Parameter extraction is a bottleneck: In ToolBench experiments, while API retrieval recall hovered between 85% and 100%, parameter exact-match accuracy stayed poor (31%–44%), showing that models frequently mangle numerical arguments or syntax despite finding the right tool.
  • LLM judges introduce evaluation noise: Using an LLM critic as both task solver and evaluator exposes stochastic quirks—the authors observed instances where the evaluator hallucinated failure and marked fully correct answers as "unsolved."

Key Results

Evaluating gpt-4-turbo-2024-04-09 across varying API pool sizes (10 to 500 APIs) showed:

Benchmark API Pool Size Retrieval Recall@10 API Call Recall Param Accuracy Pass Rate
ToolBench 10 1.00 0.62 0.34 0.68
100 0.95 0.57 0.39 0.82
500 0.85 0.59 0.44 0.76
APIGen 10 1.00 0.98 0.93 0.87
100 0.97 0.95 0.84 0.84
500 0.93 0.87 0.79 0.85

As the tool candidate pool expands from 10 to 500 APIs, retrieval recall noticeably degrades (e.g., dropping from 1.00 to 0.85 on ToolBench), directly driving downstream errors.

Limitations and Future Work

  • Synthetic Data Artifacts: While the GPT-4 simulator provides reproducible, deterministic responses, simulated outputs may occasionally fabricate schema details or miss edge-case behaviors present in real-world API servers.
  • LLM Evaluator Inconsistency: Pass rates still partially depend on LLM-based critique, which can introduce scoring variance.
  • Lack of Deep Sequential Datasets: Even sanitized benchmarks remain skewed toward parallel queries rather than genuinely complex sequential planning tasks.
  • Future Work: The authors plan to support additional agent patterns (e.g., Planner and Verifier agents) and expand bootstrapping runs to reduce sampling variance across smaller tool subsets.

Summary updated

Abstract

Large language models (LLMs) have limitations in handling tasks that require real-time access to external APIs. While several benchmarks like ToolBench and APIGen have been developed to assess LLMs' API-use capabilities, they often suffer from issues such as lack of generalizability, limited multi-step reasoning coverage, and instability due to real-time API fluctuations. In this paper, we introduce SEAL, an end-to-end testbed designed to evaluate LLMs in real-world API usage. SEAL standardizes existing benchmarks, integrates an agent system for testing API retrieval and planning, and addresses the instability of real-time APIs by introducing a GPT-4-powered API simulator with caching for deterministic evaluations. Our testbed provides a comprehensive evaluation pipeline that covers API retrieval, API calls, and final responses, offering a reliable framework for structured performance comparison in diverse real-world scenarios. SEAL is publicly available at https://github.com/EmergenceAI/seal-api-llms, with ongoing updates for new benchmarks.
BibTeX
@inproceedings{kim2024seal,
  author = {Woojeong Kim and Ashish Jagmohan and Aditya Vempaty},
  title = {{SEAL: Suite for Evaluating API-use of LLMs}},
  booktitle = {OWA @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=DdySm1xJOu},
}

Loading related content...

Figure