ReAct Prompting: Combining Reasoning and Acting to Ground LLMs in the Real World
2026-07-15
Chain-of-thought prompting teaches a model to work through a problem step by step. It is a powerful technique, but it has a hard ceiling: the model can only reason about what it already knows. If the answer depends on a fact not in its training data, or something that has changed since its cutoff, it will either hallucinate or stall. ReAct, introduced in October 2022, breaks through that ceiling by letting the model act during reasoning. It can search an external source, read what comes back, and update its plan based on the observation, all within a single generation loop.
The paper and its motivation
The paper 'ReAct: Synergizing Reasoning and Acting in Language Models' was submitted to arXiv on October 6, 2022 (arXiv:2210.03629) by Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao, from Google Research and Princeton University. It was published at ICLR 2023 and has over 12,000 citations as of mid-2026.
The motivating observation is sharp: prompting techniques up to that point treated reasoning and acting as separate modes. Chain-of-thought prompting produces reasoning traces but cannot look anything up. Action-plan generation can call external tools but has no reasoning trace to guide which action comes next. ReAct proposes a simple unification: at each step the model may produce a thought, take an action, or both, and whatever the external action returns becomes an observation that feeds into the next step.
The Thought, Action, Observation loop
A ReAct trajectory on a question-answering task works like this. The model writes 'I need to find who directed film X' (a Thought), emits 'search[film X director]' (an Action), receives 'Wikipedia: Film X was directed by Y in 1998' (an Observation), then writes 'Now I know Y directed X. I need to verify if Y also directed film Z' (another Thought), searches again, and continues until it can answer. Each Thought-Action-Observation cycle builds a running record of what the model has established and what it still needs to find.
The actions available depend on the application. The paper used a Wikipedia Search API for question answering and fact verification, and navigation commands for text-based games and web shopping tasks. The format is not tied to any specific tool set: the model produces action strings in whatever format the tool interface expects, and the observation is whatever that interface returns. This generality is why ReAct became the structural blueprint for tool-calling agent frameworks including LangChain's agent loop and the OpenAI tool-calling interface.
What the benchmark results showed
- HotpotQA (multi-hop question answering, 6-shot, exact match on PaLM-540B): ReAct alone scored 27.4, compared to 29.4 for chain-of-thought without tool use. Combining ReAct with chain-of-thought in the same trajectory reached 35.1, the best prompted result.
- FEVER (fact verification, 3-shot accuracy on PaLM-540B): ReAct alone scored 60.9, compared to 56.3 for chain-of-thought only. The combined approach reached 64.6.
- ALFWorld (text-based household navigation, 2-shot): ReAct achieved 71 percent success, compared to 45 percent for an act-only baseline and 37 percent for imitation learning methods trained on approximately 100,000 task instances. That 34-point improvement over those trained baselines came from just two in-context examples.
- WebShop (web navigation and item purchasing, 1-shot): ReAct achieved 40 percent task success versus 30.1 percent for act-only and 29.1 percent for imitation learning trained on roughly 90,000 labeled instances.
The ALFWorld and WebShop numbers are the most striking result in the paper. ReAct, prompted with one or two examples, outperformed methods that required tens of thousands of labeled training examples. The gains came from the structure of the prompting format, not from a larger model or additional fine-tuning.
Why interleaving reasoning and acting helps
Reasoning helps acting: a Thought step narrows the search space, tells the model which action to take next, and produces a plan that a human reviewer can inspect and correct before the action runs. Acting helps reasoning: the observation from a real external source replaces the model's internal guess with verified information, cutting off the hallucination spiral that pure chain-of-thought can produce.
The FEVER results illustrate this directly. Chain-of-thought on fact-verification tasks sometimes confidently asserted false claims. ReAct updated its conclusion when Wikipedia returned text that contradicted its initial thought. The paper also showed a human-in-the-loop correction mode: an inspector who edited a single hallucinating Thought in an ALFWorld trajectory allowed the model to complete a task it had been failing.
How to use ReAct prompting today
Modern frameworks implement patterns that descend directly from the ReAct format. To apply it without a framework, define the tools available, write one or two worked examples of a complete Thought, Action, Observation trajectory in your system or few-shot prompt, and the model generalizes the pattern to new queries.
- One complete example showing a Thought, a real Action, a realistic Observation, and a final answer is usually enough for the model to generalize the format.
- Give each tool a clear name and a one-sentence description. The model selects tools by reading those descriptions, so precision matters more than length.
- Set a maximum step count and a fallback instruction. Without a cap, the model can loop on fruitless searches indefinitely.
- Log the full Thought, Action, Observation sequences during development. They make it straightforward to spot when the model is searching for the wrong thing or misreading an observation.
ReAct adds the most value on tasks where the answer requires external information: recent facts, multi-hop lookups, agent navigation tasks, and any workflow calling live APIs. For tasks where all relevant information is already in the prompt, standard chain-of-thought is faster and cheaper. PromptingIndex covers prompts and agent patterns built on ReAct-style reasoning across question answering, coding, and tool-use tasks, tested across Claude, ChatGPT, and Gemini.
Put these ideas to work.
Browse the prompt library