Table of Contents
Fetching ...

NESTFUL: A Benchmark for Evaluating LLMs on Nested Sequences of API Calls

Kinjal Basu, Ibrahim Abdelaziz, Kiran Kate, Mayank Agarwal, Maxwell Crouse, Yara Rizk, Kelsey Bradford, Asim Munawar, Sadhana Kumaravel, Saurabh Goyal, Xin Wang, Luis A. Lastras, Pavan Kapanipathi

TL;DR

NESTful addresses the problem of evaluating LLMs on nested sequences of API calls by providing a benchmark with over 1800 executable nested sequences and an end-to-end evaluation pipeline. The authors curate two data domains (MathQA-derived mathematical reasoning and StarCoder-Instruct-based coding tools) with executable tool specifications, IO pairs, and validation, enabling reproducible evaluation. Across 19 models, results show that even top systems like GPT-4o achieve only 28% full sequence accuracy and 60% win rate, with performance deteriorating as nesting depth and data dependencies grow, highlighting substantial room for improvement. The work also analyzes dataset structure via a DAG view of data dependencies and demonstrates the benefits of in-context learning and ReAct in specific settings, while releasing the dataset under an Apache 2.0 license to spur further research.

Abstract

The resurgence of autonomous agents built using large language models (LLMs) to solve complex real-world tasks has brought increased focus on LLMs' fundamental ability of tool or function calling. At the core of these agents, an LLM must plan, execute, and respond using external tools, APIs, and custom functions. Research on tool calling has gathered momentum, but evaluation benchmarks and datasets representing the complexity of the tasks have lagged behind. In this work, we focus on one such complexity, nested sequencing, with the goal of extending existing benchmarks and evaluation. Specifically, we present NESTFUL, a benchmark to evaluate LLMs on nested sequences of API calls, i.e., sequences where the output of one API call is passed as input to a subsequent call. NESTFUL contains 1800+ nested sequences where all the function calls are executable. Experimental results on a variety of models show that the best-performing model (GPT-4o) achieves a full sequence match accuracy of 28% and a win-rate of 60%, necessitating a large scope for improvement in the nested sequencing aspect of function calling. Our analysis of these results provides possible future research directions for the community, in addition to a benchmark to track progress. We have released the NESTFUL dataset under the Apache 2.0 license at https://github.com/IBM/NESTFUL.

NESTFUL: A Benchmark for Evaluating LLMs on Nested Sequences of API Calls

TL;DR

NESTful addresses the problem of evaluating LLMs on nested sequences of API calls by providing a benchmark with over 1800 executable nested sequences and an end-to-end evaluation pipeline. The authors curate two data domains (MathQA-derived mathematical reasoning and StarCoder-Instruct-based coding tools) with executable tool specifications, IO pairs, and validation, enabling reproducible evaluation. Across 19 models, results show that even top systems like GPT-4o achieve only 28% full sequence accuracy and 60% win rate, with performance deteriorating as nesting depth and data dependencies grow, highlighting substantial room for improvement. The work also analyzes dataset structure via a DAG view of data dependencies and demonstrates the benefits of in-context learning and ReAct in specific settings, while releasing the dataset under an Apache 2.0 license to spur further research.

Abstract

The resurgence of autonomous agents built using large language models (LLMs) to solve complex real-world tasks has brought increased focus on LLMs' fundamental ability of tool or function calling. At the core of these agents, an LLM must plan, execute, and respond using external tools, APIs, and custom functions. Research on tool calling has gathered momentum, but evaluation benchmarks and datasets representing the complexity of the tasks have lagged behind. In this work, we focus on one such complexity, nested sequencing, with the goal of extending existing benchmarks and evaluation. Specifically, we present NESTFUL, a benchmark to evaluate LLMs on nested sequences of API calls, i.e., sequences where the output of one API call is passed as input to a subsequent call. NESTFUL contains 1800+ nested sequences where all the function calls are executable. Experimental results on a variety of models show that the best-performing model (GPT-4o) achieves a full sequence match accuracy of 28% and a win-rate of 60%, necessitating a large scope for improvement in the nested sequencing aspect of function calling. Our analysis of these results provides possible future research directions for the community, in addition to a benchmark to track progress. We have released the NESTFUL dataset under the Apache 2.0 license at https://github.com/IBM/NESTFUL.
Paper Structure (26 sections, 6 figures, 2 tables)

This paper contains 26 sections, 6 figures, 2 tables.

Figures (6)

  • Figure 1: End-to-End Evaluation Pipeline: NESTful provides a test set of input queries and its corresponding list of nested function calls. It also provides executable implementations for each tool in the library and allows for evaluating models in direct prompting or REACT styles. Given a query, the pipeline infers the input LLM to generate the required sequence of function calls, execute those functions (taking into account nested variables) and compare the final answer with the gold one.
  • Figure 2: NESTful Data Schema for Input, Tool Library, Output, and Python implementation. In Output JSON, the arg_2 of Function_Name_2 showcases how the variable assignments are used to create a nested sequence of function calls.
  • Figure 3: Sample specification for tools from MathQA
  • Figure 4: Sample problem from the MathQA dataset. The Operation Stack provides an ordered sequence of nested tool calls which we transform into a Tool Call format for the NESTful dataset.
  • Figure 5: [top] An example function (angle_rotation) from StarCoder2-Instruct dataset with its docstring documentation. [bottom] Tool specification for "angle_rotation" after inferring the different data types and creating its input/output parameters.
  • ...and 1 more figures