ToolBench
收藏资源简介:
ToolBench 数据集是一个由模型自动生成的工具使用数据集。其构建过程主要包括三个阶段:首先,收集了16,464个真实的工具API,涵盖49个类别;其次,利用模型为这些API生成各种指令,包括单工具和多工具场景;最后,利用模型为每条指令搜索有效的解决方案路径。该数据集总共包含12.6万个实例,为工具调用提供了一个丰富的资源。
The ToolBench dataset is a tool usage dataset automatically generated by models. Its construction process consists of three main phases: first, 16,464 real tool APIs from 49 categories were collected; second, various instructions, including single-tool and multi-tool scenarios, were generated for these APIs by the model; finally, effective solution paths for each instruction were searched using the model. The dataset contains a total of 126,000 instances, providing a rich resource for tool invocation.
ToolBench 数据集概述
数据集简介
ToolBench 是一个用于评估大型语言模型(LLMs)在软件工具操作任务上表现的基准测试集。该数据集旨在研究开源LLMs与闭源模型在工具操作能力上的差距,并促进开源LLMs的发展。
数据集特点
- 包含多样化的真实世界软件工具任务
- 提供易于使用的基础设施直接评估模型执行成功率
- 支持多种工具和模型的评估
包含工具
- OpenWeather
- The Cat API
- Home Search
- Trip Booking
- Google Sheet
- VirtualHome
- Webshop
- Tabletop
数据集结构
每个任务在data/目录下按以下结构组织:
<task>/<version>/ ├── examples/ │ ├── 0_0.txt │ ├── ... ├── functions/ │ ├── search │ ├── ... └── test.jsonl
评估方法
使用test.py脚本评估模型在指定工具上的API函数调用成功率,支持以下参数配置:
- 任务选择
- 模型选择
- API检索数量
- 提示中的示例数量
使用示例
bash python test.py --task open_weather --version v0 --top_k_api 10 --top_k_example 3 --num_test_samples -1 --client_name "openai" --model_name text-davinci-003 --max_output_token 128
数据示例
每个任务提供API文档和使用示例,例如:
- OpenWeather: 获取天气和空气污染数据
- The Cat API: 管理喜欢的猫图片
- Home Search: 房屋搜索条件设置
- Trip Booking: 旅行票务和酒店预订
- Google Sheets: 电子表格操作
系统要求
- Conda (anaconda)
- Java >= 11.0.13
- 需要注册多个API密钥
安装步骤
- 创建虚拟环境
- 下载资源
- 安装依赖
- 运行测试验证安装
贡献
欢迎贡献新的动作生成算法和测试任务。




