CLAIAug 4, 2023

Retroformer: Retrospective Large Language Agents with Policy Gradient Optimization

AppleSalesforceStanford
arXiv:2308.02151v3127 citationsh-index: 112
Originality Incremental advance
AI Analysis

This work addresses the challenge of making language agents more autonomous and effective in objective-oriented tasks, representing an incremental advance by applying policy gradient optimization to a new context.

The paper tackles the problem of optimizing large language agents for multi-step tasks by introducing a framework that learns a retrospective model to tune agent prompts using policy gradient from environment feedback, resulting in agents that improve over time and outperform baselines that do not leverage gradients.

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.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes