想象空间中的大语言模型:通过模拟试错进行工具学习
LLMs in the Imaginarium: Tool Learning through Simulated Trial and Error
AI总结:
针对现有大语言模型工具使用准确率低的问题,提出受生物启发的模拟试错方法,结合想象、试错与记忆机制,在ToolBench上显著提升模型性能,还支持工具持续学习。
摘要:
工具对于大语言模型(LLMs)获取最新信息、在外部环境中执行重要行动至关重要。现有的工具增强LLM研究主要聚焦于工具的覆盖广度以及新增工具的灵活性。然而,一个令人惊讶的被研究不足的关键问题是:LLM使用其接受过训练的工具的准确率究竟有多高。我们发现,现有LLM(包括GPT-4以及专门针对工具使用进行微调的开源LLM)的正确率仅在30%到60%之间,远达不到实际可靠使用的要求。我们提出了一种受生物启发的工具增强LLM方法——模拟试错(simulated trial and error, STE),它整合了生物系统中促成成功工具使用行为的三种关键机制:试错、想象与记忆。具体而言,STE利用LLM的“想象”来模拟合理的工具使用场景,随后LLM与工具进行交互,从执行反馈中学习。该方法分别采用短期记忆和长期记忆来提升探索的深度与广度。在ToolBench(工具学习基准数据集)上的综合实验表明,STE在上下文学习和微调两种设置下都大幅提升了LLM的工具学习效果,为Mistral-Instruct-7B带来了46.7%的性能提升,使其表现超越了GPT-4。我们还通过一种简单的经验回放策略,验证了该方法可实现有效的工具持续学习。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。