让大模型通过自我探索优化工具文档,提升对工具的理解与使用能力
From Exploration to Mastery: Enabling LLMs to Master Tools via Self-Driven Interactions
- 基于大模型交互反馈动态修正工具文档,分三阶段迭代优化
- 在多个数据集上显著提升文档质量,使模型更准确使用工具
- 适合希望提升大模型工具调用能力的研究者和开发者
工具学习使大型语言模型(LLMs)可通过调用外部工具与环境交互,有效缓解其预训练数据中的局限性。在此过程中,工具文档提供使用说明,是促进模型有效利用工具的关键。本文聚焦于现有以人类为中心的工具文档存在不足与不准确所导致的模型理解鸿沟问题。提出新框架DRAFT,通过分析大模型与外部工具交互产生的反馈与尝试,动态优化工具文档。该方法采用创新的试错机制,包含经验收集、经验学习与文档重写三个阶段,持续提升文档质量。同时引入多样性探索策略以保证探索多样性,并设计工具自适应终止机制避免过拟合,提高效率。多数据集实验证明,基于反馈的迭代优化显著改善文档质量,增强大模型对工具的理解与使用效果。分析还发现,经本方法优化的文档具有良好的跨模型泛化能力。
原文摘要 · Abstract (English)
Tool learning enables Large Language Models (LLMs) to interact with external environments by invoking tools, serving as an effective strategy to mitigate the limitations inherent in their pre-training data. In this process, tool documentation plays a crucial role by providing usage instructions for LLMs, thereby facilitating effective tool utilization. This paper concentrates on the critical challenge of bridging the comprehension gap between LLMs and external tools due to the inadequacies and inaccuracies inherent in existing human-centric tool documentation. We propose a novel framework, DRAFT, aimed at Dynamically Refining tool documentation through the Analysis of Feedback and Trials emanating from LLMs' interactions with external tools. This methodology pivots on an innovative trial-and-error approach, consisting of three distinct learning phases: experience gathering, learning from experience, and documentation rewriting, to iteratively enhance the tool documentation. This process is further optimized by implementing a diversity-promoting exploration strategy to ensure explorative diversity and a tool-adaptive termination mechanism to prevent overfitting while enhancing efficiency. Extensive experiments on multiple datasets demonstrate that DRAFT's iterative, feedback-based refinement significantly ameliorates documentation quality, fostering a deeper comprehension and more effective utilization of tools by LLMs. Notably, our analysis reveals that the tool documentation refined via our approach demonstrates robust cross-model generalization capabilities.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。