ReAct (Reason and Act)(ReAct)
AI
AI
ReAct (Reason and Act) is an approach in which an AI agent alternates between reasoning about the next step, taking an action with a tool and checking the result, until the task is done.
The approach comes from the research paper "ReAct: Synergizing Reasoning and Acting in Language Models" (Yao et al., 2022). A language model writes a thought, picks an action such as a search or a system lookup, and receives an observation back.
That loop of thinking, doing and checking repeats. This lets an agent look information up instead of guessing, and adjust its plan when something turns out differently.
Tip
Not to be confused with React, the JavaScript library for websites. And only give an agent the tools and permissions it really needs.
Related terms
- AI agentAn AI agent is a system that uses a language model not only to answer but to act: fetch data, use tools and perform actions in other systems.
- LLMAn LLM (Large Language Model) is an AI model that learns language patterns from large amounts of data to process and generate text. It works with tokens: pieces of text.
- PromptA prompt is the instruction you give an AI model. The clearer the role, goal, context and required format, the more usable the answer.
- Agent HarnessAn agent harness is the software around an AI model that supplies context, executes tools and returns results. It enables an agent to carry out a task across multiple steps.
