TPTU-v2:提升真实世界系统中基于大型语言模型的智能体的任务规划与工具使用能力
TPTU-v2: Boosting Task Planning and Tool Usage of Large Language Model-based Agents in Real-world Systems
AI总结:
针对真实系统中LLM任务规划与工具使用面临的API数量庞大、任务规划困难及API难以区分三大挑战,提出包含API Retriever、LLM Finetuner和Demo Selector的综合框架TPTU-v2,有效提升了智能体的任务规划与API调用能力。
摘要:
大型语言模型(LLMs)在处理需要结合任务规划和外部工具(如API)使用的任务方面已展现出卓越能力。然而,真实世界的复杂系统在任务规划和工具使用方面提出了三个普遍存在的挑战:(1)真实系统通常拥有庞大的API集合,由于token长度受限,无法将所有API的描述输入到LLM的提示中;(2)真实系统旨在处理复杂任务,而基础LLM难以为此类任务规划出正确的子任务顺序和API调用顺序;(3)真实系统中各API之间存在相似的语义和功能,这给LLM乃至人类在区分它们时均带来了挑战。作为回应,本文提出了一个综合框架,旨在增强在真实世界系统中运行的基于LLM的智能体的任务规划与工具使用(TPTU)能力。我们的框架包含三个关键组件以应对这些挑战:(1)API Retriever(API检索器)从海量可用API中为用户任务选择最相关的API;(2)LLM Finetuner(LLM微调器)对基础LLM进行微调,使微调后的LLM在任务规划和API调用方面具备更强能力;(3)Demo Selector(示例选择器)自适应地检索与难以区分的API相关的不同示例,进一步用于上下文学习以提升最终性能。我们使用真实世界的商业系统以及开源学术数据集验证了我们的方法,结果清晰地展示了各个独立组件及整体框架的有效性。
英文摘要:
Large Language Models (LLMs) have demonstrated proficiency in addressing tasks that necessitate a combination of task planning and the usage of external tools that require a blend of task planning and the utilization of external tools, such as APIs. However, real-world complex systems present three prevalent challenges concerning task planning and tool usage: (1) The real system usually has a vast array of APIs, so it is impossible to feed the descriptions of all APIs to the prompt of LLMs as the token length is limited; (2) the real system is designed for handling complex tasks, and the base LLMs can hardly plan a correct sub-task order and API-calling order for such tasks; (3) Similar semantics and functionalities among APIs in real systems create challenges for both LLMs and even humans in distinguishing between them. In response, this paper introduces a comprehensive framework aimed at enhancing the Task Planning and Tool Usage (TPTU) abilities of LLM-based agents operating within real-world systems. Our framework comprises three key components designed to address these challenges: (1) the API Retriever selects the most pertinent APIs for the user task among the extensive array available; (2) LLM Finetuner tunes a base LLM so that the finetuned LLM can be more capable for task planning and API calling; (3) the Demo Selector adaptively retrieves different demonstrations related to hard-to-distinguish APIs, which is further used for in-context learning to boost the final performance. We validate our methods using a real-world commercial system as well as an open-sourced academic dataset, and the outcomes clearly showcase the efficacy of each individual component as well as the integrated framework.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。