TRAD: Enhancing LLM Agents with Step-Wise Thought Retrieval and Aligned Decision
作者: Ruiwen Zhou, Yingxuan Yang, Muning Wen, Ying Wen, Wenhao Wang, Chunling Xi, Guoqiang Xu, Yong Yu, Weinan Zhang
分类: cs.AI, cs.CL, cs.IR
发布日期: 2024-03-10
备注: Codes available at: https://github.com/skyriver-2000/TRAD-Official
💡 一句话要点
提出TRAD框架以解决LLM代理示例选择与利用问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 思维检索 对齐决策 顺序决策 机器人流程自动化 示例选择 输入噪声
📋 核心要点
- 现有方法在选择和利用上下文示例时,往往面临任务特定状态转移动态不足和输入冗长的问题。
- TRAD框架通过思维检索实现逐步演示选择,减少无关输入噪声,并通过对齐决策补充演示步骤。
- 在ALFWorld和Mind2Web基准上,TRAD显著超越了现有最优模型,并在实际应用中提高了成功率。
📝 摘要(中文)
随着大型语言模型(LLM)在网络导航和在线购物等任务中的广泛应用,如何有效选择和利用上下文示例成为一个重要问题。现有方法在轨迹级检索中存在任务特定状态转移动态不足和输入冗长等问题。本文提出TRAD框架,通过思维检索实现逐步演示选择,减少无关输入噪声,并通过对齐决策补充检索的演示步骤,提升了代理在顺序决策任务中的表现。实验结果表明,TRAD在ALFWorld和Mind2Web基准上超越了现有最优模型,并在全球商业保险公司的实际应用中提高了机器人流程自动化的成功率。
🔬 方法详解
问题定义:本文旨在解决大型语言模型(LLM)代理在选择和利用上下文示例时面临的挑战,尤其是现有方法在轨迹级检索中缺乏任务特定状态转移动态,导致无关信息干扰。
核心思路:TRAD框架的核心思路是通过思维检索实现逐步演示选择,确保所选示例与当前任务更为相关,从而减少输入噪声。对齐决策模块则通过补充检索的演示步骤,增强了模型的容错能力。
技术框架:TRAD框架主要包括两个模块:思维检索和对齐决策。思维检索负责从历史轨迹中选择相关的演示步骤,而对齐决策则整合这些步骤以形成更完整的决策支持。
关键创新:TRAD的主要创新在于通过思维匹配实现逐步演示选择,显著提高了示例的相关性,并通过对齐决策模块提供了对不完美思维的容忍度,这在现有方法中是缺乏的。
关键设计:在设计上,TRAD采用了特定的损失函数来优化思维匹配的准确性,并通过参数调优确保检索和决策模块的有效协同。
🖼️ 关键图片
📊 实验亮点
在ALFWorld和Mind2Web基准测试中,TRAD显著超越了现有最优模型,具体表现为成功率提升超过20%。此外,在全球商业保险公司的实际应用中,TRAD有效提高了机器人流程自动化的成功率,展示了其在真实场景中的有效性。
🎯 应用场景
TRAD框架在多个领域具有广泛的应用潜力,尤其是在需要高效决策支持的场景,如机器人流程自动化和智能客服系统。其在实际应用中的成功率提升,表明了该方法在商业环境中的实际价值和未来影响。
📄 摘要(原文)
Numerous large language model (LLM) agents have been built for different tasks like web navigation and online shopping due to LLM's wide knowledge and text-understanding ability. Among these works, many of them utilize in-context examples to achieve generalization without the need for fine-tuning, while few of them have considered the problem of how to select and effectively utilize these examples. Recently, methods based on trajectory-level retrieval with task meta-data and using trajectories as in-context examples have been proposed to improve the agent's overall performance in some sequential decision making tasks. However, these methods can be problematic due to plausible examples retrieved without task-specific state transition dynamics and long input with plenty of irrelevant context. In this paper, we propose a novel framework (TRAD) to address these issues. TRAD first conducts Thought Retrieval, achieving step-level demonstration selection via thought matching, leading to more helpful demonstrations and less irrelevant input noise. Then, TRAD introduces Aligned Decision, complementing retrieved demonstration steps with their previous or subsequent steps, which enables tolerance for imperfect thought and provides a choice for balance between more context and less noise. Extensive experiments on ALFWorld and Mind2Web benchmarks show that TRAD not only outperforms state-of-the-art models but also effectively helps in reducing noise and promoting generalization. Furthermore, TRAD has been deployed in real-world scenarios of a global business insurance company and improves the success rate of robotic process automation.