通过组合式指令微调促进大型语言模型的多轮函数调用
Facilitating Multi-turn Function Calling for LLMs via Compositional Instruction Tuning
AI总结:
本文提出BUTTON方法,通过自下而上构建组合任务和自上而下生成多智能体交互轨迹来创建合成指令微调数据,构建了包含8k数据点的BUTTONInstruct数据集,有效提升了LLMs的多轮函数调用能力。
摘要:
大型语言模型(LLMs)在执行多样化任务中展现出巨大潜力,包括调用函数或使用外部工具来提升其性能。尽管当前关于LLMs函数调用的研究主要集中在单轮交互上,本文探讨了被忽视的LLMs多轮函数调用需求——这对于处理需要规划函数而不仅是使用函数的组合式现实世界查询至关重要。为此,我们引入了一种方法BUTTON,该方法通过自下而上的指令构建和自上而下的轨迹生成来生成合成组合指令微调数据。在自下而上阶段,我们基于现实场景生成简单的原子任务,并利用基于原子任务的启发式策略构建组合任务。随后为这些组合任务合成相应的函数定义。自上而下阶段采用多智能体环境,利用模拟的人类、助手和工具之间的交互来收集多轮函数调用轨迹。该方法确保了任务组合性,并允许通过检查组合任务中的原子任务来有效生成函数和轨迹。我们构建了包含8k数据点的数据集BUTTONInstruct,并通过在各种LLMs上的大量实验证明了其有效性。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。