Lune

NeurIPS2023顶会

Reflexion: language agents with verbal reinforcement learning

Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, Shunyu Yao

摘要

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 improvements over a baseline agent across diverse tasks (sequential decision-making, coding, language reasoning). For example, Reflexion achieves a 91% pass@1 accuracy on the HumanEval coding benchmark, surpassing the previous state-of-the-art GPT-4 that achieves 80%. We also conduct ablation and analysis studies using different feedback signals, feedback incorporation methods, and agent types, and provide insights into how they affect performance. We release all code, demos, and datasets at https://github.com/noahshinn024/reflexion . Introduction Recent works such as ReAct [30], SayCan [1], Toolformer [22] , HuggingGPT [23], generative agents [19], and WebGPT [17] have demonstrated the feasibility of autonomous decision-making agents that are built on top of a large language model (LLM) core. These methods use LLMs to generate text and 'actions' that can be used in API calls and executed in an environment. Since they rely on massive models with an enormous number of parameters, such approaches have been so far limited to using in-context examples as a way of teaching the agents, since more traditional optimization schemes like reinforcement learning with gradient descent require substantial amounts of compute and time.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 1,002 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Large Language Models Cannot Self-Correct Reasoning Yet 引用了 Self-Refine: Iterative Refinement with Self-Feedback
  • Large Language Models Cannot Self-Correct Reasoning Yet 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Self-Refine: Iterative Refinement with Self-Feedback 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Generative Agents: Interactive Simulacra of Human Behavior 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Graph of Thoughts: Solving Elaborate Problems with Large Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs 引用了 Toolformer: Language Models Can Teach Themselves to Use Tools
  • ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs 引用了 HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face
  • ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face 引用了 Toolformer: Language Models Can Teach Themselves to Use Tools
  • HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper1,002

  1. DAPO: An Open-Source LLM Reinforcement Learning System at ScaleQiying Yu, Zheng Zhang, Ruofei Zhu, Yufeng Yuan 等NeurIPS 2025 · 2,828 次引用
  2. SWE-agent: Agent-Computer Interfaces Enable Automated Software EngineeringJohn Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret 等NeurIPS 2024 · 2,059 次引用
  3. ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIsYujia Qin, Shihao Liang, Yining Ye, Kunlun Zhu 等ICLR 2024 · 1,469 次引用
  4. Graph of Thoughts: Solving Elaborate Problems with Large Language ModelsMaciej Besta, Nils Blach, Ales Kubicek, Robert Gerstenberger 等AAAI 2024 · 1,292 次引用
  5. Large Language Models Cannot Self-Correct Reasoning YetJie Huang, Xinyun Chen, Swaroop Mishra, Huaixiu Steven Zheng 等ICLR 2024 · 858 次引用

它引用的 Paper15

  1. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
  2. Toolformer: Language Models Can Teach Themselves to Use ToolsTimo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu 等NeurIPS 2023 · 5,989 次引用
  3. Self-Refine: Iterative Refinement with Self-FeedbackAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan 等NeurIPS 2023 · 4,972 次引用
  4. Generative Agents: Interactive Simulacra of Human BehaviorJoon Sung Park, Joseph C. O'Brien, Carrie Jun Cai, Meredith Ringel Morris 等UIST 2023 · 1,882 次引用
  5. HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging FaceYongliang Shen, Kaitao Song, Xu Tan, Dongsheng Li 等NeurIPS 2023 · 1,778 次引用

相关 Paper

  1. MetaReflection: Learning Instructions for Language Agents using Past ReflectionsPriyanshu Gupta, Shashank Kirtania, Ananya Singha, Sumit Gulwani 等EMNLP 2024 · 1 次引用
  2. ReflexiCoder: Teaching Large Language Models to Self-Reflect on Generated Code and Self-Correct It via Reinforcement LearningJuyong Jiang, Jiasi Shen, Sunghun Kim, Kang Min Yoo 等ACL Findings 2026 · 2 次引用
  3. Language Agent Tree Search Unifies Reasoning, Acting, and Planning in Language ModelsAndy Zhou, Kai Yan, Michal Shlapentokh-Rothman, Haohan Wang 等ICML 2024 · 443 次引用
  4. Retroformer: Retrospective Large Language Agents with Policy Gradient OptimizationWeiran Yao, Shelby Heinecke, Juan Carlos Niebles, Zhiwei Liu 等ICLR 2024 · 124 次引用
  5. DiLu: A Knowledge-Driven Approach to Autonomous Driving with Large Language ModelsLicheng Wen, Daocheng Fu, Xin Li, Xinyu Cai 等ICLR 2024 · 255 次引用
黄昏的海面,两侧是细线勾勒的悬崖