arXiv:2505.00234cs.LGcs.CL2025-05NeurIPS被引 19

让大模型自己总结成功经验,自动提升决策能力。

Self-Generated In-Context Examples Improve LLM Agents for Sequential Decision-Making Tasks

  • 用自身成功经历生成示例,构建可复用的上下文知识库。
  • 在多个任务上性能提升显著,最高达93%成功率。
  • 无需人工设计,适合希望自动化优化Agent的研究者。

提升大语言模型(LLM)在序列决策任务中的表现通常依赖大量特定任务的知识工程——定制提示、精选示例和专用观测/动作空间。本文提出一种新方法:让模型通过自主学习自身成功经验实现自我改进,无需人工干预。该方法构建并迭代优化一个由自生成轨迹组成的数据库,作为未来任务的上下文示例。即使仅简单积累成功轨迹,也在三个不同基准上实现显著性能提升:ALFWorld(73%→89%)、Wordcraft(55%→64%)、InterCode-SQL(75%→79%)。这些提升超过从gpt-4o-mini升级到gpt-4o的效果,并达到允许多次尝试的水平。进一步引入两项创新:基于种群训练的数据库级筛选,传播高性能示例集合;基于实际效用的示例级筛选,选择性保留有效轨迹。结合改进后,该方法在ALFWorld上达到93%成功率,超越使用更强大模型和手工组件的方法。该轨迹自举技术表明,模型可通过经验自主进化,为减少人力知识工程提供可扩展方案。

原文摘要 · Abstract (English)

Improving Large Language Model (LLM) agents for sequential decision-making tasks typically requires extensive task-specific knowledge engineering--custom prompts, curated examples, and specialized observation/action spaces. We investigate a different approach where agents automatically improve by learning from their own successful experiences without human intervention. Our method constructs and refines a database of self-generated trajectories that serve as in-context examples for future tasks. Even naive accumulation of successful trajectories yields substantial performance gains across three diverse benchmarks: ALFWorld (73% to 89%), Wordcraft (55% to 64%), and InterCode-SQL (75% to 79%). These improvements exceed those achieved by upgrading from gpt-4o-mini to gpt-4o and match the performance of allowing multiple attempts per task. We further enhance this approach with two innovations: database-level curation using population-based training to propagate high-performing example collections, and exemplar-level curation that selectively retains trajectories based on their empirical utility as in-context examples. With these enhancements, our method achieves 93% success on ALFWorld--surpassing approaches that use more powerful LLMs and hand-crafted components. Our trajectory bootstrapping technique demonstrates that agents can autonomously improve through experience, offering a scalable alternative to labor-intensive knowledge engineering.

大模型自主学习决策优化轨迹生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。