Which tool to choose
ReAct gives its best with an assistant that can actually perform actions: search the web, read a file, use connected tools. Without the ability to act, the AI can only simulate the steps, and the advantage drops. For tasks that require up-to-date data or external checks, choose an assistant with access to search or to tools. For pure reasoning on information you've already provided, the request to reason in steps is enough, with no actions.
How to do it
The problem ReAct solves: the AI that reasons on its own, closed off, can build a perfect logical castle on a wrong premise, because it never checks the facts during the journey. Alternating thought and action forces it to verify along the way, instead of guessing everything in one go.
- Explain the task and ask the AI to proceed in turns: thought, action, result of the action.
- In the "thought" it says what it lacks to move forward.
- In the "action" it does something to obtain it: searches, calculates, checks.
- In the "result" it records what it found, and from there restarts with the next thought.
- It stops when it has all the pieces for the final answer, grounded in what it verified, not in what it assumed.
The operational syntax:
Answer this question proceeding in explicit turns. For each turn write:
- Thought: what you need to know now
- Action: what you do to find out (search the web, calculate, verify)
- Result: what you found
Keep going until you have all the elements, then give the final answer based only on what you verified.
Question: what's the most convenient train from Milan to Lecce the day after tomorrow, considering price and duration?
Read the turns as it produces them: seeing the thought and the action lets you notice right away if it's searching for the wrong thing, and correct it before it builds the answer on a wrong piece of data.
A concrete example
Giovanni asks the AI to compare two suppliers for his business. With ReAct, the AI proceeds like this: thought, "I need to know the current prices of the two"; action, searches the web; result, finds the price lists. Then: thought, "I need the recent reviews"; action, searches; result, finds some. Only after gathering and verifying the pieces does it draw the conclusions. Giovanni sees every step and notices the AI had found an old price list: he has it corrected before the conclusion. The final answer rests on checked data, not on memories.
When it does NOT work (and how to fix it)
If the AI "fakes" the actions without actually doing them
This happens when the assistant has no access to real tools: it writes "I search the web" but invents the result. Check that your assistant can actually search or use tools; if it can't, don't ask it for external actions, but provide the data yourself and use only the step-by-step reasoning part. A fake action is worse than no action.
If the turns multiply without arriving at a conclusion
The AI got lost in secondary checks. Set a cap: "maximum five turns, then conclude with what you have." And restate the goal in the prompt: sometimes it spins in circles because it lost sight of what it was looking for.
If it searches for the wrong thing from the very first turn
Here's the advantage of seeing the steps: you intervene right away. "The thought of the first turn is wrong, you don't need that but this other thing." Correcting the reasoning at the start costs one message; letting it continue on a wrong track costs the whole chain.
A tip from someone who actually uses it
Use ReAct above all when you don't trust the answer at a glance. For questions that require external data or multiple verification steps, seeing the thought and the action of each turn transforms the AI from a black box into a colleague who reasons out loud: you can correct it while it works. It's slower than a bare answer, but on a task that matters the slowness is the price of control.
Frequently asked questions
Is ReAct only for those who program?
No. The name is technical, the use isn't: ask the AI to alternate thought, action and result on every turn, and you've applied the technique. It serves anyone who has to get the AI to gather external information in a verifiable way, not just developers.
What's the difference with simple "reason step by step"?
"Reason step by step" is only thought: the AI reasons without checking the facts. ReAct adds the action: between one thought and the next the AI does something in the world (searches, verifies) and uses the real result for the next step. It's the difference between thinking about an answer and going to check it.
Doesn't showing the steps just slow things down, without improving the answer?
It's the misconception that makes people prefer the bare answer. The steps aren't decoration: they're the points where an error nests and where you can intercept it. A fast, wrong answer costs you more than the slowness of ReAct, because you notice it when it's too late. The visibility of the reasoning is exactly what lets you trust the result.