What Is ReAct Prompting? How It Combines Reasoning and Actions in AI Agents

Chess pieces on a board, representing the interleaved reasoning and action steps of ReAct prompting

ReAct prompting is a technique that has a language model alternate between writing out a reasoning step and taking an action — like querying a search engine or looking something up in a database — then reading the result of that action before reasoning about what to do next. Introduced in a 2022 paper by Yao, Zhao, Yu, Du, Shafran, Narasimhan, and Cao, it was built specifically to let models reason and act in the same loop instead of treating those as separate skills.

How Does ReAct Differ From Plain Chain-of-Thought?

Chain-of-thought prompting asks a model to reason step by step using only what it already knows, entirely inside its own output. That’s useful, but it means the model can’t check its facts against anything external — if its internal knowledge is wrong or out of date, the reasoning built on top of it is wrong too. ReAct breaks that isolation by interleaving “thought” steps with “action” steps that reach outside the model: searching a knowledge base, calling an API, or querying an environment, then feeding the result back in before the next thought.

What Does a ReAct Loop Look Like?

A typical ReAct trace repeats three steps until the task is done:

  • Thought: the model reasons about what it currently knows and what it still needs to find out.
  • Action: the model issues a concrete action, such as a search query or a tool call.
  • Observation: the result of that action is returned to the model, informing the next thought.

This loop is the same basic pattern underneath most modern AI agents that browse the web, call tools, or operate inside an application — reason, act, observe, repeat, until the task is complete.

Why Does Reaching for External Actions Reduce Hallucinations?

The original ReAct paper found that connecting reasoning to external information sources, such as a Wikipedia API, helps the model “overcome issues of hallucination and error propagation” that are common in pure chain-of-thought reasoning — because the model is no longer relying solely on what it memorized during training. In the paper’s experiments on interactive decision-making benchmarks, ReAct outperformed existing methods by notable margins, including a 34% higher success rate on the ALFWorld benchmark and a 10% improvement on WebShop, while using only one or two in-context examples.

How Does ReAct Relate to AI Agents and Tool Use?

ReAct is one of the foundational patterns behind what’s now broadly called agentic AI. An AI agent that browses the web, runs code, or calls external tools is typically running some variation of the reason-act-observe loop ReAct introduced. It also complements other reasoning techniques covered on this blog — tree-of-thought prompting, for instance, explores multiple reasoning branches in parallel, while ReAct focuses on grounding a single reasoning path in real, external feedback at each step.

Frequently Asked Questions

Is ReAct prompting the same as using AI tools or function calling?

They’re closely related but not identical. Function calling is the mechanism that lets a model invoke an external tool. ReAct is the reasoning pattern that decides when and why to call that tool, by interleaving explicit “thought” steps with each action, so the model’s decision-making stays visible and auditable.

Do I need special model training to use ReAct prompting?

No. The original paper demonstrated ReAct using only prompting, with one or two examples included directly in the prompt — no fine-tuning required. Most modern AI agent frameworks implement this same reason-act-observe loop as a prompting pattern rather than a training requirement.

When does ReAct prompting not help much?

For simple, self-contained questions that don’t require outside information or multi-step problem solving, the extra reasoning and action steps add latency and cost without much benefit. ReAct earns its keep on tasks that genuinely require looking something up, taking an action, and adjusting based on what comes back.

Further reading: the original ReAct paper on arXiv includes the full benchmark results and example traces. See also What Is an AI Agent? and What Is Tree-of-Thought Prompting? on this blog.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top