Large Language Models (LLMs) have shown incredible potential as the "brains" behind autonomous agents, powering systems like AutoGPT and HuggingGPT. However, the AI community has lacked a standardized, rigorous way to measure their performance in complex, real-world automation scenarios.
TaskBench is a comprehensive benchmark designed to evaluate how well LLMs handle the core cognitive work of autonomous agents: task decomposition, tool selection, and parameter prediction. By introducing Tool Graphs to model complex dependencies and a back-instruct method for generating realistic user prompts, TaskBench provides a robust framework to test the limits of current AI in automating multi-step workflows.
The Challenge of Evaluating Autonomous Agents
Existing benchmarks for tool-use and agent automation often suffer from three main flaws:
- Oversimplification: They tend to focus on single-tool use rather than complex, multi-step workflows.
- Ignoring Dependencies: They fail to adequately model the reality that the output of one tool (e.g., a video downloader) is often the required input for the next (e.g., a video editor).
- Data Quality: Many datasets rely on rigid, synthetic templates that do not reflect how humans naturally give instructions.
For an LLM to truly automate a complex task, it must succeed at three critical stages: task decomposition (planning the steps), tool selection (picking the right APIs for each step), and parameter prediction (filling in the correct arguments and passing outputs between tools).
The TaskBench Approach: Tool Graphs and Back-Instruct
To build a better benchmark, the researchers introduced two primary innovations:
- The Tool Graph (TG): Instead of treating tools as a flat list, TaskBench represents them as nodes in a graph. The edges between these nodes represent dependencies—either resource dependencies (where Tool A's output is Tool B's input) or temporal dependencies (where Tool A must simply execute before Tool B).
- Back-Instruct Strategy: To create high-quality, naturalistic data, the authors avoided asking humans to write prompts from scratch. Instead, they sampled a logical subgraph (a valid "path" of tools) from the Tool Graph. They then used GPT-4 to "reverse engineer" a natural language user instruction that would logically require that specific sequence of tools. A rigorous multi-step quality control process, involving automated "self-critics" and human verification, ensured the instructions were both natural and logically sound.
To evaluate models, the authors proposed TaskEval, a suite of metrics (including ROUGE for planning and F1 scores for graph matching) to assess performance at every stage of the automation pipeline.
Datasets and Complexity Levels
The resulting TaskBench dataset includes 17,331 samples across three distinct domains:
- Hugging Face Tools: Focused on AI model orchestration (e.g., "Summarize this text and then turn it into an image").
- Multimedia Tools: Focused on file processing, such as editing, converting, and searching for media.
- Daily Life APIs: Focused on common web tasks like shopping, travel booking, and searching.
The tasks are categorized by structural complexity: Node (single tool), Chain (sequential steps), and DAG (Directed Acyclic Graph, representing complex branching and merging of tasks).
Key Findings: Where Do LLMs Excel and Fail?
Evaluating various LLMs on TaskBench revealed several critical insights into the current state of autonomous agents:
- The "Dependency Gap": Models are generally proficient at picking the right individual tools (Node F1), but they struggle significantly to connect them correctly (Edge F1). Across almost all models tested, Edge prediction scores were roughly 20% lower than Node prediction scores.
- The Complexity Cliff: There is a massive performance drop as tasks grow longer. GPT-4, the top performer, achieves ~96% accuracy on single-tool tasks but plummets to ~25% when asked to coordinate 8 tools.
- Code Pre-training is a Superpower: Models with extensive code pre-training (like CodeLlama) outperformed similarly sized general-purpose models. This suggests that "thinking in code" helps LLMs understand the structured logic required for complex task sequences.
- GPT-4 is the King of Agents: GPT-4 consistently outperformed Claude-2 and Gemini-Pro across all domains and complexity levels, particularly in the most difficult DAG-structured tasks.
- Few-Shot Prompting is Essential: Moving from 0-shot to 2-shot prompting provided a massive boost. For example, CodeLlama-13b saw improvements of over 20% in some metrics simply by observing two examples of how to format its output.
Crucially, the authors found a high correlation (Kendall’s $\tau = 0.89$) between their automated TaskEval metrics and human judgment, proving that the benchmark is a reliable proxy for real-world performance.
Limitations and the Path Forward
While TaskBench represents a significant step forward, the authors note a few limitations. Because the dataset was generated using GPT-4, there is a risk of "data engine bias," where the benchmark might inherit the specific logical style of GPT-4 despite human verification.
Future iterations of TaskBench aim to expand into more specialized domains like scientific research, legal analysis, and medical automation. Furthermore, while TaskBench currently evaluates "static" planning, future versions could involve "closed-loop" evaluation, where the model must dynamically react to the actual output of a tool—such as handling an unexpected API error message—in real-time.
Summary updated