Large Language Model (LLM) agents significantly extend the capabilities of standalone LLMs, empowering them to interact with external tools (e.g., APIs, functions) and complete various tasks in a self-directed fashion. The challenge of tool use demands that LLMs not only understand user queries and generate answers accurately but also excel in task planning, tool invocation, and result summarization. While traditional works focus on training a single LLM with all these capabilities, performance limitations become apparent, particularly with smaller models. To overcome these challenges, we propose a novel approach that decomposes the aforementioned capabilities into a planner, caller, and summarizer. Each component is implemented by a single LLM that focuses on a specific capability and collaborates with others to accomplish the task. This modular framework facilitates individual updates and the potential use of smaller LLMs for building each capability. To effectively train this framework, we introduce a two-stage training paradigm. First, we fine-tune a backbone LLM on the entire dataset without discriminating sub-tasks, providing the model with a comprehensive understanding of the task. Second, the fine-tuned LLM is used to instantiate the planner, caller, and summarizer respectively, which are continually fine-tuned on respective sub-tasks. Evaluation across various tool-use benchmarks illustrates that our proposed multi-LLM framework surpasses the traditional single-LLM approach, highlighting its efficacy and advantages in tool learning.
翻译:大型语言模型(LLM)智能体显著扩展了独立LLM的能力,使其能够自主与外部工具(如API、函数)交互并完成各类任务。工具使用这一挑战要求LLM不仅需要准确理解用户查询并生成答案,还需在任务规划、工具调用和结果总结方面表现出色。传统研究侧重于训练单一LLM具备所有上述能力,但在较小模型中性能受限的问题尤为突出。为克服这些挑战,我们提出了一种新方法,将前述能力分解为规划器、调用器和总结器。每个组件由专注于特定能力的单一LLM实现,并通过协作完成目标任务。这种模块化框架便于对各组件进行独立更新,并可能利用较小LLM构建各项能力。为有效训练该框架,我们引入两阶段训练范式:首先,在不区分子任务的情况下对整个数据集微调骨干LLM,使其获得对任务的全面理解;其次,将微调后的LLM分别实例化为规划器、调用器和总结器,并持续对各子任务进行微调。在多个工具使用基准测试上的评估表明,我们提出的多LLM框架优于传统单LLM方法,凸显了其在工具学习中的有效性和优势。