ReAct is a prompting pattern that interleaves reasoning ("Thought:") with actions ("Action:") and observations ("Observation:"). It is the foundation of most tool-using agents.
Explanation
In a ReAct loop the model outputs a thought (free-form reasoning), then an action (e.g., a tool call), receives an observation (the tool's output), then thinks again. This continues until the model decides it has enough information to answer.
The pattern's power is that the model's reasoning steers tool use rather than tool use being hard-coded. Most modern agents — from search-augmented chat to coding agents — are ReAct or ReAct-flavored under the hood.
Examples
A search-augmented assistant: Thought, Search, Observation, Thought, Answer.
A coding agent: Thought, Read file, Edit, Run tests, Thought, Done.
Frequently asked
What is ReAct?
ReAct is a prompting pattern that interleaves reasoning ("Thought:") with actions ("Action:") and observations ("Observation:"). It is the foundation of most tool-using agents.
What is an example of react?
A search-augmented assistant: Thought, Search, Observation, Thought, Answer.
How is ReAct related to Agent?
ReAct and Agent are both agents & tools concepts. An AI agent is an LLM-driven system that decides which actions to take, executes them via tools, observes the results, and iterates until a goal is met.
Is ReAct considered intermediate?
ReAct is generally considered intermediate-level material in the AI and LLM space.