Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

ReAct: Synergizing Reasoning and Acting in Language Models

  • Problem Reasoning-only prompting stays ungrounded in external sources, and acting-only prompting seldom reasons about goals, so the two have rarely been combined in one loop.
  • Method Interleaves free-form thoughts with actions in a frozen PaLM-540B, using few-shot trajectories and a Wikipedia API as the action space.
  • Results Reached a 71% overall success rate on ALFWorld for the best of 6 ReAct trials, against 45% for the best Act trial.

Figure 3: Scaling results for prompting and finetuning on HotPotQA withReAct (ours) and baselines

Figure 3 : Scaling results for prompting and finetuning on HotPotQA withReAct (ours) and baselines.

Original paper · CC BY 4.0 · Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, Yuan Cao · ReAct: Synergizing Reasoning and Acting in Language Models · Original paper figure · Extracted the figure area from page 7 of the original PDF.

Why reasoning and acting stay apart

Chain-of-thought prompting gets a model to write out intermediate steps before its answer, but those steps come from the model's internal representations alone. Nothing external checks them, so a wrong fact can enter early and carry through the rest of the chain. Acting-only systems take the opposite route: a language model proposes domain-specific actions or plans from language priors, a controller executes them, and the model seldom reasons about high-level goals or keeps a working memory.

The embodied work closest to this idea reiterates spatial facts about the current scene, which is only a narrow form of verbal reasoning. Whether pairing the two in one loop gives systematic gains over either alone, for general task solving, had not been examined.

Thoughts as actions that leave the environment unchanged

The agent loop follows the usual form: at step t it receives an observation \(o_t\) and picks an action \(a_t\) under a policy \(\pi(a_t \mid c_t)\), where the context \(c_t\) collects the earlier observations and actions up to \(o_t\). ReAct adds a language space \(L\) to the action space, giving \(\hat{A} = A \cup L\). A thought drawn from \(L\) changes nothing in the environment and returns no observation; it is only appended to the context, so \(c_{t+1} = (c_t, \hat{a}_t)\) and later steps can read it.

Thoughts serve several jobs: splitting a goal into subgoals, bringing in commonsense, pulling useful facts out of observations, tracking progress and revising the plan after an exception. Because \(L\) is unbounded, the model can use it well only if it already carries strong language priors, which is the difficulty this approach has to manage.

Frozen PaLM-540B with few-shot trajectories

The main experiments keep PaLM-540B frozen and prompt it with few-shot in-context examples, each a human-written trajectory of actions, thoughts and environment observations. On reasoning-heavy tasks the trajectory alternates thoughts and actions at every step, whereas on decision making with many actions thoughts appear only where they matter, and the model decides when.

The examples need no special format: annotators type thoughts in plain language above the actions they take.

Appendix A.1 reports GPT-3 results that are stronger than the PaLM-540B results.

A deliberately weak Wikipedia interface

HotpotQA asks multi-hop questions that need two or more Wikipedia passages, and FEVER asks whether a claim is supported, refuted or not verifiable from Wikipedia. Both run question-only: the model sees the question or claim without supporting paragraphs and must recall facts or retrieve them. Six exemplars for HotpotQA and three for FEVER were written by hand from training cases.

The Wikipedia API offers search[entity], which returns the first 5 sentences of a page or 5 similar entities, lookup[string], which returns the next sentence containing a string, and finish[answer], which ends the task. Retrieval is intentionally weak because it matches only near-exact page names, so the model has to reason explicitly about what to look up.

Baselines and the switching rules

Each baseline is an ablation of the ReAct trajectories: Standard removes every thought, action and observation, CoT removes actions and observations, and Act removes thoughts. CoT-SC draws 21 CoT trajectories at decoding temperature 0.7 and keeps the majority answer.

The authors observe that ReAct gives more grounded trajectories, while CoT forms reasoning structure more accurately but is prone to hallucinated facts or thoughts. The two methods therefore switch in both directions: ReAct falls back to CoT-SC when it cannot return an answer within 7 steps on HotpotQA or 5 steps on FEVER. CoT-SC falls back to ReAct when the majority answer among \(n\) samples occurs fewer than \(n/2\) times, which signals that internal knowledge may not support the answer confidently.

HotpotQA and FEVER prompting results

With PaLM-540B, ReAct scored 27.4 EM on HotpotQA, a little under CoT at 29.4, and 60.9 accuracy on FEVER, above CoT at 56.3. Against Act, ReAct is higher on both tasks, 27.4 vs 25.7 EM and 60.9 vs 58.9 accuracy, which the authors read as evidence that reasoning helps action, especially when writing the final answer.

The combined methods score highest: ReAct to CoT-SC reached 35.1 EM on HotpotQA, and CoT-SC to ReAct reached 64.6 accuracy on FEVER. Plain CoT-SC reached 33.4 EM and 60.4 accuracy, and Standard prompting reached 28.7 and 57.1, so both combinations sit above these baselines. Sampling more CoT-SC trajectories shows that the combinations match CoT-SC at 21 samples while using only 3 to 5 samples.

Error types on HotpotQA

The authors sampled 50 trajectories each from ReAct and CoT, keeping correct and incorrect answers judged by EM, and labeled their success and failure types by hand, which gives 200 examples. CoT's failures are led by hallucination at 56%, and its false positive rate is 14%, against 6% for ReAct.

ReAct's largest failure type is reasoning error at 47%, against 16% for CoT, and this category includes repeating earlier thoughts and actions without leaving the loop. Non-informative search accounts for 23% of ReAct's error cases, so a weak search stalls the reasoning that follows. Label ambiguity appears at similar rates, 29% for ReAct and 28% for CoT.

Finetuning and model scale

Figure 3 plots HotpotQA EM across PaLM-8B, PaLM-62B and PaLM-540B for prompting and finetuning, comparing Standard, CoT, Act and ReAct. Prompted only, ReAct is the weakest of the four methods on PaLM-8B and PaLM-62B, which the authors link to how hard it is to pick up reasoning and acting from in-context examples alone. Finetuning reverses that ordering: after training on 3,000 trajectories with correct answers, ReAct becomes the best of the four methods.

A finetuned PaLM-8B with ReAct outperforms every PaLM-62B prompting method, and a finetuned PaLM-62B with ReAct outperforms every 540B prompting method.

Finetuning Standard or CoT is worse than finetuning ReAct or Act, and the authors argue that the former mainly teaches memorizing possibly hallucinated facts, while the latter teaches how to reason and act to reach Wikipedia. Every prompting method is still far from the domain-specific SoTA, where supervised SoTA reaches 67.5 EM, and more human-written data is proposed as the route to close the gap.

ALFWorld success rates

The ReAct prompts were built from three annotated trajectories per task type, with six prompts formed from pairs of them, while the Act prompts keep the same trajectories without thoughts.

The best ReAct trial reached a 71% overall success rate, against 45% for the best Act trial and 37% for the best BUTLER trial. The authors report that ReAct beats Act in six controlled trials, with relative gains of 33% to 90%, averaging 62%. Without thoughts, Act often fails to split goals into subgoals and loses track of the environment state.

WebShop scores and success rates

It is scored by average score and success rate over 500 test instructions.

Act prompts contain search, choose product, choose options and buy, while ReAct prompts add reasoning about what to explore, when to buy and which options matter. ReAct reached a success rate of 40.0 and a score of 66.6, against 30.1 and 62.3 for Act and 29.1 success for IL; IL+RL reached 28.7, and expert humans reached 59.6 success and 82.1 score.

One-shot Act already performs on par with IL and IL+RL, and ReAct adds an absolute 10% over the previous best success rate. The authors note that ReAct more often identifies relevant products and options by reasoning across noisy observations, while expert humans still explore far more products and reformulate queries.

Reasoning traces versus Inner Monologue feedback

Inner Monologue is the closest prior work: an embodied agent's actions are driven by an injected monologue, but that monologue covers only environment state and what remains to finish the goal. ReAct's traces are more flexible and sparse, so they can carry different reasoning types across tasks.

To isolate this difference, the authors ran ReAct-IM, which uses dense Inner Monologue-style feedback as its thought pattern. Overall success is 71 for ReAct and 53 for ReAct-IM, with ReAct ahead on five of six task types. ReAct-IM made errors in deciding when subgoals were finished and what came next, which the authors trace to missing goal decomposition, and it struggled to place items without commonsense reasoning.

Limits of prompting and of the evidence

Prompting alone makes ReAct the weakest method on small PaLM models, and the authors note that complex tasks with large action spaces need more demonstrations, which can exceed the input length of in-context learning. The search action matches only near-exact names, so its failures feed directly into the reasoning errors.

The error analysis rests on 200 HotpotQA examples labeled by hand. Repetitive loops are attributed to greedy decoding, which the authors suspect and leave to future work with methods such as beam search. The decision-making results rest on 134 unseen ALFWorld games and 500 WebShop test instructions, and the gap to expert humans on WebShop remains open.

Paper info

Authors
Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, Yuan Cao
Venue
arXiv · Preprint
First published
2022-10-6
Added
2026-10-20
Updated
2023-3-10
Version
v3
arXiv
2210.03629
Category
cs.CL · cs.AI · cs.LG
Original paper terms
CC BY 4.0
What we show
Paper info, commentary and permitted figures from the original paper

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Abstract

While large language models (LLMs) have demonstrated impressive capabilities across tasks in language understanding and interactive decision making, their abilities for reasoning (e.g. chain-of-thought prompting) and acting (e.g. action plan generation) have primarily been studied as separate topics. In this paper, we explore the use of LLMs to generate both reasoning traces and task-specific actions in an interleaved manner, allowing for greater synergy between the two: reasoning traces help the model induce, track, and update action plans as well as handle exceptions, while actions allow it to interface with external sources, such as knowledge bases or environments, to gather additional information. We apply our approach, named ReAct, to a diverse set of language and decision making tasks and demonstrate its effectiveness over state-of-the-art baselines, as well as improved human interpretability and trustworthiness over methods without reasoning or acting components. Concretely, on question answering (HotpotQA) and fact verification (Fever), ReAct overcomes issues of hallucination and error propagation prevalent in chain-of-thought reasoning by interacting with a simple Wikipedia API, and generates human-like task-solving trajectories that are more interpretable than baselines without reasoning traces. On two interactive decision making benchmarks (ALFWorld and WebShop), ReAct outperforms imitation and reinforcement learning methods by an absolute success rate of 34% and 10% respectively, while being prompted with only one or two in-context examples. Project site with code: https://react-lm.github.io

Quote from the paper

Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, Yuan Cao (2022). ReAct: Synergizing Reasoning and Acting in Language Models. arXiv:2210.03629v3. https://arxiv.org/abs/2210.03629v3

BibTeX
@misc{yao2022react,
  title = {{ReAct: Synergizing Reasoning and Acting in Language Models}},
  author = {Shunyu Yao and Jeffrey Zhao and Dian Yu and Nan Du and Izhak Shafran and Karthik Narasimhan and Yuan Cao},
  year = {2022},
  eprint = {2210.03629},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2210.03629v3}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up