arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.07487cs.AI
收藏

CLEAR:通过代理反思进行经验对比学习的上下文增强

CLEAR: Context Augmentation from Contrastive Learning of Experience via Agentic Reflection

AWS AI Labs(亚马逊云科技人工智能实验室)

Linbo Liu, Guande Wu, Han Ding, Yawei Wang, Qiang Zhou, Yuzhe Lu, Zhichao Xu, Huan Song, Panpan Xu, Lin Lee Cheong

AI总结:

CLEAR通过对比学习经验的代理反思生成上下文,提升任务完成率和奖励。

摘要:

大型语言模型代理依赖有效的上下文来获取任务相关信息进行决策。现有上下文工程方法主要依赖过去经验生成的上下文和检索机制。然而,从过去任务检索的上下文必须由执行代理适应新情况,增加了底层LLM的推理负担。为解决这一限制,我们提出了一种生成上下文增强框架,利用代理反思进行经验对比学习(CLEAR)。CLEAR首先使用反思代理对过去执行轨迹进行对比分析,并为每个观察到的任务总结有用的上下文。这些总结随后用作监督微调数据来训练上下文增强模型(CAM)。然后我们进一步用强化学习优化CAM,其中奖励信号通过运行任务执行代理获得。通过学习生成任务特定知识而不是从过去检索知识,CAM生成更适合当前任务的上下文。我们在AppWorld和WebShop基准上进行了全面评估。实验结果表明,CLEAR在任务完成率和奖励方面均优于强基线。在AppWorld测试集上,任务完成率从72.62%提升至81.15%,在WebShop子集上平均奖励从0.68提升至0.74。我们的代码已公开在https://github.com/awslabs/CLEAR。

英文摘要:

Large language model agents rely on effective model context to obtain task-relevant information for decision-making. Many existing context engineering approaches primarily rely on the context generated from the past experience and retrieval mechanisms that reuse these context. However, retrieved context from past tasks must be adapted by the execution agent to fit new situations, placing additional reasoning burden on the underlying LLM. To address this limitation, we propose a generative context augmentation framework using Contrastive Learning of Experience via Agentic Reflection (CLEAR). CLEAR first employs a reflection agent to perform contrastive analysis over past execution trajectories and summarize useful context for each observed task. These summaries are then used as supervised fine-tuning data to train a context augmentation model (CAM). Then we further optimize CAM using reinforcement learning, where the reward signal is obtained by running the task execution agent. By learning to generate task-specific knowledge rather than retrieve knowledge from the past, CAM produces context that is better tailored to the current task. We conduct comprehensive evaluations on the AppWorld and WebShop benchmarks. Experimental results show that CLEAR consistently outperforms strong baselines. It improves task completion rate from 72.62% to 81.15% on AppWorld test set and averaged reward from 0.68 to 0.74 on a subset of WebShop, compared with baseline agent. Our code is publicly available at https://github.com/awslabs/CLEAR.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑