ReAct: LLMs learn to interleave reasoning traces and actions

Shunyu Yao and colleagues introduced ReAct, a method letting large language models interleave reasoning traces with real actions such as querying Wikipedia, reducing hallucination and outperforming prior methods on question answering, fact verification and interactive decision-making tasks.

Reasoning and planning Language modelsAgents and planningNatural language processing Foundational method Demonstrated

Background

Large language models had shown two useful but separate abilities. One was reasoning: given a problem, a model could produce a chain of thought, working through intermediate steps before landing on an answer. The other was acting: a model could generate a sequence of actions, like steps in a plan, for some task in an environment. Researchers had studied these largely in isolation.

The trouble with reasoning alone was that the model could only work with what it already knew. On tasks requiring up-to-date or specific factual knowledge, chains of thought tended to hallucinate details or let early errors propagate forward. Acting alone, meanwhile, gave no internal commentary, so it was hard to know why a model made a particular choice or where it went wrong.

What happened

Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan and Yuan Cao submitted a paper to arXiv on 6 October 2022 introducing ReAct, short for Reasoning and Acting. The core idea was to have a large language model generate reasoning traces and task-specific actions in an interleaved manner, one feeding into the other rather than each running separately.

The way it worked: a reasoning trace would help the model update its plan or handle an unexpected result, and then an action would let it reach out to something external, such as a knowledge base or an environment, to get fresh information. That fresh information would then feed back into the next reasoning step. The loop kept the model grounded.

On question answering (HotpotQA) and fact verification (Fever), ReAct interacted with a simple Wikipedia API. This let it check facts rather than rely on memorised knowledge, and the paper reports that it reduced hallucination and error propagation compared with chain-of-thought reasoning alone on those benchmarks. The resulting trajectories were described as human-like and more interpretable than those produced by methods without reasoning traces.

On two interactive decision-making benchmarks, ALFWorld and WebShop, ReAct outperformed imitation learning baselines on ALFWorld by 34% and reinforcement learning baselines on WebShop by 10% in absolute success rate. It achieved this while being prompted with only one or two in-context examples, meaning it needed very little task-specific demonstration to generalise.

The paper was later accepted at ICLR, with a camera-ready revision posted in March 2023.

Why it mattered

Before ReAct, most work treated reasoning and acting as separate problems, with few systems jointly optimising both in a prompted, tool-augmented setting. By combining them, the method let models correct themselves mid-task using information from external sources, which reduced hallucination and error propagation compared with chain-of-thought reasoning alone. On interactive decision-making benchmarks the approach outperformed imitation learning baselines on ALFWorld by 34% and reinforcement learning baselines on WebShop by 10% in absolute success rate, using only one or two in-context examples.

People

Karthik Rajagopal Narasimhan

Sources

Cite this page

AI Achievements. (2022). ReAct: LLMs learn to interleave reasoning traces and actions. Retrieved 2026-08-29, from https://achievements.ai/milestone/react-llms-learn-to-interleave-reasoning-traces-and-actions

@misc{achievements_react_llms_learn_to_interleave_reasoning_traces_and_actions,
  title  = {ReAct: LLMs learn to interleave reasoning traces and actions},
  author = {{AI Achievements}},
  year   = {2022},
  url    = {https://achievements.ai/milestone/react-llms-learn-to-interleave-reasoning-traces-and-actions}
}