ReAct
ReAct, short for reasoning and acting, is a method for building AI agents in which a language model alternates between writing out its reasoning and taking actions such as searches, using each result to decide the next step.
ReAct comes from a paper first posted in October 2022 by Shunyu Yao and colleagues, published at ICLR 2023 as ReAct: Synergizing Reasoning and Acting in Language Models. At the time, researchers had two separate tricks. Chain-of-thought prompting got models to reason step by step, but they reasoned only from memory and could make things up. Action-only agents could use tools but did not explain or plan. ReAct combined the two.
It works through a repeating loop. The model is shown one or two worked examples written as Thought, Action, Observation. Given a new task, it writes a thought about what it needs, then an action such as a search. The system runs the action and appends the result as an observation. The model reads it, writes its next thought, and the loop continues until it chooses to finish with an answer.
Say the question is which of two companies was founded first. Thought: I need both founding dates. Action: search for the first company. Observation: founded in 1998. Thought: now the second. Action: search for it. Observation: founded in 2004. Thought: the first is older. Action: finish. Each step is visible, so a person can see where the agent went wrong if the answer is off.
The paper reported that on question answering and fact checking tasks, letting the model query a simple Wikipedia interface reduced the made-up facts and compounding errors seen with chain-of-thought alone. On two interactive benchmarks, ALFWorld and WebShop, ReAct beat imitation and reinforcement learning methods by 34 and 10 percentage points in success rate, using only one or two examples in the prompt.
The thought, action, observation loop became the template for tool-using agents. Model providers now build it into their APIs: the model returns a structured tool call, the application runs it and sends back the result. The weaknesses are familiar too. Agents can repeat the same action, get misled by a bad search result or stop too early, so loops need limits and results need checking.
ReAct prompting shows a language model examples of solving tasks in alternating steps of thought, action and observation. The model then follows the same pattern, reasoning about what it needs, calling a tool such as search, reading the result and deciding what to do next. It was introduced in a 2022 paper and published at ICLR 2023. Chain-of-thought prompting gets a model to reason step by step using only what it already knows. ReAct adds actions in between the reasoning steps, so the model can look things up or act in an environment and use the results. That grounding in outside information reduced made-up facts in the paper's tests. No. React is a JavaScript library for building user interfaces. ReAct, with a capital A, is an AI agent method whose name combines reasoning and acting. The similar names are a coincidence. Its core loop is everywhere, even when the name is not used. Tool-calling features in model APIs follow the same cycle of the model requesting an action, the application running it and the result going back to the model.Common questions
What is ReAct prompting?
What is the difference between ReAct and chain-of-thought?
Is ReAct related to the React JavaScript library?
Is ReAct still used?
Search for "ReAct reasoning and acting", "ReAct agent loop" or "thought action observation" to find the original paper and later implementations. The paper on arXiv is the primary source; well-cited survey posts on LLM agents and the documentation of agent frameworks show how the idea is used today. Be careful not to confuse results about ReAct with pages about the React web library.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.