← All papers

ReAct: Synergizing Reasoning and Acting in Language Models

Yao, Zhao, Yu et al. · 2023 · ICLR 2023

PromptingRead on arXiv

Interleaves reasoning (chain-of-thought) with acting (tool use) in a Thought-Action-Observation loop, enabling LLMs to interact with external environments while maintaining interpretable decision-making.

Key Idea

ReAct combines reasoning (generating explanatory thoughts) with acting (executing actions in an environment) in a unified loop. At each step, the model generates a Thought (what it's thinking), an Action (what tool to call), and receives an Observation (the tool's response). This interleaving allows the model to plan, gather information, and adjust its approach dynamically.

How It Works

  • Thought: The model reasons about what to do next, what information it needs, or how to interpret previous observations
  • Action: The model calls an external tool (search, calculator, API, code executor, database query)
  • Observation: The environment returns the result of the action
  • This loop repeats until the model has enough information to produce a final answer
  • Implemented via few-shot prompting, no fine-tuning required, just examples of the Thought/Action/Observation format

Why It Matters

  • Foundation of modern AI agents: ReAct is the default architecture for LangChain agents, AutoGPT, and most tool-using LLM systems
  • Outperforms both reasoning-only (CoT) and acting-only (standard tool use) approaches, thoughts help the model plan and recover from errors
  • Interpretability: the explicit Thought steps make the agent's decision-making transparent and debuggable
  • Showed that LLMs can effectively ground their reasoning in real-world information via tool use
  • Simple to implement: just a prompt format + tool execution loop

Key Takeaways for Interviews

  • ReAct = Think → Act → Observe loop, the canonical agent pattern
  • Key insight: reasoning without acting hallucinates facts; acting without reasoning makes poor tool choices. ReAct combines both.
  • In practice: each "Thought" is a natural language plan/reflection, each "Action" is a structured tool call (e.g., Search["query"], Calculate["2+2"])
  • Limitations: sequential execution (one action at a time), can get stuck in loops, no built-in planning horizon
  • Successors: Plan-and-Execute (plan upfront), LLM Compiler (parallel actions), Reflexion (self-critique), LATS (tree search)
  • In system design: ReAct is the starting point for any agent, add planning/reflection layers as needed for complexity