ReAct Prompting
ReAct (Reasoning and Acting) is a prompting framework that interleaves a language model's step-by-step reasoning with concrete actions, such as tool or API calls, letting the model reason about what information it needs, take an action to…
Definition
ReAct (Reasoning and Acting) is a prompting framework that interleaves a language model's step-by-step reasoning with concrete actions, such as tool or API calls, letting the model reason about what information it needs, take an action to get it, observe the result, and continue reasoning until it can produce a final answer.
Overview
Prior to ReAct, prompting research had largely explored reasoning (chain-of-thought, generating intermediate reasoning steps toward an answer) and acting (function/tool calling, letting a model invoke external tools) as somewhat separate techniques. ReAct, introduced in a 2022 paper by Shunyu Yao and colleagues, proposed combining them into a single interleaved loop: the model generates a reasoning trace ('Thought: I need to find the current population of X'), takes an action based on that reasoning ('Action: search("current population of X")'), receives an observation from executing that action (the tool's returned result), and then continues reasoning based on the new information, repeating this Thought-Action-Observation cycle until it has gathered enough information to produce a final answer. The key insight is that reasoning and acting are mutually reinforcing: reasoning helps the model decide what action to take and how to interpret an action's result, while taking actions grounds the model's reasoning in real, verifiable information rather than relying entirely on its own possibly outdated or hallucinated internal knowledge. The paper demonstrated that this combination reduced hallucination and error propagation compared to reasoning-only approaches (which cannot verify facts against the real world) and improved interpretability compared to acting-only approaches (where it's unclear why the model chose a given action), on tasks spanning question answering, fact verification, and interactive decision-making in simulated environments. ReAct has become one of the foundational prompting patterns underlying modern LLM agents: essentially any agentic system that calls tools iteratively — a coding agent that reasons about what file to inspect next, a research agent that searches, reads, and refines its query, or a customer-support agent that looks up account details before answering — implements some variation of the ReAct Thought-Action-Observation loop, whether or not it's explicitly labeled as such. It remains a standard reference pattern taught alongside function calling and tool use when designing agentic systems, and many agent frameworks (LangChain's agent executors, for instance) originally implemented ReAct as a default reasoning strategy.
Key Concepts
- Interleaves reasoning ('Thought') with concrete actions ('Action') and their results ('Observation')
- Introduced in a 2022 paper by Shunyu Yao and colleagues
- Grounds model reasoning in real, verifiable information via tool/API calls
- Reduces hallucination compared to reasoning-only approaches with no external verification
- Improves interpretability compared to acting-only approaches with no visible reasoning trace
- Forms the basis of the Thought-Action-Observation loop used in many agent frameworks
- Applicable to question answering, fact verification, and interactive decision-making tasks
- A foundational pattern underlying most modern iterative, tool-using LLM agents
Use Cases
Frequently Asked Questions
From the Blog
Chain-of-Thought Prompting: Make AI Reason Better
Chain-of-thought prompting asks a model to reason step by step before answering, which improves accuracy on problems that need multiple stages of logic.
Read More AI & TechnologyWhat Is Chain-of-Thought Prompting?
Chain-of-thought prompting asks an LLM to reason step by step before answering, which noticeably improves accuracy on math, logic, and multi-step problems.
Read More AI & Technology7 Tasks Where Fine-Tuning Beats Prompting
Fine-tuning wins where the behaviour you need is hard to describe but easy to demonstrate, where a long prompt is paid on every call, or where a smaller model must hit a latency budget. This names seven task shapes that qualify, the signals that identify them, and the cases where prompting remains the better answer.
Read More AI & TechnologyPlanner-Executor Agents vs ReAct Loops
Planner-executor architectures commit to a plan up front and then carry it out; ReAct loops decide one step at a time from the latest observation. Planning suits long, decomposable tasks with stable environments; interleaved reasoning suits exploratory work where each result changes what to do next.
Read More