Lune

ICLR2024Top-tier venue

Retroformer: Retrospective Large Language Agents with Policy Gradient Optimization

Weiran Yao, Shelby Heinecke, Juan Carlos Niebles, Zhiwei Liu, Yihao Feng, Le Xue, Rithesh R. N., Zeyuan Chen, Jianguo Zhang, Devansh Arpit, Ran Xu, Phil Mui

Abstract

Recent months have seen the emergence of a powerful new trend in which large language models (LLMs) are augmented to become autonomous language agents capable of performing objective oriented multi-step tasks on their own, rather than merely responding to queries from human users. Most existing language agents, however, are not optimized using environment-specific rewards. Although some agents enable iterative refinement through verbal feedback, they do not reason and plan in ways that are compatible with gradient-based learning from rewards. This paper introduces a principled framework for reinforcing large language agents by learning a retrospective model, which automatically tunes the language agent prompts from environment feedback through policy gradient. Specifically, our proposed agent architecture learns from rewards across multiple environments and tasks, for fine-tuning a pre-trained language model which refines the language agent prompt by summarizing the root cause of prior failed attempts and proposing action plans. Experimental results on various tasks demonstrate that the language agents improve over time and that our approach considerably outperforms baselines that do not properly leverage gradients from the environment. This demonstrates that using policy gradient optimization to improve language agents, for which we believe our work is one of the first, seems promising and can be applied to optimize other models in the agent architecture to enhance agent performances over time.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

27 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Reflective Multi-Agent Collaboration based on Large Language Models cites Self-Refine: Iterative Refinement with Self-Feedback
  • Reflective Multi-Agent Collaboration based on Large Language Models cites Reflexion: language agents with verbal reinforcement learning
  • Reflective Multi-Agent Collaboration based on Large Language Models cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Reflective Multi-Agent Collaboration based on Large Language Models cites Training language models to follow instructions with human feedback
  • GLoRe: When, Where, and How to Improve LLM Reasoning via Global and Local Refinements cites Self-Refine: Iterative Refinement with Self-Feedback
  • GLoRe: When, Where, and How to Improve LLM Reasoning via Global and Local Refinements cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • GLoRe: When, Where, and How to Improve LLM Reasoning via Global and Local Refinements cites Training language models to follow instructions with human feedback
  • Self-Refine: Iterative Refinement with Self-Feedback cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Self-Refine: Iterative Refinement with Self-Feedback cites Training language models to follow instructions with human feedback
  • Direct Preference Optimization: Your Language Model is Secretly a Reward Model cites Training language models to follow instructions with human feedback
  • Reflexion: language agents with verbal reinforcement learning cites Self-Refine: Iterative Refinement with Self-Feedback
  • Reflexion: language agents with verbal reinforcement learning cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • AvaTaR: Optimizing LLM Agents for Tool Usage via Contrastive Reasoning cites Self-Refine: Iterative Refinement with Self-Feedback
  • AvaTaR: Optimizing LLM Agents for Tool Usage via Contrastive Reasoning cites Reflexion: language agents with verbal reinforcement learning
  • AvaTaR: Optimizing LLM Agents for Tool Usage via Contrastive Reasoning cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Chain-of-Thought Prompting Elicits Reasoning in Large Language Models cites Training language models to follow instructions with human feedback
  • MemGen: Weaving Generative Latent Memory for Self-Evolving Agents cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Executable Code Actions Elicit Better LLM Agents cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Executable Code Actions Elicit Better LLM Agents cites Training language models to follow instructions with human feedback
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers27

  1. Executable Code Actions Elicit Better LLM AgentsXingyao Wang, Yangyi Chen, Lifan Yuan, Yizhe Zhang et al.ICML 2024 · 436 citations
  2. GLoRe: When, Where, and How to Improve LLM Reasoning via Global and Local RefinementsAlexander Havrilla, Sharath Chandra Raparthy, Christoforos Nalmpantis, Jane Dwivedi-Yu et al.ICML 2024 · 105 citations
  3. MemGen: Weaving Generative Latent Memory for Self-Evolving AgentsGuibin Zhang, Muxin Fu, Shuicheng YanICLR 2026 · 102 citations
  4. AvaTaR: Optimizing LLM Agents for Tool Usage via Contrastive ReasoningShirley Wu, Shiyu Zhao, Qian Huang, Kexin Huang et al.NeurIPS 2024 · 95 citations
  5. Reflective Multi-Agent Collaboration based on Large Language ModelsXiaohe Bo, Zeyu Zhang, Quanyu Dai, Xueyang Feng et al.NeurIPS 2024 · 87 citations

Builds on12

  1. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  2. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  3. Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
  4. Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan et al.NeurIPS 2023 · 5,828 citations
  5. Self-Refine: Iterative Refinement with Self-FeedbackAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan et al.NeurIPS 2023 · 4,972 citations

Related papers

  1. FLAG-TRADER: Fusion LLM-Agent with Gradient-based Reinforcement Learning for Financial TradingGuojun Xiong, Zhiyang Deng, Keyi Wang, Yupeng Cao et al.ACL Findings 2025 · 5 citations
  2. PRompt Optimization in Multi-Step Tasks (PROMST): Integrating Human Feedback and Heuristic-based SamplingYongchao Chen, Jacob Arkin, Yilun Hao, Yang Zhang et al.EMNLP 2024 · 6 citations
  3. On the Modeling Capabilities of Large Language Models for Sequential Decision MakingMartin Klissarov, R. Devon Hjelm, Alexander T. Toshev, Bogdan MazoureICLR 2025
  4. ToolRL: Reward is All Tool Learning NeedsCheng Qian, Emre Can Acikgoz, Qi He, Hongru Wang et al.NeurIPS 2025 · 387 citations
  5. Stronger-MAS: Multi-Agent Reinforcement Learning for Collaborative LLMsYujie Zhao, Lanxiang Hu, Yang Wang, Minmin Hou et al.ICLR 2026 · 26 citations
Dusk over the sea between two cliffs drawn in fine vertical lines