ReAct: Synergizing Reasoning and Acting in Language Models

The foundational primary source for the wiki’s entire agent/harness cluster: the 2022 paper (presented at ICLR 2023) that introduced ReAct — interleaving free-form reasoning traces (“thoughts”) with task-specific actions in a single language-model trajectory. ReAct is the origin of the reason → act → observe loop that the wiki’s ai-agents page now treats as the definition of an agent (“an LLM that autonomously uses tools in a loop”). Until this ingest the loop was cited only through 2026 secondary practitioner sources; this page back-fills its genealogical root.

Work by Shunyu Yao (Princeton, during a Google internship) with Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan (Princeton advisor), and Yuan Cao (Google Research, Brain team).

TL;DR

  • The core idea is simple. Augment the agent’s action space A with a space of language L: an action â ∈ L is a thought / reasoning trace that does not affect the environment (no observation feedback) but updates the model’s working context to support future reasoning and acting. Standard methods do reason-only (chain-of-thought) or act-only; ReAct interleaves both — reason to act (plans, decomposition, exception-handling) and act to reason (retrieve external information to ground the next thought).
  • A frozen LLM, few-shot prompted. The main experiments use PaLM-540B prompted with 1–6 hand-written in-context trajectories of thought–action–observation steps. No fine-tuning required for the headline results. (Appendix shows GPT-3 outperforming PaLM-540B on some tasks.)
  • Two regimes. For reasoning-heavy tasks (multi-hop QA, fact verification): dense thoughts — alternate thought/action/observation each step. For decision-making tasks with many actions (text games, web shopping): sparse thoughts — let the model decide when to insert a thought.
  • Knowledge-intensive reasoning (HotpotQA, FEVER). ReAct interacts with a deliberately weak 3-action Wikipedia APIsearch[entity], lookup[string], finish[answer] — forcing retrieval via explicit reasoning rather than a strong retriever. ReAct beats act-only and reduces chain-of-thought’s hallucination/error-propagation by grounding in retrieved facts. The best configuration combines ReAct + CoT-SC (internal knowledge and external retrieval): HotpotQA EM 35.1, FEVER acc 64.6 (vs Standard 28.7 / 57.1, CoT-SC 33.4 / 60.4).
  • Decision-making (ALFWorld, WebShop). With only one or two in-context examples, ReAct beats imitation- and reinforcement-learning baselines trained on 10³–10⁵ task instances: +34% absolute success on ALFWorld (ReAct 71 vs Act 45 vs BUTLER IL 37, 2-shot), +10% on WebShop (ReAct 40 vs Act 30.1 vs IL 29.1, 1-shot). Sparse reasoning is what closes the gap — controlled act-only baselines on the same trajectories underperform.
  • Interpretability, trust, controllability — not just accuracy. Because thoughts are legible, humans can distinguish internal knowledge from retrieved facts and inspect the decision basis. A human-in-the-loop experiment edits a hallucinating thought (Act 17 / 23 on ALFWorld) and the agent corrects course — “a new form of human–machine collaboration” requiring only the manual editing of a few thoughts.
  • Fine-tuning works too. ReAct-format trajectories generated by prompted PaLM-540B (filtered to successful ones) are used to fine-tune smaller PaLM-8B/62B; ReAct consistently wins the fine-tuning comparison and scales better than CoT/Act baselines.

What was actually ingested

Full 33-page PDF (arXiv:2210.03629v3, 10 Mar 2023 revision) read for the abstract, introduction, method (§2), knowledge-intensive reasoning tasks (§3), decision-making tasks (§4), the four results tables, the scaling/fine-tuning figure, and the human-in-the-loop correction analysis. The long prompt appendices (Appendix C trajectories) were skimmed, not transcribed.

Why this matters to the wiki

The wiki’s ai-agents working definition — “an LLM that autonomously uses tools in a loop” — and the agent-harness reason/act/observe runtime are both direct descendants of ReAct. The 2026 practitioner sources the wiki already holds (Wolfe’s evaluation guide, Trivedy’s harness anatomy, Kokane) describe the loop as settled practice; this paper is the 2022 primary that named it. ReAct’s two structural claims — (1) reasoning and acting are more powerful interleaved than separate, and (2) thoughts make the trajectory human-inspectable and correctable — anticipate the wiki’s later harness arguments that context engineering and human-correction layers, not raw model quality, govern production agent reliability.

Linked entities and concepts

Relationships