Order the four phases of a single iteration of a ReAct (Reason + Act) loop in the correct sequence.
- 1Tool execution: the orchestrator runs the requested tool and captures its return value.
- 2Action: the model emits a tool call (function name + arguments) based on the thought.
- 3Thought: the model emits a reasoning step about what to do next given the current state.
- 4Observation: the result of the tool call is appended to the model's context.
One ReAct iteration runs Thought, then Action, then Tool execution by the orchestrator, then Observation appended back to context for the next iteration.
Picture a detective at a desk. First they think out loud about what they need to know next. Then they hand a note across the desk asking for a specific file. An assistant walks off, fetches the file, and brings it back. The detective glances at what the assistant returned, then thinks again. That cycle (think, ask, fetch, look) is one round of detective work. A ReAct agent does the same four moves in the same order. The model is the detective, the orchestrator is the assistant, the tool call is the note, and the observation is the file coming back.
Detailed answer & concept explanation~5 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: the four-phase order + who owns each phase + termination logic + how modern runtimes (LangGraph, OpenAI Assistants, Claude tool-use) implement it + common loop-failure modes.
Real products, models, and research that use this idea.
- LangGraph implements the four-phase ReAct loop as graph nodes, with explicit edges for tool execution and observation appending; the framework is built around this exact ordering.
- OpenAI Assistants API runs tool-call loops where the model emits a function call (Thought + Action), the SDK executes it client-side, and the result is posted back as a tool message (Observation).
- Anthropic Claude tool-use loops follow the same shape: the model emits a tool_use content block, the client runs the tool, and the result is posted back as a tool_result block in the next turn.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does the model decide to stop calling tools?
QWhat happens if a tool call fails or times out?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Putting Action before Thought, or believing the model itself runs the tool instead of just emitting a request the orchestrator interprets and executes.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.