关于开源大语言模型的工具操作能力研究
On the Tool Manipulation Capability of Open-source Large Language Models
AI总结:
本文研究如何以实用量级人工监督增强开源大语言模型的工具操作能力,通过程序化数据生成、系统提示和上下文演示检索等方法,在ToolBench基准上使开源LLM成功率提升最高90%,并在部分任务上达到与GPT-4竞争的水平。
摘要:
近期关于使用大语言模型(LLMs)进行软件工具操作的研究大多依赖闭源模型API。由于将信息暴露给闭源LLM API服务存在安全性和鲁棒性风险,这些模型的工业应用受到显著限制。本文提出一个问题:能否在实用量级的人工监督下,增强开源LLM,使其在工具操作方面具备与领先闭源LLM API竞争的能力?通过分析常见的工具操作失败模式,我们首先证明开源LLM可能需要通过使用示例训练、上下文演示和生成风格规范来解决失败问题。这些发现促使我们重新审视LLM文献中的经典方法,并证明可以将其改造为模型对齐手段,结合程序化数据生成、系统提示和上下文演示检索器,以增强开源LLM的工具操作能力。为评估这些技术,我们构建了ToolBench,一个由面向真实世界任务的多样化软件工具组成的工具操作基准。我们证明,我们的技术可将领先开源LLM的成功率提升最高达90%,在8项ToolBench任务中的4项上展现出与OpenAI GPT-4相竞争的能力。我们还表明,这种增强通常每个工具需要约一个开发者工作日来整理数据,从而提供了一种具有实用量级人工监督的方案。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。