ReAct
Updated 2026-08-09
Summary
ReAct has a language model alternate reasoning steps with tool-using actions, feeding each observation back as input so the model can adapt its plan mid-task.
Definition
ReAct, short for Reasoning and Acting, is a prompting and agent pattern in which a large language model interleaves thought and action. The model first reasons about the current state and the next step, then takes an action such as searching, calculating, or calling an API, and finally receives an observation that becomes input for the next cycle. Because external information corrects reasoning and reasoning chooses the next action, the loop grounds the model in real feedback rather than a single unchecked generation.
Introduction
How to use
- Use agent loop: alternate a thought step with exactly one concrete tool action. - Use observation grounding: feed every tool result back into the model before deciding again. - Use stopping rule: define an exit condition so the cycle cannot spin forever.
Mechanism
A single-pass generation drifts and cannot consult the outside world. ReAct has the model alternate thought, which plans and reasons, with action, which calls tools or queries sources, then feeds the observation back as new input. Action supplies real information that corrects reasoning, and reasoning selects the next action, so the two reinforce each other across cycles.
Practice
In progress 0/1Practice this model in one real situation:
Cases
- A question-answering agent thinks it needs the weather, calls an API, observes that it is raining, reasons that an umbrella is advisable, and answers accordingly, producing a far more accurate reply than ungrounded generation.
Common pitfalls
- Letting a failed action repeat without correction so the loop spins; accepting noisy tool output that misleads reasoning; and ignoring stopping conditions, which traps the agent in an endless cycle.
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Prompt_engineeringverified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS