用自反思轨迹训练开源大模型,提升智能体自主纠错能力
Training LLM-Based Agents with Synthetic Self-Reflected Trajectories and Partial Masking
- 合成包含错误修正的自反思轨迹,让模型学会自我纠错
- 部分掩码策略防止错误路径被固化,性能在三任务上全面超越基线
- 适合想用开源模型打造强智能体的研究者和开发者
基于大语言模型的自主智能体随着LLM发展日益可行。然而,当前高性能智能体多依赖复杂的提示工程与闭源模型(如GPT-4)。尽管使用教师模型专家轨迹训练开源LLM已带来一定改进,但仍存在性能瓶颈和错误传播问题。为此,我们提出STeP方法:合成包含反思与纠错步骤的自反思轨迹,增强模型从教师模型学习的能力,使其具备自我反思与修正功能;同时引入部分掩码策略,防止模型内化错误或次优步骤。实验表明,该方法在ALFWorld、WebShop和SciWorld三个代表性任务上均显著提升智能体性能。以Qwen1.5-110B-Chat为教师模型,对开源模型LLaMA2-7B-Chat进行训练,仅需更少数据即可实现全面超越仅使用专家轨迹的基线方法。
原文摘要 · Abstract (English)
Autonomous agents, which perceive environments and take actions to achieve goals, have become increasingly feasible with the advancements in large language models (LLMs). However, current powerful agents often depend on sophisticated prompt engineering combined with closed-source LLMs like GPT-4. Although training open-source LLMs using expert trajectories from teacher models has yielded some improvements in agent capabilities, this approach still faces limitations such as performance plateauing and error propagation. To mitigate these challenges, we propose STeP, a novel method for improving LLM-based agent training. We synthesize self-reflected trajectories that include reflections and corrections of error steps, which enhance the effectiveness of LLM agents in learning from teacher models, enabling them to become agents capable of self-reflecting and correcting. We also introduce partial masking strategy that prevents the LLM from internalizing incorrect or suboptimal steps. Experiments demonstrate that our method improves agent performance across three representative tasks: ALFWorld, WebShop, and SciWorld. For the open-source model LLaMA2-7B-Chat, when trained using self-reflected trajectories constructed with Qwen1.5-110B-Chat as the teacher model, it achieves comprehensive improvements with less training data compared to agents trained exclusively on expert trajectories.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。