Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M6822

ReAct

ReAct
TechnicalmediumArtificial Intelligence
Included
account_tree

Updated 2026-08-09

Loading revision record…

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.

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/1

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%

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.

  • link
    en.wikipedia.orghttps://en.wikipedia.org/wiki/Prompt_engineeringZH · Explicit
    verified
account_treeGenealogyexpand_more

RELATED MODELS