[论文解读] API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMs
API-Bank 引入一个可运行的评估系统,包含 73 个 API 和 314 个对话,用于评估 LLM 的工具使用;并提出一种多代理方法,为工具增强模型(Lynx)生成训练数据。
Recent research has demonstrated that Large Language Models (LLMs) can enhance their capabilities by utilizing external tools. However, three pivotal questions remain unanswered: (1) How effective are current LLMs in utilizing tools? (2) How can we enhance LLMs' ability to utilize tools? (3) What obstacles need to be overcome to leverage tools? To address these questions, we introduce API-Bank, a groundbreaking benchmark, specifically designed for tool-augmented LLMs. For the first question, we develop a runnable evaluation system consisting of 73 API tools. We annotate 314 tool-use dialogues with 753 API calls to assess the existing LLMs' capabilities in planning, retrieving, and calling APIs. For the second question, we construct a comprehensive training set containing 1,888 tool-use dialogues from 2,138 APIs spanning 1,000 distinct domains. Using this dataset, we train Lynx, a tool-augmented LLM initialized from Alpaca. Experimental results demonstrate that GPT-3.5 exhibits improved tool utilization compared to GPT-3, while GPT-4 excels in planning. However, there is still significant potential for further improvement. Moreover, Lynx surpasses Alpaca's tool utilization performance by more than 26 pts and approaches the effectiveness of GPT-3.5. Through error analysis, we highlight the key challenges for future research in this field to answer the third question.
研究动机与目标
- 基于从 500 次访谈中汇总的用户需求,定义工具增强型 LLM 的设计原则和评估标准。
- 构建一个包含 73 个 API 和 314 个带注释对话的评估系统,用于测试规划、检索和 API 调用。
- 创建一种可扩展的训练数据生成方法(多代理),以生成多样化的工具使用对话。
- 在 API-Bank 数据上对工具增强型 LLM(Lynx)进行微调,并与已建立的 LLM 进行比较。
- 分析错误类型,识别 API 使用中的挑战,并为未来研究提供依据。
提出的方法
- 开发一个可执行的评估系统,包含 73 个 API 和 314 个工具使用对话,涵盖 753 次 API 调用。
- 对评估数据进行注释,以评估 Call、Retrieval+Call,以及 Plan+Retrieval+Call 能力。
- 引入 API Search,以在未知 API 时实现检索。
- 创建一个包含 2,138 个 API 和 1,888 个对话的训练数据集(4,149 次 API 调用),用于工具增强。
- 提出多代理数据生成(五个代理)以自动生成高质量、低成本的训练数据。
- 在 API-Bank 训练数据上对 Lynx(基于 LLaMA-7B)进行微调,并与多个基线模型进行评估。
实验结果
研究问题
- RQ1当前的 LLM 在规划、检索和调用任务中有效地利用外部 API 工具的程度如何?
- RQ2如何通过数据、训练和流水线设计改进 LLM 的工具使用?
- RQ3阻碍可靠且可扩展的工具增强型 LLM 的主要障碍是什么?
- RQ4高质量、多样化的训练数据集如何影响工具增强模型的性能?
主要发现
| LLM | Call - Correctness (%) | Call - Rouge-L | Retrieve+Call - Correctness (%) | Retrieve+Call - Rouge-L | Plan+Retrieve+Call - Correctness (%) | Plan+Retrieve+Call - Rouge-L | Total - Correctness (%) | Total - Rouge-L |
|---|---|---|---|---|---|---|---|---|
| Alpaca-7B | 24.06 | 0.0204 | 5.19 | 0.0019 | 0.00 | 0.086 | 15.19 | 0.0318 |
| ChatGLM-6B | 23.62 | 0.2451 | 13.33 | 0.2173 | 0.00 | 0.1522 | 16.42 | 0.2191 |
| GPT-3 Davinci | 0.50 | 0.1035 | 1.48 | 0.091 | 0.00 | 0.0156 | 0.57 | 0.0814 |
| GPT-3.5-turbo | 59.40 | 0.4598 | 38.52 | 0.3758 | 22.00 | 0.3809 | 47.16 | 0.4267 |
| GPT-4 | 63.66 | 0.3691 | 37.04 | 0.351 | 70.00 | 0.4808 | 60.24 | 0.3910 |
| Lynx-7B (Fine-tuned) | 49.87 | 0.4332 | 30.37 | 0.2503 | 20.00 | 0.3425 | 39.58 | 0.3794 |
- 相较于未经过指令微调的模型,GPT-3.5-turbo 和 GPT-4 显示出较强的工具使用能力,GPT-4 在规划方面表现出色。
- Lynx(在 API-Bank 上训练)在 API 调用正确性方面比 Alpaca-7B 高约 26 点,接近 GPT-3.5,显著缩小与 GPT-4 的差距。
- 一个全面的基准测试(API-Bank)为迄今为止的工具增强型 LLM 评估提供了最多样性、现实性和覆盖度。
- 多代理数据生成极大降低了标注成本(每对话 0.1 美元),并产生高质量的训练数据(可用性率 94%)。
- 错误分析将主要问题归因于 API 名称不匹配、错误的 API 调用和参数相关失败,为未来改进提供指导。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。