Skip to main content
QUICK REVIEW

[论文解读] On the Tool Manipulation Capability of Open-source Large Language Models

Qiantong Xu, Fenglu Hong|arXiv (Cornell University)|May 25, 2023
Software Engineering ResearchComputer Science被引用 11
一句话总结

开源大语言模型在工具操作方面落后 GPT-4,但通过与程序化数据对齐、示范检索和系统提示可以将它们在成功率上提升至最高 90%,并在 8 项 ToolBench 任务中的 4 项达到与 GPT-4 的竞争力,且有实际的人类监督。

ABSTRACT

Recent studies on software tool manipulation with large language models (LLMs) mostly rely on closed model APIs. The industrial adoption of these models is substantially constrained due to the security and robustness risks in exposing information to closed LLM API services. In this paper, we ask can we enhance open-source LLMs to be competitive to leading closed LLM APIs in tool manipulation, with practical amount of human supervision. By analyzing common tool manipulation failures, we first demonstrate that open-source LLMs may require training with usage examples, in-context demonstration and generation style regulation to resolve failures. These insights motivate us to revisit classical methods in LLM literature, and demonstrate that we can adapt them as model alignment with programmatic data generation, system prompts and in-context demonstration retrievers to enhance open-source LLMs for tool manipulation. To evaluate these techniques, we create the ToolBench, a tool manipulation benchmark consisting of diverse software tools for real-world tasks. We demonstrate that our techniques can boost leading open-source LLMs by up to 90% success rate, showing capabilities competitive to OpenAI GPT-4 in 4 out of 8 ToolBench tasks. We show that such enhancement typically requires about one developer day to curate data for each tool, rendering a recipe with practical amount of human supervision.

研究动机与目标

  • 识别阻碍开源大语言模型进行工具操作的关键挑战(API 选择、参数填充、不可执行的生成)。
  • 提出一个实用、低人监督量的方案,通过模型对齐、示范检索和系统提示来提升开源大语言模型。
  • 介绍 ToolBench——一个用以在开源大语言模型与封闭 API 间评估工具操作的基准。
  • 量化改进并评估人类监督需求的可行性(数据模板、示例演示)。
  • 演示在真实工具上,开源大语言模型接近或达到 GPT-4 性能的条件。

提出的方法

  • 通过程序化生成的使用数据对齐模型,以内化 API 使用知识。
  • 示范检索,提供对未见 API 组合具有语义相似性的上下文示例。
  • 系统提示设计,将生成限定为可执行的 API 调用和指定格式。
  • 将 ToolBench 作为一个开源基准,包含跨不同工具和目标的测试用例用于定量评估。
  • 与 GPT-4 API 的经验比较及消融研究,以评估各技术的贡献。
  • 使用 BM25 风格的检索器来选择相关演示和模板以覆盖 API。
Figure 1 : Tool manipulation setup. We augment LLMs as action generators with access to API documentations. In a single-step scenario, an action generator directly generates API calls to accomplish the goal. A multi-step action generator iterates with an environment using API calls and generates the
Figure 1 : Tool manipulation setup. We augment LLMs as action generators with access to API documentations. In a single-step scenario, an action generator directly generates API calls to accomplish the goal. A multi-step action generator iterates with an environment using API calls and generates the

实验结果

研究问题

  • RQ1在实际可获得的人类监督量下,开源大语言模型能否实现具有竞争力的工具操作?
  • RQ2开源大语言模型在 API 选择、参数填充和可执行生成方面的主要失败模式是什么,以及如何缓解?
  • RQ3模型对齐、示范检索和系统提示各自对性能提升的贡献有多大?
  • RQ4ToolBench 基准是否揭示开源大语言模型与 GPT-4 之间的一致性差距,且能否在某些任务子集上缩小差距?
  • RQ5实现显著改进所需的实际成本(人类监督)是多少?

主要发现

  • 开源大语言模型在零-shot 设置下的工具操作能力与 GPT-4 存在较大差距。
  • 模型对齐、示范检索和系统提示可以在 ToolBench 任务中将开源大语言模型的成功率提升至高达 90%。
  • 增强后的开源大语言模型在 8 项 ToolBench 任务中有 4 项达到与 GPT-4 相竞争或更优的表现。
  • 示范检索在具有 O(n) 演示库的情况下,未见 API 组合目标的提升可达 79%。
  • 平均而言,数据对齐大约需要每个工具一天的开发者工作量,表明实际的人类监督水平。
  • ToolBench 提供一个公开可用的基准,包含预定义的测试用例和多样化任务,便于可靠的开源与封闭模型对比。
Figure 3 : Programmatic training data generation using templates and random values
Figure 3 : Programmatic training data generation using templates and random values

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。