arXiv:2410.12952cs.CL2024-10ICLR被引 46

让大模型学会多轮调用工具,提升复杂任务处理能力

Facilitating Multi-turn Function Calling for LLMs via Compositional Instruction Tuning

  • 通过自底向上构造任务、自顶向下生成交互轨迹,合成多轮函数调用数据
  • 构建8000条数据的BUTTONInstruct数据集,显著提升模型多轮工具调用能力
  • 适合需要规划与外部工具协作的复杂应用,如智能助手、自动化流程

大型语言模型在执行多样化任务方面展现出巨大潜力,包括调用函数或使用外部工具以增强性能。尽管当前研究主要关注单轮函数调用,本文针对多轮函数调用这一被忽视的需求展开探索——这对需要通过函数进行规划的复合型真实世界查询至关重要。为此,我们提出BUTTON方法,通过自底向上指令构建与自顶向下轨迹生成,合成组合式指令微调数据。底层阶段基于真实场景生成简单原子任务,并利用启发式策略组合成复合任务,同时为这些任务合成相应的函数定义。上层阶段则在多智能体环境中模拟人类、助手与工具间的交互,收集多轮函数调用轨迹。该方法确保了任务的组合性,并通过分析复合任务中的原子任务实现有效函数与轨迹生成。我们构建了包含8000个数据点的BUTTONInstruct数据集,并在多种大模型上通过大量实验验证其有效性。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have exhibited significant potential in performing diverse tasks, including the ability to call functions or use external tools to enhance their performance. While current research on function calling by LLMs primarily focuses on single-turn interactions, this paper addresses the overlooked necessity for LLMs to engage in multi-turn function calling--critical for handling compositional, real-world queries that require planning with functions but not only use functions. To facilitate this, we introduce an approach, BUTTON, which generates synthetic compositional instruction tuning data via bottom-up instruction construction and top-down trajectory generation. In the bottom-up phase, we generate simple atomic tasks based on real-world scenarios and build compositional tasks using heuristic strategies based on atomic tasks. Corresponding function definitions are then synthesized for these compositional tasks. The top-down phase features a multi-agent environment where interactions among simulated humans, assistants, and tools are utilized to gather multi-turn function calling trajectories. This approach ensures task compositionality and allows for effective function and trajectory generation by examining atomic tasks within compositional tasks. We produce a dataset BUTTONInstruct comprising 8k data points and demonstrate its effectiveness through extensive experiments across various LLMs.

大模型工具调用多轮交互指令微调

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。