Skip to content
Last Dictionary

ReAct

proper noun/ree-AKT/Also: Reason + Act, ReAct prompting, ReAct agent, reason-and-act

In plain wordsA method in which an AI alternates between thinking out loud about what to do next and taking an action, such as a web search, then uses what it observed to plan its next step.

  1. A prompting and agent paradigm ('Reason + Act') in which a large language modellarge language model, n.: A computer program trained on enormous amounts of text to predict the words that come next. At vast scale, that simple skill lets it chat, answer questions, translate, summarize and write code. alternates between writing a brief free-text thought about its situation and emitting an action — a search query, a click, an API call — whose result returns as an observation, repeating until it can answer. Each half covers the other's weakness: thinking keeps a plan in view and lets the model change course when something unexpected happens, while acting fetches facts the model lacks, so its reasoning rests on evidence rather than recall. With just one or two worked examples in the prompt, the 2022 paper's agent outscored imitation- and reinforcement-learning baselines on ALFWorld and WebShop (by 34 and 10 points of absolute success rate), and its lookups through a simple Wikipedia API curbed the hallucinations of chain of thoughtchain of thought, n.: Getting an AI to write out its reasoning step by step before giving an answer, the way a student shows their working. This often makes answers to math and logic problems more accurate. on HotpotQA and FEVER. The thought–action–observation cycle became the template for LLM agents and their agent loopsagent loop, n.: The repeating cycle at the heart of an AI agent: the model decides what to do next, software carries it out, the result is shown to the model, and the cycle repeats until the task is finished..

    Our first agent was plain ReAct: think, call a tool, read the result, repeat.

Origin

Introduced by Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan and Yuan Cao (Princeton University and Google Research) in a paper posted on 6 October 2022 and presented at ICLR 2023; LangChain's early agents (late 2022) were built on it.

Usage note

With native function callingfunction calling, n.: A feature of AI model services that lets the model reply with a neatly formatted request to run one of a program's functions, rather than with ordinary text; the program, not the model, then runs it. and reasoning modelsreasoning model, n.: An AI model trained to work through a problem step by step in hidden 'thinking' text before it answers. Letting it think longer generally makes it better at math, coding and planning. that think before answering, explicit 'Thought:' text is often unnecessary, but the reason–act–observe structure persists. Unrelated to the React JavaScript library.

Related

See also
  • agent loopagent loop, n.: The repeating cycle at the heart of an AI agent: the model decides what to do next, software carries it out, the result is shown to the model, and the cycle repeats until the task is finished.
  • chain of thoughtchain of thought, n.: Getting an AI to write out its reasoning step by step before giving an answer, the way a student shows their working. This often makes answers to math and logic problems more accurate.
  • ReflexionReflexion, prop. n.: A technique in which an AI agent that fails at a task writes itself a short note on what went wrong, then reads that note before trying again — learning from mistakes without retraining.
  • tool usetool use, n.: An AI model's ability to reach beyond its own knowledge by operating outside tools — searching the web, running code, using a calculator or an app — and folding the results into its work.
  • MRKL systemMRKL system, n.: An early design, pronounced 'miracle', in which a language model acts as a switchboard, sending each part of a question to the right specialist — a calculator, a database, a search tool — and combining the answers.
  • plan-and-executeplan-and-execute, n.: An agent design that first writes out a complete step-by-step plan for a task, then carries out the steps one by one, revising the plan only when something goes wrong.
Contrast with
  • chain of thoughtchain of thought, n.: Getting an AI to write out its reasoning step by step before giving an answer, the way a student shows their working. This often makes answers to math and logic problems more accurate.

Sources

  1. Yao, S., Zhao, J., Yu, D., Du, N., Shafran, I., Narasimhan, K. & Cao, Y. (2022). ReAct: Synergizing Reasoning and Acting in Language Models. arXiv:2210.03629 (ICLR 2023). arxiv.org/abs/2210.03629

Mentioned in

AI agentAI agent, n.: An AI system that does not just answer but acts: given a goal, it decides on steps, uses tools such as a browser or code editor, checks the results and keeps going until the job is done., agent loopagent loop, n.: The repeating cycle at the heart of an AI agent: the model decides what to do next, software carries it out, the result is shown to the model, and the cycle repeats until the task is finished., agentic RAGagentic RAG, n.: Retrieval in which the AI runs its own research: it decides what to search for, looks at the results, searches again if needed, and only then answers., plan-and-executeplan-and-execute, n.: An agent design that first writes out a complete step-by-step plan for a task, then carries out the steps one by one, revising the plan only when something goes wrong., reasoning tracereasoning trace, n.: The written-out 'thinking' an AI reasoning model produces before its final answer — notes to itself full of attempts, checks and corrections, which users may or may not get to see., tooltool, n.: Any outside capability an AI model is allowed to use — a web search, a calculator, a code runner, a database or an app — described to the model so it can ask for it by name., interleaved thinkinginterleaved thinking, n.: A way for an AI agent to pause and reason again after every action it takes — reading each search result or test output before deciding what to do next — instead of only thinking once at the start., MRKL systemMRKL system, n.: An early design, pronounced 'miracle', in which a language model acts as a switchboard, sending each part of a question to the right specialist — a calculator, a database, a search tool — and combining the answers., ReflexionReflexion, prop. n.: A technique in which an AI agent that fails at a task writes itself a short note on what went wrong, then reads that note before trying again — learning from mistakes without retraining., SWE-agentSWE-agent, prop. n.: An open-source research system from Princeton that turns a language model into a software-fixing agent by giving it a specially designed set of commands for browsing, editing and testing code., ToolformerToolformer, prop. n.: A 2023 Meta research model that learned on its own when a tool — a calendar, a translator, a search engine, a calculator — would help it predict text, keeping only the tool uses that actually paid off.