While large language model (LLM) agents have demonstrated impressive problem-solving capabilities, they typically operate as static systems, lacking the ability to evolve through lifelong interaction. Existing attempts to bridge this gap primarily rely on retrieving successful past trajectories as demonstrations. However, this paradigm faces two critical limitations. First, by focusing solely on success, agents overlook the rich pedagogical value embedded in failed attempts, preventing them from identifying and avoiding recurrent pitfalls. Second, continually accumulating textual experiences not only increases the time consumption during retrieval but also inevitably introduces noise and exhausts the largest context window of current LLMs. To address these challenges, we propose a novel self-evolving framework for LLM agents that introduces a complementary evolution mechanism: First, a contrastive reflection strategy is introduced to explicitly summarize error-prone patterns and capture reusable insights. Second, we propose a self-consolidation mechanism that distills non-parametric textual experience into compact learnable parameters. This enables the agent to internalize extensive historical experience directly into its latent space. Extensive experiments demonstrate the advantages of our method in long-term agent evolution.
翻译:尽管大型语言模型(LLM)智能体已展现出令人印象深刻的问题解决能力,但它们通常作为静态系统运行,缺乏通过终身交互实现演进的能力。现有弥补这一差距的尝试主要依赖于检索过往成功轨迹作为演示范例。然而,该范式面临两个关键局限:首先,仅聚焦于成功案例使智能体忽视了蕴含于失败尝试中的丰富教学价值,导致其无法识别并规避重复性错误;其次,持续积累的文本经验不仅增加了检索阶段的时间消耗,还不可避免地引入噪声并耗尽当前LLM的最大上下文窗口。为应对这些挑战,我们提出了一种新颖的LLM智能体自演进框架,该框架引入互补的演进机制:其一,采用对比反思策略显式总结易错模式并捕捉可复用的经验洞见;其二,设计自巩固机制将非参数化的文本经验提炼为紧凑的可学习参数。这使得智能体能够将大量历史经验直接内化至其潜在表示空间。大量实验验证了本方法在长期智能体演进中的优势。