ReAct — Reason, Act, Observe
A customer asked, "Has order 4471 shipped, and when will it arrive?" Answering from the model alone produced a confident, invented delivery date. The shop's order system knows the real answer. The job is to let the model reason about what it needs, go and get it, and then reason from what it actually found.
The rule
Think, act, then look at the real result — and repeat.
ReAct (short for reason + act) interleaves three kinds of step:
- Thought — the model reasons about what it knows and what it needs next.
- Action — the model calls a tool with a specific input: search, database lookup, calculator.
- Observation — the tool's real output is added to the context. The model did not write it; the system did.
The loop repeats until the model has enough to give a final answer. This is the basic pattern behind most AI agents.
Question: Has order 4471 shipped, and when will it arrive?
Thought: I need the order's current status.
Action: lookup_order(4471)
Observation: status=shipped; shipped_on=3 June; carrier_eta=6 June
Thought: I have both facts the customer asked for.
Answer: Yes — your order shipped on 3 June and should arrive around 6 June.ReAct combines two earlier ideas. Like chain-of-thought, it reasons in steps. Like retrieval, it grounds the answer in real data. And because the observation comes from a real system, the model's next thought responds to facts rather than its own guesses, which cuts hallucination sharply.
In a real application, a program sits in the loop: when the model writes an action, the program pauses generation, runs the tool, pastes the result in as the observation, and lets the model continue. Modern APIs support this directly through tool calling, where the model emits a structured request instead of plain text.
The shortcut
Before answering, ask of every fact the reply needs: "Can a tool tell me this?" If yes, that is an action, not a guess.
Thought
The customer asks if a repair on bike B-208 is done and what it costs. I need its status and the bill.
The trap: letting the model write its own "Observation" lines. A model that invents observations is back to hallucinating, just in a tidier format. Observations must come from the real tool, and tools with side effects still need the permission limits from the prompt-injection lesson.
Drills
Answer fast — trust the rule.
In ReAct, where does an Observation come from?
What is the correct order of one ReAct cycle?
A customer asks the price of part 88213. What should a ReAct agent do first?
Which ReAct setup is broken?
Remember
- Think, act, then look at the real result — and repeat.
- Shortcut: every fact a tool can provide is an action, not a guess.
- Trap: model-written observations — they must come from the real tool.
