atlas

Research map / Large language models / Agents, code and math

ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs

ICLR 2024 · Large language models › Agents, code and math · approach: Mathematical and structural reasoning benchmarks

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces ToolLLM, a framework with the ToolBench instruction-tuning dataset (126k instances built with ChatGPT over 16k+ RapidAPI APIs), a DFS-based decision tree (DFSDT) for solution annotation, the ToolEval ChatGPT-based evaluator, and ToolLLaMA, a LLaMA-2 7B model fine-tuned for tool use with a neural API retriever.

Problem

Open-source LLMs lack tool-use capabilities for calling real-world APIs to fulfill complex, multi-tool instructions, because instruction tuning data largely ignores tool use and prior datasets have limited APIs, single-tool scenarios, and weak planning/reasoning.

Approach

Automatically build a large, real-API, multi-tool instruction dataset using ChatGPT function calls, annotate solution paths with a depth-first search decision tree (DFSDT) that backtracks from failed branches instead of single-path ReACT, and fine-tune LLaMA on the result, with an API retriever for large API pools.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Train the API retriever instead of using BM25ToolBench API retrieval · Average across I1, I2, and I3NDCG@1: 18.5 -> 78.0Helped
Use DFSDT instead of ReACT@NChatGPT annotation · I1pass rate: 49.4 -> 58.0Helped
Use DFSDT instead of ReACT@NChatGPT annotation · I2pass rate: 49.4 -> 70.6Helped
Use DFSDT instead of ReACT@NChatGPT annotation · I3pass rate: 34.6 -> 62.8Helped
Use DFSDT instead of ReACT (ablation)ToolLLaMA · ToolBench averagepass rate: 29.0 -> 66.7Helped
Use DFSDT instead of ReACT (ablation)ToolLLaMA · ToolBench averagewin rate: 47.0 -> 60.0Helped
Supply the top 5 retrieved APIs instead of the ground-truth API set (ablation)ToolLLaMA + DFSDT · ToolBench averagepass rate: 66.7 -> 67.3Helped
Supply the top 5 retrieved APIs instead of the ground-truth API set (ablation)ToolLLaMA + DFSDT · ToolBench averagewin rate: 60.0 -> 63.1Helped
Use ToolLLaMA + our retriever instead of Gorilla-RS + BM25OOD API use · HuggingFace APIBenchAST accuracy: 15.71 -> 16.77Helped
Use ToolLLaMA + our retriever instead of Gorilla-RS + BM25OOD API use · TorchHub APIBenchAST accuracy: 50.00 -> 51.16Helped
Use ToolLLaMA + our retriever instead of Gorilla-RS + BM25OOD API use · TensorHub APIBenchAST accuracy: 41.90 -> 40.59Hurt

Surprising findings

Limitations

Experimental setup

Datasets: ToolBench APIBench

Benchmarks: ToolBench APIBench

Metrics: pass rate win rate NDCG@1 NDCG@5 AST accuracy hallucination rate

Baselines: ChatGPT GPT-4 Text-Davinci-003 Claude-2 Vicuna Alpaca Gorilla BM25 text-embedding-ada-002 ReACT@N

Builds on: ReAct chain-of-thought Sentence-BERT positional interpolation AlpacaEval

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy