Before agents could use tools reliably, they needed a way to look before they leapt
Chain-of-thought made models reason step by step. It did not make them able to use a tool, because reasoning happens in the model's head where nothing can be checked and nothing can fail visibly.
ReAct interleaves the two: think, act, observe what happened, think again. The loop turns a language model into something that can correct itself, because each action produces evidence.
What ReAct actually is
The loop is four moves, repeated until the task is done.
Thought: the model reasons about what to do next, in text.
Action: it emits a structured call, such as a search query or an API call, with its arguments.
Observation: the environment returns the result, which goes back into the context.
Repeat: the loop continues with the observation in hand.
The mechanism that makes it work is that the Observation is outside the model's head. A wrong Thought is invisible; a wrong Action is not, because it returns a real result. The loop is therefore self-correcting in a way that pure reasoning is not.
In prompt terms, what you need is not more reasoning steps. It is permission to call something and read what comes back.
Where it came from
Yao et al., 2022, from Princeton and Google Brain. The paper introduced the pattern and demonstrated it on question answering and decision-making tasks.
It is the ancestor of essentially every tool-using agent in production today. LangChain's default agent loop, the tool-calling APIs of every major provider, and the reasoning traces you see in modern agent frameworks are all ReAct with different plumbing.
- Yao et al., "ReAct: Synergizing Reasoning and Acting in Language Models", 2022
A worked example
A prompt that gives a model the right to act and see results, rather than asking it to reason harder. The loop is what makes the answer checkable.
You have a search tool. Use it.
For every factual claim you make about pricing, availability, or anything
that changed after your training cutoff, search before you state it.
After each search, say in one line what you learned and whether it changed
your answer. If two sources disagree, report both and say which you trust
and why.
When you are confident and have searched at least twice, stop and give the
answer.
If a search returns nothing useful, say what you searched for and try a
different phrasing once. Do not guess after a failed search.
The last two instructions are what separate ReAct from a summarisation request. Permission to act, a requirement to report what came back, and an explicit stopping condition.
Where ReAct breaks down
ReAct's weakness is loops. Without a stopping condition the model will search forever, and with an expensive tool the cost is unbounded. This is why production implementations cap iterations and budget rather than trusting the model to stop.
It is also weak at tasks where the observation is hard to use. If a tool returns a wall of text, the model often fails to extract the part that mattered. Observation quality matters more than loop correctness.
When to reach for it, and when not to
Reach for it when the answer depends on facts the model may not have, or the task requires fetching, computing, or looking something up rather than reasoning from what it knows.
Skip it when the model already has everything it needs, or the task is better served by a single structured output than by a search-and-reason loop.
Questions people ask about ReAct
Is ReAct the same as function calling?
Function calling is the mechanism that makes ReAct possible. ReAct is the loop, function calling is how the model emits an Action. Modern tool use is usually described as function calling and is really ReAct with a typed interface.
How many ReAct iterations are usually enough?
Two to four for most questions. Beyond that the returns flatten sharply and you are usually hitting a case where the search terms are wrong rather than the model needing more steps.
Does ReAct replace chain of thought?
No, it embeds it. The Thought slot in a ReAct loop is ordinary chain of thought. The contribution is the interleave with an external observation.
Related frameworks
*Every agent framework in production is ReAct with better plumbing. That makes it the one pattern worth knowing properly.