TensorX
返回文献探索

Paper · arXiv 2505.00234

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

Vishnu Sarukkai, Zhiqiang Xie, Kayvon Fatahalian

26 upvotesMay 1, 2025arXiv 预印本
AI 摘要

LLM agents can improve performance on sequential decision-making tasks by learning from self-generated examples, enhancing test performance across multiple benchmarks without task-specific knowledge engineering.

Large Language Modelprompt tuningin-context examplessuccessful trajectoriespopulation-based trainingexemplar-level selectionALFWorldWordcraftInterCode-SQL

Abstract

Many methods for improving Large Language Model (LLM) agents for sequential decision-making tasks depend on task-specific knowledge engineering--such as prompt tuning, curated in-context examples, or customized observation and action spaces. Using these approaches, agent performance improves with the quality or amount of knowledge engineering invested. Instead, we investigate how LLM agents can automatically improve their performance by learning in-context from their own successful experiences on similar tasks. Rather than relying on task-specific knowledge engineering, we focus on constructing and refining a database of self-generated examples. We demonstrate that even a naive accumulation of successful trajectories across training tasks boosts test performance on three benchmarks: ALFWorld (73% to 89%), Wordcraft (55% to 64%), and InterCode-SQL (75% to 79%)--matching the performance the initial agent achieves if allowed two to three attempts per task. We then introduce two extensions: (1) database-level selection through population-based training to identify high-performing example collections, and (2) exemplar-level selection that retains individual trajectories based on their empirical utility as in-context examples. These extensions further enhance performance, achieving 91% on ALFWorld--matching more complex approaches that employ task-specific components and prompts. Our results demonstrate that automatic trajectory database construction offers a compelling alternative to labor-intensive knowledge engineering.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
Self-Generated In-Context Examples Improve LLM Agents for Sequential Decision-Making Tasks | TensorX