LLMs in the Imaginarium: Tool Learning through Simulated Trial and Error
作者: Boshi Wang, Hao Fang, Jason Eisner, Benjamin Van Durme, Yu Su
分类: cs.CL, cs.AI, cs.LG
发布日期: 2024-03-07
备注: Code and data available at https://github.com/microsoft/simulated-trial-and-error
💡 一句话要点
提出模拟试错方法以提升工具学习的准确性
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 工具学习 模拟试错 生物启发 持续学习 智能助手 自动化工具
📋 核心要点
- 现有工具增强LLMs的研究未能有效解决模型在工具使用中的准确性问题,导致其实际应用受限。
- 论文提出的模拟试错方法通过试错、想象和记忆机制,提升LLMs对工具的学习能力。
- 实验结果显示,STE方法在工具学习上显著提升了模型性能,Mistral-Instruct-7B的表现提升了46.7%。
📝 摘要(中文)
工具对于大型语言模型(LLMs)获取最新信息和在外部环境中采取重要行动至关重要。现有的工具增强LLMs的研究主要集中在工具的广泛覆盖和灵活添加新工具上。然而,LLMs在使用其训练过的工具时的准确性却鲜有研究。我们发现,包括GPT-4在内的现有LLMs,其工具使用的正确率仅在30%到60%之间,远未达到实际应用的可靠性。为此,我们提出了一种生物启发的方法——模拟试错(STE),它协调了生物系统中成功工具使用行为的三个关键机制:试错、想象和记忆。STE利用LLM的“想象力”模拟工具使用的合理场景,随后与工具交互以学习执行反馈。综合实验表明,STE在工具学习上显著提升了LLMs的表现,尤其在Mistral-Instruct-7B上提升了46.7%,并使其超越了GPT-4。
🔬 方法详解
问题定义:本论文旨在解决大型语言模型在工具使用中的准确性不足问题。现有方法虽然关注工具的覆盖面和灵活性,但在实际使用中,LLMs的正确率仅为30%到60%。
核心思路:论文提出的模拟试错(STE)方法,借鉴生物系统中的学习机制,通过试错、想象和记忆来提升LLMs的工具使用能力。STE利用LLM的想象力模拟工具使用场景,并通过与工具的交互学习反馈。
技术框架:STE方法的整体架构包括三个主要模块:1) 试错机制,通过模拟场景进行探索;2) 想象机制,生成合理的工具使用情境;3) 记忆机制,利用短期和长期记忆分别提升探索的深度和广度。
关键创新:STE方法的核心创新在于将生物启发的学习机制引入LLMs的工具学习中,显著提升了模型的工具使用准确性,与传统方法相比,提供了更为系统的学习框架。
关键设计:在STE方法中,关键设计包括短期和长期记忆的有效结合,以及通过经验重放策略实现的持续学习。这些设计确保了模型在不同学习阶段的适应性和灵活性。
🖼️ 关键图片
📊 实验亮点
实验结果表明,STE方法在ToolBench上的表现显著提升,Mistral-Instruct-7B的工具学习准确性提高了46.7%,超越了GPT-4。这一结果展示了STE方法在工具学习中的有效性和潜力。
🎯 应用场景
该研究的潜在应用领域包括智能助手、自动化工具和机器人控制等。通过提升LLMs在工具使用中的准确性,可以显著增强其在实际任务中的表现,推动智能系统的广泛应用和发展。
📄 摘要(原文)
Tools are essential for large language models (LLMs) to acquire up-to-date information and take consequential actions in external environments. Existing work on tool-augmented LLMs primarily focuses on the broad coverage of tools and the flexibility of adding new tools. However, a critical aspect that has surprisingly been understudied is simply how accurately an LLM uses tools for which it has been trained. We find that existing LLMs, including GPT-4 and open-source LLMs specifically fine-tuned for tool use, only reach a correctness rate in the range of 30% to 60%, far from reliable use in practice. We propose a biologically inspired method for tool-augmented LLMs, simulated trial and error (STE), that orchestrates three key mechanisms for successful tool use behaviors in the biological system: trial and error, imagination, and memory. Specifically, STE leverages an LLM's 'imagination' to simulate plausible scenarios for using a tool, after which the LLM interacts with the tool to learn from its execution feedback. Both short-term and long-term memory are employed to improve the depth and breadth of the exploration, respectively. Comprehensive experiments on ToolBench show that STE substantially improves tool learning for LLMs under both in-context learning and fine-tuning settings, bringing a boost of 46.7% to Mistral-Instruct-7B and enabling it to outperform GPT-4. We also show effective continual learning of tools via a simple experience replay strategy.