TOOLE
收藏资源简介:
TOOLE数据集由理海大学等机构的研究人员创建,包含21,127条用户查询,旨在评估大型语言模型(LLMs)的工具使用意识和选择能力。数据集涵盖多种类型的查询,包括单工具和多工具场景,用于触发LLMs使用工具。该数据集通过多种提示方法生成,包括情感生成、关键词生成等,以解决工具功能重叠的挑战。TOOLE数据集的应用领域包括自动化决策支持,旨在解决LLMs在工具使用和选择上的不足,推动智能代理的发展。
The TOOLE dataset was developed by researchers from Lehigh University and other affiliated institutions, comprising 21,127 user queries. It is designed to evaluate the tool usage awareness and selection capabilities of large language models (LLMs). The dataset encompasses diverse query types, including single-tool and multi-tool scenarios, to elicit tool usage behaviors from LLMs. Generated via multiple prompting approaches such as sentiment generation and keyword generation, the TOOLE dataset addresses the challenge of overlapping tool functionalities. Its application domains cover automated decision support, aiming to mitigate the deficiencies of LLMs in tool utilization and selection, and advance the development of AI Agents.
MetaTool Benchmark: Deciding Whether to Use Tools and Which to Use
简介
MetaTool 是一个评估大型语言模型(LLMs)是否具有工具使用意识并能正确选择工具的基准。它包括:
- ToolE 数据集:包含多种类型的用户查询,以触发LLMs使用工具,包括单工具和多工具场景。
- 多种任务:设置工具使用意识和工具选择任务。定义了四个子任务,从不同角度进行工具选择,包括相似选择、特定场景选择、可靠性问题选择和多工具选择。
- 九种LLMs的实验结果:对九种流行的LLMs进行实验,发现大多数模型在有效选择工具方面仍有困难,突显了LLMs与真正智能代理之间的差距。
ToolE 数据集
数据集生成
ToolE 数据集包含21.1万个与工具使用相关的多样化用户查询。每个条目包括用户请求(即查询)及其对应的工具名称和工具描述。
数据集统计
| 生成方法 | 模型 | 样本数量 |
|---|---|---|
| 直接生成 | ChatGPT, GPT-4 | 11,700 |
| 情感生成 | ChatGPT | 7,800 |
| 关键词生成 | ChatGPT | 1,950 |
| 详细生成 | ChatGPT | 7,800 |
| 多工具生成 | ChatGPT, GPT-4 | 1,624 |
| 检查后 | 21,127 (20,630 单工具 + 497 多工具) |
数据集文件
- 单工具数据:
dataset/data/all_clean_data.csv - 多工具数据:
dataset/data/multi_tool_query_golden.json - 所有工具描述:
dataset/plugin_des.json - OpenAI插件商店的元数据:
dataset/plugin_info.json - 合并数据描述:
dataset/big_tool_des.json - 工具描述的嵌入:
dataset/tool_embedding.pkl - 场景工具列表(论文中的表10):
dataset/scenario
评估结果
工具使用意识
工具选择
快速开始
安装包
shell pip install --upgrade pip pip install -r requirements.txt
下载模型
- 在
src/generation/.env文件中设置HF_HOME环境变量,指定Hugging Face模型缓存文件夹。 - 使用以下命令下载模型: shell python src/generation/model_download.py --model_path lmsys/vicuna-7b-v1.3
工具嵌入
使用milvus存储工具嵌入并进行相似性搜索。
构建提示数据
预定义的提示模板在src/prompt/prompt_template中。
生成结果
通过运行run.sh脚本生成结果,可能需要根据需要修改运行参数。
故障排除
如果遇到Python导入错误,可能需要将此目录添加到Python路径中: shell
添加系统路径
src_path="$(pwd)/src" export PYTHONPATH="$PYTHONPATH:$src_path"
引用
@article{huang2023metatool, title = {MetaTool Benchmark: Deciding Whether to Use Tools and Which to Use}, author = {Yue Huang and Jiawen Shi and Yuan Li and Chenrui Fan and Siyuan Wu and Qihui Zhang and Yixin Liu and Pan Zhou and Yao Wan and Neil Zhenqiang Gong and Lichao Sun}, year = {2023}, journal = {arXiv preprint arXiv: 2310.03128} }




