ToolQA: A Dataset for LLM Question Answering with External Tools

TL;DR

ToolQA employs an automated three-phase process to evaluate LLMs' external tool usage across 8 domains, showing significant performance gains over internal knowledge-only models.

cs.CL 🔴 Advanced 2023-06-23 410 citations 36 views
Yuchen Zhuang Yue Yu Kuan Wang Haotian Sun Chao Zhang
NLP Tool Integration Knowledge Reasoning Benchmark Construction Model Evaluation

Key Findings

Methodology

This work introduces a three-stage automated dataset creation pipeline, including reference data collection, human-guided template question generation, and programmatic answer generation. External knowledge sources span eight domains, ensuring no overlap with pretraining data. Thirteen specialized tools (e.g., retrieval, database, math, graph, code interpreters) simulate real-world external knowledge access. Questions are generated via human-validated templates filled with sampled data, ensuring they require external tool invocation. Answers are produced through automated execution of tool chains, guaranteeing correctness. Comparative experiments between baseline models (e.g., ChatGPT) and tool-augmented models (e.g., ReAct, Chameleon) demonstrate the effectiveness of external tools in complex reasoning tasks.

Key Results

  • Pure internal knowledge models like ChatGPT achieve success rates around 5% on simple questions, dropping to 2% on hard questions. Tool-augmented models like ReAct (GPT-3.5) reach up to 43.15% success on easy questions but only 8.2% on hard ones, indicating persistent challenges in complex scenarios.
  • Model performance varies significantly across different tasks and question difficulties, with complex, multi-step questions remaining a major challenge. Error analysis reveals frequent argument miscalls and data source misidentification.
  • Results confirm that ToolQA effectively distinguishes true tool utilization from memorized knowledge, providing a fair evaluation platform that exposes current limitations and guides future improvements.

Significance

This work addresses a critical gap in evaluating whether LLMs genuinely leverage external knowledge or merely recall pretraining data. By establishing a fair, comprehensive benchmark, it advances the development of models capable of dynamic, multi-tool reasoning. The dataset's multi-domain, multi-tool design fosters progress toward more reliable, adaptable AI systems capable of real-world tasks such as scientific reasoning, data analysis, and decision support, thus holding substantial academic and industrial significance.

Technical Contribution

The paper introduces a novel automated dataset construction framework that integrates multi-domain reference corpora and thirteen tools, ensuring questions are answerable solely via external tool invocation. It innovates with human-guided template question generation, automated answer validation through programmatic tool execution, and multi-step reasoning evaluation. This comprehensive pipeline enables scalable, fair assessment of multi-tool utilization, setting a new standard for external knowledge integration in LLM evaluation.

Novelty

This is the first dataset explicitly designed to evaluate open-ended external tool use in LLMs across multiple domains with automated, scalable generation. Unlike prior benchmarks focusing on single-tool or task-specific evaluation, ToolQA emphasizes multi-tool, multi-step reasoning in an open-ended setting. Its automated pipeline ensures minimal human bias and high scalability, representing a significant step forward in benchmarking external knowledge reasoning capabilities.

Limitations

  • Despite broad domain coverage, the success rate on complex questions remains limited (~8%), indicating models still struggle with multi-step, multi-tool reasoning. Future work should focus on improving reasoning strategies and tool orchestration.
  • Parameter errors and data source misidentification suggest models lack robust understanding of tool invocation semantics, requiring further training or architectural improvements.
  • The dataset, while diverse, does not encompass all real-world scenarios, such as multimedia data or highly dynamic knowledge sources. Extending coverage and incorporating real-time data remains an open challenge.

Future Work

Future directions include enhancing models' multi-tool coordination via reinforcement learning, integrating real-time knowledge bases for dynamic updates, and expanding to multi-modal data (images, audio). Additionally, developing more sophisticated error correction mechanisms and scaling the dataset to cover more application domains will further advance the field. Combining external tool invocation with continuous learning could enable models to adapt to evolving knowledge landscapes, making AI systems more autonomous and reliable.

AI Executive Summary

The rapid progress of large language models (LLMs) such as GPT-3 and GPT-4 has revolutionized NLP, enabling impressive performance across diverse tasks. However, these models still face significant challenges, especially in complex reasoning, numerical calculations, and accessing up-to-date or specialized knowledge. Traditional evaluation methods primarily measure internal knowledge recall, which can be biased by pretraining data overlap, making it difficult to assess whether models genuinely utilize external tools or simply rely on memorized information.

To address this critical gap, the authors introduce ToolQA, a comprehensive benchmark designed to faithfully evaluate LLMs’ ability to invoke external tools for question answering. The dataset is constructed through an automated, scalable pipeline involving three key phases: reference data collection from eight distinct domains, human-guided template question generation to ensure external knowledge dependency, and programmatic answer generation via automated tool invocation. This approach minimizes human bias, ensures data relevance, and guarantees that questions cannot be answered solely by internal knowledge.

ToolQA encompasses 8 domains, including temporal, spatial, scientific, mathematical, social, and personal data, with 13 specialized tools such as text retrieval, database operations, mathematical calculators, graph analyzers, and code interpreters. The questions are designed to simulate real-world information-seeking inquiries, requiring models to perform multi-step reasoning and tool orchestration. Experimental results demonstrate that pure internal knowledge models like ChatGPT achieve success rates below 10% on both simple and complex questions, whereas tool-augmented models like ReAct (GPT-3.5) significantly outperform, reaching up to 43.15% on easy questions.

These findings highlight the importance of external tools in enhancing model reasoning capabilities. Despite progress, the success rate on hard questions remains limited (~8%), indicating ongoing challenges in multi-tool coordination, parameter accuracy, and data source identification. The study underscores the potential of automated, multi-domain benchmarks like ToolQA to drive future innovations in AI, promoting models that are more reliable, adaptable, and capable of real-world reasoning. It also opens avenues for integrating real-time knowledge updates, multi-modal data, and reinforcement learning strategies to further elevate AI performance in complex, dynamic environments.

Deep Analysis

Background

The evolution of NLP has been marked by the advent of large-scale pretraining, exemplified by models like GPT, BERT, and T5, which have achieved remarkable success in tasks such as question answering, translation, and summarization. Early methods relied solely on internal knowledge encoded during pretraining, but this approach faced limitations in handling dynamic, specialized, or up-to-date information. Retrieval-augmented models like RAG and REALM introduced external knowledge access, improving factual accuracy and temporal relevance. However, existing benchmarks often focus on single-tool or task-specific evaluations, lacking the capacity to assess models' ability to orchestrate multiple tools in complex reasoning scenarios. Recent efforts like API-Bank and ToolBench have begun exploring multi-tool evaluation but remain limited in scope and scalability. ToolQA aims to fill this gap by providing a multi-domain, multi-tool, open-ended benchmark with automated data generation, fostering comprehensive assessment of external tool utilization in real-world settings.

Core Problem

Despite advances, current models struggle with complex, multi-step reasoning tasks that require orchestrating multiple external tools. Existing evaluation frameworks often cannot distinguish whether a model's correct answers stem from internal memorization or effective external knowledge access. This ambiguity hampers the development of truly intelligent systems capable of dynamic, context-aware reasoning. Moreover, manual dataset creation is labor-intensive and prone to bias, limiting scalability and diversity. The core challenge lies in designing an evaluation system that ensures questions are answerable only via external tools, covers diverse domains, and scales efficiently, thereby providing a reliable measure of a model’s external knowledge reasoning capabilities.

Innovation

This work introduces several key innovations:

1) An automated, three-phase dataset construction pipeline that ensures questions require external tool invocation, minimizing pretraining data overlap.

2) Multi-domain reference corpora covering temporal, spatial, scientific, mathematical, social, and personal data, paired with 13 specialized tools for retrieval, computation, and graph analysis.

3) Human-guided template question generation, combining automated sampling with manual validation, to produce high-quality, knowledge-dependent questions.

4) Programmatic answer generation through automated execution of tool chains, enabling multi-step reasoning and ensuring answer correctness.

5) Empirical validation demonstrating that models leveraging external tools significantly outperform pure internal knowledge models, especially on complex questions, establishing a new benchmark for external knowledge reasoning.

Methodology

  • �� Reference Data Collection: Curate diverse, domain-specific corpora (e.g., GSM8K, Yelp, Airbnb, SciREX, DBLP, Agenda) ensuring no overlap with pretraining data.
  • �� Tool Design: Develop 13 tools including text retrieval (AgendaRetriever, SciREXRetriever), database operations (Database Loader, Data Filter, Get Value), math calculation (WolframAlpha API), graph analysis (Graph Loader, Neighbour Checker, Node/Edge Checker), and code execution (Python, SQL interpreters).
  • �� Question Generation: Use ChatGPT to generate candidate templates based on reference data, followed by manual validation to select templates that cannot be answered solely by internal knowledge. Sample values from reference corpora to instantiate concrete questions.
  • �� Answer Generation: Implement operators corresponding to each tool, and compose tool chains to execute multi-step reasoning, automatically deriving correct answers.
  • �� Evaluation: Test models (ChatGPT, CoT, Chameleon, ReAct) on the dataset, measuring success rates and analyzing error types such as argument miscalls and data source misidentification.

Experiments

The experimental setup involves evaluating multiple models on the ToolQA dataset, focusing on both easy and hard questions across eight domains. Baselines include pure language models (ChatGPT with direct prompting, chain-of-thought prompting) and tool-augmented models (Chameleon, ReAct). Success is measured by exact match accuracy. The experiments analyze the impact of tool use, compare different model versions, and perform error analysis to identify common failure modes. Additional ablation studies explore the effect of different tool combinations and question complexities. Results consistently show that external tools substantially improve performance on complex questions, with ReAct (GPT-3.5) achieving the highest success rates among tested models.

Results

Models relying solely on internal knowledge, such as ChatGPT, perform poorly on ToolQA, with success rates below 10% on both easy and hard questions. Tool-augmented models like ReAct (GPT-3.5) significantly outperform, reaching 43.15% success on easy questions but only 8.2% on hard ones. Error analysis reveals that argument miscalls and data source misidentification are primary failure points, especially in complex, multi-step reasoning scenarios. The results underscore the importance of external tools in enhancing reasoning capabilities, yet also highlight the need for further improvements in tool orchestration and understanding. The dataset provides a robust benchmark for future research aimed at closing the gap in complex reasoning tasks.

Applications

ToolQA can be employed to evaluate and improve multi-modal, multi-tool AI systems in industries like finance, healthcare, and scientific research, where dynamic knowledge access is crucial. It enables developers to benchmark models' ability to perform complex reasoning involving multiple external sources, guiding targeted improvements. Additionally, the dataset can serve as training data for models to learn effective tool invocation strategies, fostering more autonomous and reliable AI assistants capable of handling real-world, multi-step tasks. Its multi-domain design ensures broad applicability, from time-sensitive data retrieval to scientific computations and social network analysis.

Limitations & Outlook

Despite its comprehensive design, ToolQA still faces challenges such as low success rates on complex questions (~8%), indicating models' limited multi-tool coordination. Parameter errors and data source misidentification suggest that models lack robust understanding of tool invocation semantics. The dataset, while diverse, does not cover all real-world scenarios, especially multimedia or highly dynamic information sources. Computational costs for multi-step reasoning and tool execution are non-trivial, necessitating further optimization. Future work should focus on improving reasoning strategies, expanding domain coverage, and integrating real-time knowledge updates to enhance model robustness and applicability.

Plain Language Accessible to non-experts

想象你在厨房做饭。你有很多食材(知识),但有些菜谱需要用特定的工具,比如搅拌机、秤、刀具。单靠记忆(内部知识)可能不能完成所有菜肴,尤其是需要精确测量或特殊操作的菜。于是,你会用厨房里的工具(外部工具)帮忙,比如用秤称重、用搅拌机搅拌。这就像让AI调用不同的工具,解决复杂问题。没有这些工具,即使你记得所有菜谱,也难以做出完美的菜肴。这就是为什么研究者设计了ToolQA,让AI学会像厨师一样调用工具,解决复杂问题。工具就像厨房里的设备,帮你做出更复杂、更精确的菜肴。没有它们,你的厨艺就有限。这项研究就是让AI学会像你一样,合理调用各种工具,变得更聪明、更有用。

ELI14 Explained like you're 14

想象你在学校里学习做科学实验。有时候,你只知道一些基本的知识(比如化学反应原理),但要完成一个复杂的实验,你可能需要查阅一本特殊的手册或者用一个计算器来帮你算出具体的数值。这就像让AI模型不仅用自己学到的知识,还能用外部的工具,比如数据库、计算器或者图表,来帮忙解决问题。比如,问“这个化学反应需要多长时间?”模型不能只靠记忆回答,而是需要调用实验手册(工具)去查找答案。这个研究就是让AI学会像你一样,合理调用各种工具,解决复杂的任务。它们就像你的学习助手,帮你做得更快、更准。未来,这样的AI可以帮我们在工作和生活中处理更复杂的任务,就像你用多种工具完成一项科学实验一样!

Abstract

Large Language Models (LLMs) have demonstrated impressive performance in various NLP tasks, but they still suffer from challenges such as hallucination and weak numerical reasoning. To overcome these challenges, external tools can be used to enhance LLMs' question-answering abilities. However, current evaluation methods do not distinguish between questions that can be answered using LLMs' internal knowledge and those that require external information through tool use. To address this issue, we introduce a new dataset called ToolQA, which is designed to faithfully evaluate LLMs' ability to use external tools for question answering. Our development of ToolQA involved a scalable, automated process for dataset curation, along with 13 specialized tools designed for interaction with external knowledge in order to answer questions. Importantly, we strive to minimize the overlap between our benchmark data and LLMs' pre-training data, enabling a more precise evaluation of LLMs' tool-use reasoning abilities. We conducted an in-depth diagnosis of existing tool-use LLMs to highlight their strengths, weaknesses, and potential improvements. Our findings set a new benchmark for evaluating LLMs and suggest new directions for future advancements. Our data and code are freely available to the broader scientific community on GitHub.

cs.CL cs.AI

References (20)

Chain of Thought Prompting Elicits Reasoning in Large Language Models

Jason Wei, Xuezhi Wang, Dale Schuurmans et al.

2022 21748 citations ⭐ Influential View Analysis →

Chameleon: Plug-and-Play Compositional Reasoning with Large Language Models

Pan Lu, Baolin Peng, Hao Cheng et al.

2023 503 citations ⭐ Influential View Analysis →

ReAct: Synergizing Reasoning and Acting in Language Models

Shunyu Yao, Jeffrey Zhao, Dian Yu et al.

2022 11122 citations ⭐ Influential View Analysis →

SituatedQA: Incorporating Extra-Linguistic Contexts into QA

Michael J.Q. Zhang, Eunsol Choi

2021 206 citations View Analysis →

Reframing Human-AI Collaboration for Generating Free-Text Explanations

Sarah Wiegreffe, Jack Hessel, Swabha Swayamdipta et al.

2021 179 citations View Analysis →

Training Verifiers to Solve Math Word Problems

K. Cobbe, V. Kosaraju, Mo Bavarian et al.

2021 10520 citations View Analysis →

Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks

Patrick Lewis, Ethan Perez, Aleksandara Piktus et al.

2020 18112 citations View Analysis →

Improving language models by retrieving from trillions of tokens

Sebastian Borgeaud, Arthur Mensch, Jordan Hoffmann et al.

2021 1901 citations View Analysis →

Survey of Hallucination in Natural Language Generation

Ziwei Ji, Nayeon Lee, Rita Frieske et al.

2022 5824 citations View Analysis →

Training language models to follow instructions with human feedback

Long Ouyang, Jeff Wu, Xu Jiang et al.

2022 23977 citations View Analysis →

ReACC: A Retrieval-Augmented Code Completion Framework

Shuai Lu, Nan Duan, Hojae Han et al.

2022 225 citations View Analysis →

PaLM: Scaling Language Modeling with Pathways

A. Chowdhery, Sharan Narang, Jacob Devlin et al.

2022 8359 citations View Analysis →

WebGPT: Browser-assisted question-answering with human feedback

Reiichiro Nakano, Jacob Hilton, S. Balaji et al.

2021 2057 citations View Analysis →

Ethical and social risks of harm from Language Models

Laura Weidinger, John F. J. Mellor, Maribeth Rauh et al.

2021 1634 citations View Analysis →

A Dataset for Answering Time-Sensitive Questions

Wenhu Chen, Xinyi Wang, W. Wang

2021 209 citations View Analysis →

Time-Aware Language Models as Temporal Knowledge Bases

Bhuwan Dhingra, Jeremy R. Cole, Julian Martin Eisenschlos et al.

2021 405 citations View Analysis →

Cross-Task Generalization via Natural Language Crowdsourcing Instructions

Swaroop Mishra, Daniel Khashabi, Chitta Baral et al.

2021 918 citations View Analysis →

Measuring Mathematical Problem Solving With the MATH Dataset

Dan Hendrycks, Collin Burns, Saurav Kadavath et al.

2021 6384 citations View Analysis →

Investigating the Limitations of Transformers with Simple Arithmetic Tasks

Rodrigo Nogueira, Zhiying Jiang, Jimmy J. Li

2021 165 citations View Analysis →

Language Models are Few-Shot Learners

Tom B. Brown, Benjamin Mann, Nick Ryder et al.

2020 63151 citations View Analysis →

Cited By (20)

Adaptive Multi-Resolution Procedural Knowledge Compression for Large Language Models

2026 1 citations ⭐ Influential View Analysis →

Emerging from Ground: Addressing Intent Deviation in Tool-Using Agents via Deriving Real Calls into Virtual Trajectories

CirrusBench: Evaluating LLM-based Agents Beyond Correctness in Real-World Cloud Service Environments

2026 1 citations View Analysis →

CUA-Skill: Develop Skills for Computer Using Agent

2026 28 citations View Analysis →

From Language to Action in Arabic: Reliable Structured Tool Calling via Data-Centric Fine-Tuning

Approaches and emerging trends in multi-agent autonomous AI systems for education innovation in Vietnam

2026

Balancing automation and control: user perceptions of tool invocations in conversational agents

2026

PARKA: Path-aware knowledge retrieval and structural-semantic knowledge adaptation for knowledge-based question answering

2026

Enhanced framework for detecting Vietnamese hate and offensive spans

2026

Tool retrieval bridge: Aligning vague instructions with retriever preferences via bridge model

2026 1 citations View Analysis →

Agentic Tool Use in Large Language Models

2026 4 citations View Analysis →

Lightweight and Post-Training Structured Pruning for On-Device Large Language Models

2026 1 citations

ToolWeave: Structured Synthesis of Complex Multi-Turn Tool-Calling Dialogues

2026 1 citations View Analysis →

Beyond Accuracy: Unveiling Inefficiency Patterns in Tool-Integrated Reasoning

2026 4 citations View Analysis →

Diagon: A Programmable Testbed for AI-Agent Cognitive Labor Markets

2026 2 citations View Analysis →

Jailbreaking the Matrix: Nullspace Steering for Controlled Model Subversion

2026 3 citations View Analysis →

Democratizing Tool Learning with Environments Fully Simulated by a Free 8B Language Model

2026 1 citations View Analysis →

Skill Retrieval Augmentation for Agentic AI

2026 41 citations View Analysis →

Can LLMs Be Effective Sensor Processing Copilots?

2026 1 citations

Group of Skills: Group-Structured Skill Retrieval for Agent Skill Libraries

2026 8 citations View Analysis →