ReAct: Synergizing Reasoning and Acting in Language Models
Written for the Research library (claude-opus-5-5) from the paper text. Original — arxiv.org/pdf/2210.03629
Summary
Large language models have usually been studied either as reasoners, as in chain-of-thought prompting, or as actors that produce plans and commands. They have rarely been studied as both at once. Reasoning alone stays ungrounded and can hallucinate facts or compound early mistakes. Acting alone lacks the high-level planning needed to interpret long interaction histories. ReAct addresses this by extending the agent's action space with free-form language "thoughts." These thoughts do not change the environment but update the context. A frozen PaLM-540B is prompted with a few examples to alternate between thoughts, actions and observations. The authors evaluate this on HotpotQA and Fever, where the model calls a simple Wikipedia API, and on the interactive benchmarks ALFWorld and WebShop. On the knowledge tasks, ReAct beats action-only prompting and is roughly on par with CoT, and a hybrid of ReAct and CoT works best. On the decision-making tasks it clearly outperforms trained imitation and reinforcement learning agents. The approach matters because it yields traceable, inspectable trajectories and offers a template for tool-using LLM agents.
Key points
- Core idea: The action set A is augmented with the language space L. Thoughts decompose goals, inject commonsense, extract key details from observations, track progress and handle exceptions.
- Setup: A frozen PaLM-540B is used with few-shot in-context prompts. The paper also reports initial finetuning experiments suggesting ReAct improves with more training data.
- Knowledge tasks (HotpotQA, Fever): Grounding through the Wikipedia API reduces hallucination and error propagation compared with chain-of-thought. Combining ReAct with CoT, which lets the model draw on both internal and retrieved knowledge, gives the best overall results.
- Interactive tasks: On ALFWorld and WebShop, ReAct prompted with one or two examples raises absolute success rates by 34% and 10%, respectively. The baselines are imitation and RL methods trained on roughly 10³–10⁵ task instances.
- Error analysis: The authors categorize outcomes into true and false positives, reasoning errors, search errors, hallucination (mainly in CoT) and label ambiguity. This breakdown highlights both ReAct's interpretability and its dependence on informative search results.
Cited by
- Quiet-STaR: Language models can teach themselves to think before speaking
- Qwen Technical Report
- Large Language Monkeys: Scaling Inference Compute with Repeated Sampling
- InternLM2 Technical Report
- Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Tasks
- AgentVerse: Facilitating Multi-Agent Collaboration and Exploring Emergent Behaviors
- AlphaMath Almost Zero: Process Supervision without Process
- Towards Reasoning Era: A Survey of Long Chain-of-Thought for Reasoning Large Language Models
- Chatlaw: A Multi-Agent Legal Assistant based on a Role-Aligned Mixture-of-Experts Architecture
- DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning
- Mind2Web: Towards a Generalist Agent for the Web
- A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Models
- Promptbreeder: Self-Referential Self-Improvement Via Prompt Evolution
- Enabling Large Language Models to Generate Text with Citations
- ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools
- CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquing
- ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving
- Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection
- Evaluating Large Language Models: A Comprehensive Survey
- HippoRAG: Neurobiologically Inspired Long-Term Memory for Large Language Models
- PreWoMe: Exploiting Presuppositions as Working Memory for Long Form Question Answering
- ToolkenGPT: Augmenting Frozen Language Models with Massive Tools via Tool Embeddings
- WebVoyager: Building an End-to-End Web Agent with Large Multimodal Models
- MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework
- MLAgentBench: Evaluating Language Agents on Machine Learning Experimentation
- A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questions
- Adaptive-RAG: Learning to Adapt Retrieval-Augmented Large Language Models through Question Complexity
- A Survey on Large Language Models for Code Generation
- Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learning
- Challenges and Applications of Large Language Models
- Demonstrate-Search-Predict: Composing retrieval and language models for knowledge-intensive NLP
- DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines
- Language Models can Solve Computer Tasks
- Agentic Detection of Online Conspiracies
- Measuring Faithfulness in Chain-of-Thought Reasoning
- API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMs
- CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Society
- Search-o1: Agentic Search-Enhanced Large Reasoning Models
- Deductive Verification of Chain-of-Thought Reasoning
- AgentBench: Evaluating LLMs as Agents
- Prompt Injection attack against LLM-integrated Applications
- Query Rewriting in Retrieval-Augmented Large Language Models
- Augmented Language Models: a Survey
- s1: Simple test-time scaling
- Orca: Progressive Learning from Complex Explanation Traces of GPT-4
- AlphaEvolve: A coding agent for scientific and algorithmic discovery
- LINC: A Neurosymbolic Approach for Logical Reasoning by Combining Language Models with First-Order Logic Provers
- Gorilla: Large Language Model Connected with Massive APIs
- REFINER: Reasoning Feedback on Intermediate Representations
- Tool Learning with Foundation Models
- ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs
- UI-TARS: Pioneering Automated GUI Interaction with Native Agents
- A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applications
- Toolformer: Language Models Can Teach Themselves to Use Tools
- Role-Play with Large Language Models
- Enhancing Retrieval-Augmented Large Language Models with Iterative Retrieval-Generation Synergy
- Reflexion: Language Agents with Verbal Reinforcement Learning
- Principle-Driven Self-Alignment of Language Models from Scratch with Minimal Human Supervision
- ToolAlpaca: Generalized Tool Learning for Language Models with 3000 Simulated Cases
- Interleaving Retrieval with Chain-of-Thought Reasoning for Knowledge-Intensive Multi-Step Questions
- PlanBench: An Extensible Benchmark for Evaluating Large Language Models on Planning and Reasoning about Change
- Replacing Judges with Juries: Evaluating LLM Generations with a Panel of Diverse Models
- FreshLLMs: Refreshing Large Language Models with Search Engine Augmentation
- MINT: Evaluating LLMs in Multi-turn Interaction with Tools and Language Feedback
- Survey on Factuality in Large Language Models: Knowledge, Retrieval and Domain-Specificity
- Unleashing the Emergent Cognitive Synergy in Large Language Models: A Task-Solving Agent through Multi-Persona Self-Collaboration
- OpenHands: An Open Platform for AI Software Developers as Generalist Agents
- Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inference
- AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation
- The Rise and Potential of Large Language Model Based Agents: A Survey
- Adaptive Chameleon or Stubborn Sloth: Revealing the Behavior of Large Language Models in Knowledge Conflicts
- The Dawn of LMMs: Preliminary Explorations with GPT-4V(ision)
- SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
- How Is LLM Reasoning Distracted by Irrelevant Context? An Analysis Using a Controlled Benchmark
- $\tau$-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains
- MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuning
- AgentTuning: Enabling Generalized Agent Abilities for LLMs
- Siren's Song in the AI Ocean: A Survey on Hallucination in Large Language Models
- A Survey of Large Language Models
- SGLang: Efficient Execution of Structured Language Model Programs
- SOTOPIA: Interactive Evaluation for Social Intelligence in Language Agents
- WebArena: A Realistic Web Environment for Building Autonomous Agents
- ToolQA: A Dataset for LLM Question Answering with External Tools
Cite
@misc{yao2022react,
title = {{ReAct: Synergizing Reasoning and Acting in Language Models}},
author = {Yao, Shunyu and Zhao, Jeffrey and Yu, Dian and Du, Nan and Shafran, Izhak and Narasimhan, Karthik and Cao, Yuan},
year = {2022},
doi = {10.48550/arxiv.2210.03629},
eprint = {2210.03629},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2210.03629}
}References
- Josh Abramson, Arun Ahuja, Iain Barr, Arthur Brussee, Federico Carnevale, Mary Cassin, Rachita Chhaparia, Stephen Clark, Bogdan Damoc, Andrew Dudzik, Petko Georgiev, Aurelia Guy, Tim Harley, Felix Hill, Alden Hung, Zachary Kenton, Jessica Landon, Timothy Lillicrap, Kory Mathewson, Soňa Mokrá, Alist… — [arXiv:2012.05672](https://arxiv.org/abs/2012.05672) find
- Michael Ahn, Anthony Brohan, Noah Brown, Yevgen Chebotar, Omar Cortes, Byron David, Chelsea Finn, Chuyuan Fu, Keerthana Gopalakrishnan, Karol Hausman, Alex Herzog, Daniel Ho, Jasmine Hsu, Julian Ibarz, Brian Ichter, Alex Irpan, Eric Jang, Rosario Jauregui Ruano, Kyle Jeffrey, Sally Jesmonth, Nikhil… find our card
- Ben Alderson-Day and Charles Fernyhough. Inner speech: development, cognitive functions, phenomenology, and neurobiology. Psychological bulletin, 141(5):931, 2015. find
- Alan Baddeley. Working memory. Science, 255(5044):556–559, 1992. find
- Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901, 2020. find
- Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, et al. Palm: Scaling language modeling with pathways. arXiv preprint arXiv:2204.02311, 2022. find
- Antonia Creswell and Murray Shanahan. Faithful reasoning using large language models, 2022. URL https://arxiv.org/abs/2208.14271. ↗
- Antonia Creswell, Murray Shanahan, and Irina Higgins. Selection-inference: Exploiting large language models for interpretable logical reasoning, 2022. URL https://arxiv.org/abs/ 2205.09712. ↗
- Angela Fan, Yacine Jernite, Ethan Perez, David Grangier, Jason Weston, and Michael Auli. ELI5: Long form question answering. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 3558–3567, Florence, Italy, July 2019. Association for Computational Linguistic… find our card
- Charles Fernyhough. Vygotsky, luria, and the social brain. Self and social regulation: Social interaction and the development of social understanding and executive functions, pp. 56–79, 2010. find
- Amelia Glaese, Nat McAleese, Maja Trebacz, John Aslanides, Vlad Firoiu, Timo Ewalds, Maribeth Rauh, Laura Weidinger, Martin Chadwick, Phoebe Thacker, Lucy Campbell-Gillingham, Jonathan Uesato, Po-Sen Huang, Ramona Comanescu, Fan Yang, Abigail See, Sumanth Dathathri, Rory Greig, Charlie Chen, Doug Fr… find our card
- Ehsan Hosseini-Asl, Bryan McCann, Chien-Sheng Wu, Semih Yavuz, and Richard Socher. A simple language model for task-oriented dialogue. Advances in Neural Information Processing Systems, 33:20179–20191, 2020. find
- Wenlong Huang, Pieter Abbeel, Deepak Pathak, and Igor Mordatch. Language models as zero-shot planners: Extracting actionable knowledge for embodied agents. arXiv preprint arXiv:2201.07207, 2022a. find our card
- Wenlong Huang, Fei Xia, Ted Xiao, Harris Chan, Jacky Liang, Pete Florence, Andy Zeng, Jonathan Tompson, Igor Mordatch, Yevgen Chebotar, et al. Inner monologue: Embodied reasoning through planning with language models. arXiv preprint arXiv:2207.05608, 2022b. find
- Siddharth Karamcheti, Megha Srivastava, Percy Liang, and Dorsa Sadigh. Lila: Language-informed latent actions. In CoRL, pp. 1379–1390, 2021. URL https://proceedings.mlr.press/ v164/karamcheti22a.html. ↗
- Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. Large language models are zero-shot reasoners. arXiv preprint arXiv:2205.11916, 2022. find our card
- Angeliki Lazaridou, Elena Gribovskaya, Wojciech Stokowiec, and Nikolai Grigorev. Internet-augmented language models through few-shot prompting for open-domain question answering. arXiv preprint arXiv:2203.05115, 2022. find our card
- Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, et al. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in Neural Information Processing Systems, 33: 9459–9474, 2020. find
- Shuang Li, Xavier Puig, Chris Paxton, Yilun Du, Clinton Wang, Linxi Fan, Tao Chen, De-An Huang, Ekin Akyürek, Anima Anandkumar, Jacob Andreas, Igor Mordatch, Antonio Torralba, and Yuke Zhu. Pre-trained language models for interactive decision-making, 2022. URL https: //arxiv.org/abs/2202.01771. find
- Aleksandr Romanovich Luria. Ls vygotsky and the problem of localization of functions. Neuropsychologia, 3(4):387–392, 1965. find
- Aman Madaan and Amir Yazdanbakhsh. Text and patterns: For effective chain of thought, it takes two to tango, 2022. URL https://arxiv.org/abs/2209.07686. ↗
- Vincent Micheli and François Fleuret. Language models are few-shot butlers. arXiv preprint arXiv:2104.07972, 2021. find
- Reiichiro Nakano, Jacob Hilton, Suchir Balaji, Jeff Wu, Long Ouyang, Christina Kim, Christopher Hesse, Shantanu Jain, Vineet Kosaraju, William Saunders, Xu Jiang, Karl Cobbe, Tyna Eloundou, Gretchen Krueger, Kevin Button, Matthew Knight, Benjamin Chess, and John Schulman. Webgpt: Browser-assisted qu… find our card
- Maxwell Nye, Anders Johan Andreassen, Guy Gur-Ari, Henryk Michalewski, Jacob Austin, David Bieber, David Dohan, Aitor Lewkowycz, Maarten Bosma, David Luan, Charles Sutton, and Augustus Odena. Show your work: Scratchpads for intermediate computation with language models, 2021. URL https://arxiv.org/a… ↗ our card
- Scott Reed, Konrad Zolna, Emilio Parisotto, Sergio Gomez Colmenarejo, Alexander Novikov, Gabriel Barth-Maron, Mai Gimenez, Yury Sulsky, Jackie Kay, Jost Tobias Springenberg, Tom Eccles, Jake Bruce, Ali Razavi, Ashley Edwards, Nicolas Heess, Yutian Chen, Raia Hadsell, Oriol Vinyals, Mahyar Bordbar, a… find
- Mohit Shridhar, Jesse Thomason, Daniel Gordon, Yonatan Bisk, Winson Han, Roozbeh Mottaghi, Luke Zettlemoyer, and Dieter Fox. Alfred: A benchmark for interpreting grounded instructions for everyday tasks. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 10740–… find our card
- Mohit Shridhar, Xingdi Yuan, Marc-Alexandre Côté, Yonatan Bisk, Adam Trischler, and Matthew Hausknecht. Alfworld: Aligning text and embodied environments for interactive learning. arXiv preprint arXiv:2010.03768, 2020b. find our card
- Kurt Shuster, Mojtaba Komeili, Leonard Adolphs, Stephen Roller, Arthur Szlam, and Jason Weston. Language models that seek for knowledge: Modular search & generation for dialogue and prompt completion. arXiv preprint arXiv:2203.13224, 2022a. find
- Kurt Shuster, Jing Xu, Mojtaba Komeili, Da Ju, Eric Michael Smith, Stephen Roller, Megan Ung, Moya Chen, Kushal Arora, Joshua Lane, Morteza Behrooz, William Ngan, Spencer Poff, Naman Goyal, Arthur Szlam, Y-Lan Boureau, Melanie Kambadur, and Jason Weston. Blenderbot 3: a deployed conversational agent… find our card
- James Thorne, Andreas Vlachos, Christos Christodoulopoulos, and Arpit Mittal. Fever: a large-scale dataset for fact extraction and verification. arXiv preprint arXiv:1803.05355, 2018. find our card
- Lev S Vygotsky. Thinking and speech. The collected works of LS Vygotsky, 1:39–285, 1987. find
- Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. Self-consistency improves chain of thought reasoning in language models, 2022a. URL https://arxiv.org/abs/2203.11171. ↗ our card
- Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, and Denny Zhou. Rationale-augmented ensembles in language models. arXiv preprint arXiv:2207.00747, 2022b. find
- Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Ed Chi, Quoc Le, and Denny Zhou. Chain of thought prompting elicits reasoning in large language models. arXiv preprint arXiv:2201.11903, 2022. find our card
- Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William W Cohen, Ruslan Salakhutdinov, and Christopher D Manning. Hotpotqa: A dataset for diverse, explainable multi-hop question answering. arXiv preprint arXiv:1809.09600, 2018. find our card
- Shunyu Yao, Rohan Rao, Matthew Hausknecht, and Karthik Narasimhan. Keep CALM and explore: Language models for action generation in text-based games. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 8736–8754, Online, November 2020. Association fo… find
- Shunyu Yao, Howard Chen, John Yang, and Karthik Narasimhan. Webshop: Towards scalable real-world web interaction with grounded language agents. arXiv preprint arXiv:2207.01206, 2022. find our card
- Eric Zelikman, Yuhuai Wu, Jesse Mu, and Noah D. Goodman. Star: Bootstrapping reasoning with reasoning, 2022. URL https://arxiv.org/abs/2203.14465. ↗ our card
- Denny Zhou, Nathanael Schärli, Le Hou, Jason Wei, Nathan Scales, Xuezhi Wang, Dale Schuurmans, Olivier Bousquet, Quoc Le, and Ed Chi. Least-to-most prompting enables complex reasoning in large language models, 2022. URL https://arxiv.org/abs/2205.10625. ↗ our card
- Yunchang Zhu, Liang Pang, Yanyan Lan, Huawei Shen, and Xueqi Cheng. Adaptive information seeking for open-domain question answering. arXiv preprint arXiv:2109.06747, 2021. find