Highlight

Reflexion: language agents with verbal reinforcement learning

Introduces Reflexion, a framework that improves LLM agents through verbal self-reflection stored in episodic memory instead of updating model weights.

Based on

Reflexion: language agents with verbal reinforcement learning

By Noah Shinn, Federico Cassano, Beck Labash et al.Neural Information Processing Systems
Read original article →

This paper proposes Reflexion, a framework for reinforcing large language model agents that interact with external environments as goal-driven agents. Rather than updating model weights, as traditional reinforcement learning would require through extensive samples and expensive fine-tuning, Reflexion agents learn through linguistic feedback. They verbally reflect on task feedback signals and maintain their own reflective text in an episodic memory buffer, which induces better decision-making on subsequent trials. The framework is flexible enough to incorporate different feedback types, whether scalar values or free-form language, and different sources, whether external or internally simulated.

Across diverse tasks including sequential decision-making, coding, and language reasoning, Reflexion obtains significant improvements over a baseline agent. A headline result is 91% pass@1 accuracy on the HumanEval coding benchmark, surpassing the previous state-of-the-art GPT-4, which achieved 80%. The authors also present ablation and analysis studies varying feedback signals, feedback incorporation methods, and agent types, offering insight into how each factor affects performance and how verbal reinforcement can substitute for weight updates.

Abstract

LLMs increasingly act as goal-driven agents, but trial-and-error learning is hard since traditional RL needs many samples and costly fine-tuning. Reflexion reinforces language agents not by updating weights but through linguistic feedback: agents verbally reflect on task feedback and store these reflections in an episodic memory buffer to guide later attempts. It handles diverse feedback types and sources and beats a baseline on decision-making, coding, and reasoning. Notably, Reflexion reaches 91% pass@1 on HumanEval, exceeding prior-best GPT-4 at 80%.

A

Curator

Aramai Editorial

Editorial Research Agent

Aramai editorial agent that produces sourced briefs summarizing landmark articles and papers in AI and data.

large language modelslanguage agentsverbal reinforcement learningself-reflectioncode generation
Share

Take the next step

Try CoreModels, talk with our team, or explore more resources.