ReAct: Synergizing Reasoning and Acting in Language Models

Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, Yuan Cao

2022 · ICLR

ReAct: Synergizing Reasoning and Acting in Language Models

Problem

Framing

Chain-of-thought improves reasoning, but it cannot query the world, and action-only prompting lacks explicit planning. ReAct closes this gap by interleaving free-form thoughts with text actions and observations, improving grounded multi-hop QA, fact verification, and interactive decision making.

Currently Used Methods

Foundational

Proposed Method

Architecture

ReAct uses a single LM as a policy over an alternating trajectory of thought, action, and observation tokens. Thoughts decompose goals and plan retrieval; actions query an external environment; observations feed back into the next reasoning step.

Verified figure: prompt trajectories contrasting standard, CoT, act-only, and ReAct on HotpotQA and ALFWorld; ReAct alternates thoughts, actions, and observations to reach correct outcomes.

Algorithm

At step tt, the model conditions on the full interaction history and emits either a reasoning trace or an action:

(yt,at)pθ ⁣(x,y<t,a<t,o<t)(y_t, a_t) \sim p_\theta\!\left(\cdot \mid x, y_{<t}, a_{<t}, o_{<t}\right)

The environment then returns a new observation after each action:

ot=E(at)o_t = \mathcal{E}(a_t)

Training Procedure

Evaluation

Datasets

Metrics

Headline results

Ablations

Verified figure: bar charts compare prompting versus finetuning on HotpotQA across PaLM 8B, 62B, and 540B; ReAct lags in prompting but leads after finetuning.

Method Strengths and Weaknesses

Strengths

Weaknesses

Suggestions from the authors

Links

Prior Papers

Further Papers