Agents & Frontier

the ReAct pattern

/ ree-AKT PAT-urn /

ReAct is a simple recipe for making an AI agent think out loud before it acts, and then look at what happened before thinking again. The name is short for "Reason + Act." Instead of jumping straight to an action, the model alternates: a Thought ("I need to find out who directed this film, so I should search"), an Action (search for the film), and an Observation (the search result). Then it thinks again in light of what it just learned, and the loop continues until it can give a final answer.

The insight, introduced in a 2022 research paper, is that interleaving reasoning with real actions works better than either alone. Pure reasoning lets a model talk itself into a confident but wrong answer with nothing to check it. Pure action — calling tools with no reflection — leaves it flailing without a plan. Weaving the two together means each action is grounded in a stated reason, and each new fact from the world can correct the next thought. The written-out thoughts also make the agent's behavior far easier for a human to read and debug.

Be clear about what ReAct is and isn't. It is a prompting and orchestration pattern, not a new kind of model or a guarantee of correctness — the "reasoning" is still the model generating plausible text, which can be wrong or even invented after the fact. It can loop forever, repeat the same failed action, or reason its way into a dead end. It works because it adds structure and real-world feedback, not because it makes the model truly understand; treat the visible "thoughts" as a useful trace, not as proof the agent knows what it's doing.

Question: "What is the population of the city where the 2016 Olympics were held?" Thought: I need the host city first. Action: search("2016 Olympics host city"). Observation: Rio de Janeiro. Thought: Now I need Rio's population. Action: search("Rio de Janeiro population"). Observation: about 6.7 million. Thought: I have the answer. Final answer: about 6.7 million.

Thought → Action → Observation, repeated: reasoning and acting feed each other.

The written "Thought" is a story the model generates, not a window into a real reasoning process. It often helps performance and is great for debugging, but a fluent, sensible-looking thought can still precede a wrong action — never mistake the narration for a guarantee.

Also called
ReActreason and actreasoning + acting推理-行动模式推理-行動模式