AIWiki
Malaysia

ReAct (Reasoning and Acting)

ReAct is a prompting framework that interleaves reasoning traces with task actions, letting a language model plan, call external tools, and incorporate observations to solve problems more reliably.

5 min readLast updated June 2026Applications

ReAct, short for Reasoning and Acting, is a prompting framework that combines a language model's reasoning with its ability to take actions in an external environment. Introduced in a paper led by Shunyu Yao and colleagues and published at ICLR 2023, ReAct interleaves reasoning traces with task-specific actions so that the model can plan, gather information from external sources, and adjust its approach based on what it observes. It is one of the foundational techniques behind modern tool-using AI agents.

Core idea

Earlier work had explored two capabilities separately: chain-of-thought prompting, which improves a model's internal reasoning, and action generation, which lets a model call tools or interact with an environment. ReAct asks what happens when these are combined, augmenting the action space of an agent with an internal reasoning space. The central insight is that reasoning and acting reinforce each other. Reasoning traces help the model decompose a task, track progress, form and update plans, and handle exceptions, while actions let the model retrieve external information that grounds its reasoning in reality rather than relying solely on what it has memorised.

How it works

A ReAct prompt typically provides a few worked examples, each consisting of a trajectory that alternates between three kinds of step: a thought, in which the model reasons in natural language about what to do next; an action, in which it issues a command such as a search query or an API call; and an observation, which is the result returned by the environment. The model continues this thought, action, observation loop until it reaches a final answer.

For instance, when answering a factual question, a ReAct agent might reason that it needs to look up a name, issue a search action against a knowledge source, read the returned observation, reason about what is still missing, and issue a further query before concluding. This interleaving lets the model break out of purely internal reasoning, which is prone to fabricating facts, by checking its assumptions against an external source at each step.

Results and impact

In the original experiments, ReAct was tested on both knowledge-intensive and interactive tasks. On question answering using the HotpotQA benchmark and on fact verification using Fever, connecting the model to a simple Wikipedia interface allowed ReAct to overcome the hallucination and error-propagation problems that affect pure chain-of-thought reasoning, because the model could verify intermediate facts rather than inventing them. On interactive decision-making benchmarks such as ALFWorld and WebShop, ReAct substantially outperformed imitation-learning and reinforcement-learning baselines, with large absolute gains in success rate.

Beyond the specific benchmarks, ReAct established a general pattern that has become standard in agent design. The thought, action, observation loop underpins many agent frameworks and is closely tied to the rise of tool use and function calling in large language models. Frameworks such as LangChain and LangGraph implement ReAct-style agents, and the approach is a conceptual ancestor of the broader agentic AI systems now used for research, coding, and automation.

Strengths and limitations

ReAct improves reliability and interpretability, because the visible reasoning trace explains why the agent took each action, and grounding actions in external tools reduces hallucination. Its limitations include sensitivity to the quality of the tools and observations, the risk of the model getting stuck in unproductive loops, and higher latency and cost from multiple model calls and tool invocations. These trade-offs have motivated later refinements, including reflection mechanisms that let agents critique and revise their own trajectories.

References

  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).
  2. Google Research. (2022). ReAct: Synergizing Reasoning and Acting in Language Models.
  3. ReAct project page. (2023). https://react-lm.github.io/