Flashcard: what is the ReAct pattern for agents, in one sentence?
ReAct alternates Thought, Action, and Observation in a loop, so each reasoning step is conditioned on a real tool result rather than the model's own continuation.
Imagine a chef cooking a new dish. One way is to read the whole recipe, then cook the entire meal from memory without looking again. Another way is to read one step, do it, taste the result, then decide what to do next based on what actually happened. ReAct is the second way for an LLM. The model thinks a little, takes one action like searching the web or calling a calculator, looks at the real result, and only then thinks about what to do next. The thinking and the doing take turns, and each new thought stands on something the model actually observed instead of something it guessed. That back-and-forth is what turns one model call into an agent loop.
Detailed answer & concept explanation~7 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.
Name the three steps in order: Thought, Action, Observation. Explain that the Observation is written by the runtime, not the model, which is what makes it external evidence. Contrast with chain-of-thought as open loop versus ReAct as closed loop. Attribute to Yao et al. 2022. Close with the tradeoff: extra latency and context growth.
Real products, models, and research that use this idea.
- LangGraph's prebuilt ReAct agent wraps Anthropic or OpenAI function calling in a state graph where each node is one Thought, Action, Observation turn with full trace logging.
- Claude Opus 4.7 in computer-use mode runs a ReAct-style loop: it observes a screenshot, reasons, emits a click or keystroke, then observes the next screenshot before the next Thought.
- Perplexity research mode interleaves reasoning with live web searches, so each answer is grounded in retrieved sources rather than the model continuing from its parametric memory.
- Cursor and Cline coding agents observe file diffs and test output between edits, re-grounding the next reasoning step on real results instead of a guessed code state.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does ReAct differ from plan-and-execute, in one sentence?
QWhat bounds hallucination drift in a ReAct loop, and what reintroduces it?
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.
Describing ReAct as just chain-of-thought plus tools. The defining feature is the interleaving order: Observation enters the context before the next Thought.
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.