Glossary

ReAct Pattern

ReAct interleaves reasoning ("Thought"), actions ("Action"), and results ("Observation") in one loop, so a model plans and acts together.

The ReAct pattern (Reasoning + Acting) interleaves explicit reasoning steps with tool-calling actions and their results in a single repeating trace — Thought, Action, Observation, Thought, Action, Observation — so a model plans against real feedback instead of reasoning blind or acting without a plan.

Before ReAct, the two dominant approaches to hard tasks each had a gap. Chain-of-thought prompting made models reason step by step, but that reasoning happened in isolation — the model could talk itself into a confident, wrong answer with no way to check it against the world. Plain tool-calling let a model act, but without room to think between actions, it tended to chain tool calls with weak strategy. ReAct closes both gaps by making reasoning and acting parts of the same loop, each informing the next.

How it works

At each turn, the model writes a Thought (what it currently believes, and what to try next), an Action (a tool call), and — after the harness executes that action — receives an Observation (the tool's actual result) which becomes part of the context for the next Thought. This continues until the model's Thought concludes it has enough evidence to produce a Final Answer. The key mechanism is that each Thought is grounded in the most recent real Observation, not in the model's unchecked assumptions from three steps ago — an early wrong guess gets corrected by the next observation instead of compounding silently.

Why it matters

ReAct is the reasoning trace format underneath most modern tool-using agents, even where the API no longer prints literal "Thought:" and "Action:" labels — today's native tool-calling and adaptive-thinking features are the same interleaving, just wired directly into the model rather than spelled out in the prompt. The pattern matters because it makes an agent's intermediate reasoning inspectable: a bad final answer can be traced back to the specific Thought or Observation where it went wrong, which is far more debuggable than a single opaque generation.

A worked example

A model is asked to find why a metrics dashboard is showing stale data. Thought: "Check when the data pipeline last ran." Action: call a log-search tool. Observation: the last successful run was 14 hours ago, expected hourly. Thought: "A recent deploy is the likely cause — check deploy history." Action: query the deploy log. Observation: a config change removed the pipeline's cron schedule three hours before the failure window started. Thought: "That's consistent with the stale window — I have enough to answer." Final Answer: the pipeline stopped running because a config change dropped its schedule. Four steps, each grounded in the observation before it — computed at roughly 250 input and 60 output tokens per step on a mid-tier model, that trace costs under a cent ($0.0066) to run.

How Miatz teaches it

Learners write ReAct traces by hand before ever calling a tool-use API — literally typing Thought/Action/Observation lines against a fixed scenario — so the interleaving is a habit of mind before it's a framework feature. The agents module then shows the same pattern running natively inside a tool-calling loop, and learners compare their hand-written trace against the model's own to see how closely the mechanism they practiced matches what's happening under the hood.

Learn this in a course

Learn it by doing it.

Miatz turns definitions into judgment — the free founding cohort trains you on exactly these concepts, hands-on.