OpenBMB/ToolBench
Python
Captured source
source ↗OpenBMB/ToolBench
Description: [ICLR'24 spotlight] An open platform for training, serving, and evaluating large language model for tool learning.
Language: Python
License: Apache-2.0
Stars: 5663
Forks: 485
Open issues: 161
Created: 2023-05-28T03:46:17Z
Pushed: 2025-05-21T15:46:59Z
Default branch: master
Fork: no
Archived: no
README:
🛠️ToolBench🤖
Model • Data Release • Web Demo • Tool Eval • Paper • Citation
🔨This project (ToolLLM) aims to construct open-source, large-scale, high-quality instruction tuning SFT data to facilitate the construction of powerful LLMs with general tool-use capability. We aim to empower open-source LLMs to master thousands of diverse real-world APIs. We achieve this by collecting a high-quality instruction-tuning dataset. It is constructed automatically using the latest ChatGPT (gpt-3.5-turbo-16k), which is upgraded with enhanced function call capabilities. We provide the dataset, the corresponding training and evaluation scripts, and a capable model ToolLLaMA fine-tuned on ToolBench.
2024.8 Update We have updated the RapidAPI server with a new IP, please make sure you get the latest code. You can also build it locally using codes here.
💁♂️💁💁♀️ Join Us on [Discord](https://discord.gg/NScFnpMuRQ)!
*Read this in [中文](README_ZH.md).*
What's New
- [2024/3/17] Welcome to [StableToolBench](https://github.com/zhichengg/StableToolBench):
A stable and reliable local toolbench server based on API response simulation. Dive deeper into the tech behind StableToolBench with paper here and explore more on the project homepage. Codes are available here.
- [2023/9/29] A new version ToolEval which is more stable and covers more models including GPT4! Please refer to **ToolEval** for more details. Besides, **ToolLLaMA-2-7b-v2** is released with stronger tool-use capabilities. Please use the ToolLLaMA-2-7b-v2 model to reproduce our latest experimental results with the new version ToolEval.
- [2023/8/30] Data updation, with more than 120,000 solution path annotations and intact reasoning thoughts! Please find
data.zipon Google Drive.
- [2023/8/8] No more hallucination! **ToolLLaMA-2-7b-v1** (fine-tuned from LLaMA-2-7b) is released with lower API hallucination than ChatGPT.
- [2023/8/4] We provide RapidAPI backend service to free you from using your own RapidAPI key and subscribing the APIs. Please fill out our form. We will review it as soon as possible and send you the ToolBench key to get start on it!
- [2023/8/1] Our **paper** is released.
- [2023/7/27] New version ToolBench is released.
✨Here is an overview of the dataset construction, training, and evaluation.
✨✨Features:
- API Collection: we gather 16464 representational state transfer (REST) APIs from RapidAPI, a platform that hosts massive real-world APIs provided by developers.
- Instruction Generation: we curate instructions that involve both single-tool and multi-tool scenarios.
- Answer Annotation: we develop a novel depth-first search based decision tree (DFSDT) to bolster the planning and reasoning ability of LLMs, which significantly improves the annotation efficiency and successfully annotates those complex instructions that cannot be answered with CoT or ReACT. We provide responses that not only include the final answer but also incorporate the model's reasoning process, tool execution, and tool execution results.
- API Retriver: we incorporate API retrieval to equip ToolLLaMA with open-domain tool-using abilities.
- All the data is automatically generated by OpenAI API and filtered by us, the whole data creation process is easy to scale up.
We also provide A demo of using ToolLLaMA
Currently, our ToolLLaMA has reached the performance of ChatGPT (turbo-16k) in tool use, in the future, *we will continually improve the data quality and increase the coverage of real-world tools.*
Here is the *Old version* of ToolBench.
Data
👐ToolBench is intended solely for research and educational purposes and should not be construed as reflecting the opinions or views of the creators, owners, or contributors of this dataset. It is distributed under Apache License 2.0. Below is the statistics of the data :
| Tool Nums | API Nums | Instance Nums | Real API Call | Reasoning Traces | |-----------|----------|---------------|---------------|------------------| | 3451 | 16464 | 126486 | 469585 | 4.0 |
We crawl 16000+ real-world APIs from RapidAPI, and curate realistic human instructions that involve them. Below we present a hierarchy of RapidAPI and our instruction generation process.
ToolBench contains both single-tool and multi-tool scenarios. The multi-tool scenarios can be further categorized into intra-category multi-tool and intra-collection multi-tool. We utilize DFSDT method for all scenarios to our data creation. Here is an illustration for the data creation process using DFSDT method:
Data Release
Please download our dataset using the following link: Google Drive or Tsinghua Cloud. *Notice that data_0801 is the old version data.* The file structure is as follows:
├── /data/ │ ├── /instruction/ │ ├── /answer/ │ ├── /toolenv/ │ ├── /retrieval/ │ ├── /test_instruction/ │ ├── /test_query_ids/ │ ├── /retrieval_test_query_ids/ │ ├── toolllama_G123_dfs_train.json │ └── toolllama_G123_dfs_eval.json ├── /reproduction_data/ │ ├── /chatgpt_cot/ │ ├── /chatgpt_dfs/ │ ├── ... │ └── /toolllama_dfs/
Here are some descriptions for the data directory:
instructionandanswer:…
Excerpt shown — open the source for the full document.