Reflexion: Language Agents with Verbal Reinforcement Learning
Noah Shinn, Federico Cassano, Edward Berman, Ashwin Gopinath, Karthik, Narasimhan, Shunyu Yao

TL;DR
Reflexion introduces a linguistic feedback-based reinforcement learning framework for language agents, enabling them to improve decision-making without weight updates by reflecting on task feedback and maintaining an episodic memory.
Contribution
This work presents a novel framework that uses verbal reflection and feedback to enhance language agent performance, avoiding traditional weight updates and enabling flexible feedback integration.
Findings
Reflexion significantly outperforms baseline agents across various tasks.
Achieves 91% pass@1 accuracy on HumanEval, surpassing GPT-4's 80%.
Demonstrates the effectiveness of linguistic feedback in reinforcement learning for language models.
Abstract
Large language models (LLMs) have been increasingly used to interact with external environments (e.g., games, compilers, APIs) as goal-driven agents. However, it remains challenging for these language agents to quickly and efficiently learn from trial-and-error as traditional reinforcement learning methods require extensive training samples and expensive model fine-tuning. We propose Reflexion, a novel framework to reinforce language agents not by updating weights, but instead through linguistic feedback. Concretely, Reflexion agents verbally reflect on task feedback signals, then maintain their own reflective text in an episodic memory buffer to induce better decision-making in subsequent trials. Reflexion is flexible enough to incorporate various types (scalar values or free-form language) and sources (external or internally simulated) of feedback signals, and obtains significant…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Taxonomy
TopicsTopic Modeling · Explainable Artificial Intelligence (XAI) · Reinforcement Learning in Robotics
MethodsMulti-Head Attention · Attention Is All You Need · Linear Layer · Adam · Residual Connection · Dense Connections · Dropout · Byte Pair Encoding · Softmax · Layer Normalization
