Skip to main content
GW
HomeWorkAI appsPapersAboutNotesStackLabPilotPlan↗ (opens in a new tab)INVST↗ (opens in a new tab)
Govind Waghmare

Finance systems and AI. Building in public from NYC.

Resume (PDF)Book 20 minEmail
HomeNotesWorkAboutStackPapersLabFor founders
XLinkedInGitHubllms.txt
© 2026 · New York City

Keyboard shortcuts

?
Open this list
g then h
Go to Home
g then w
Go to Work
g then n
Go to Notes
g then a
Go to About
c
Ask the AI guide
Esc
Close this list
Original paperSection A, The abstract
Open in new tab (opens in a new tab)
All papers
FoundationsClassic

Let the model think, act, look, then think again

Paper: ReAct: Synergizing Reasoning and Acting in Language Models

Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, Yuan Cao · ICLR 2023 · Posted 6 Oct 2022 · 18 min read · arXiv 2210.03629

Share this paper

LinkedIn (opens in a new tab)X (opens in a new tab)WhatsApp (opens in a new tab)EmailDownload PDFExplainer + original paper (PDF), 1.1 MB

  • Models were taught to reason or to act, not both.
  • Reasoning alone cannot check facts in the world.
  • That leads to made-up facts and error spread.
  • Acting alone has no plan and loses track.
71%

success rate for ReAct on ALFWorld, versus 37% for the best imitation agent.

  • They used PaLM-540B with a few examples in the prompt.
  • Tasks: question answering, fact checking, a text game and web shopping.
  • They compared with reason-only, act-only and trained agents.
  • They also finetuned smaller models.

  • ReAct beats acting alone on every task.
  • It made up facts in 0% of failures, versus 56% for chain of thought.
  • Mixing ReAct and chain of thought scored best on question answering.
  • On WebShop, it beat the best success rate by 10%.

ReAct beats imitation learning and acting only on ALFWorldFrom Table 3
0255075100Average success rate over all tasks (%)BUTLER (best of 8)37%Act (best of 6)45%ReAct-IM (best of 6)53%ReAct (best of 6)71%

Hover, tap or focus a bar to read its exact value.

MethodSuccess (%)
BUTLER (best of 8)37
Act (best of 6)45
ReAct-IM (best of 6)53
ReAct (best of 6)71

  • The agent can get stuck in loops that repeat the same step.
  • It makes more reasoning errors than chain of thought.
  • Hard tasks need more examples than the prompt can hold.
  • Tool access has risks. The paper kept tests to safe sites.

Jump to

  1. A The abstract
  2. 1 Introduction
  3. 2 ReAct: reasoning plus acting
  4. 3.1 Knowledge tasks: setup
  5. 3.2 Knowledge tasks: methods
  6. 3.3 Knowledge tasks: results
  7. 4 Decision making tasks
  8. 5 Related work
  9. 6 Conclusion, ethics and reproducibility
  10. App A Appendix A: additional results
  11. App B Appendix B: experiment details
  12. App C Appendix C: prompts
  13. App D Appendix D: trajectories
  14. App E Appendix E: success and failure modes
  15. W Words to know

Every detail from the paper

Cards follow the paper's own order. Dotted words link to Words to know. Numbers match the paper.

The idea

  • Language models were studied for reasoning and for acting as separate topics.
  • The authors let one model do both, taking turns.
  • They call the method ReAct.

Why both

  • Reasoning helps the model make, track and update action plans.
  • It also helps with exceptions.
  • Actions let the model get new facts from outside sources, such as a knowledge base.

The results

  • On HotpotQA and Fever, ReAct cuts hallucination and error spread seen in chain of thought.
  • It uses a simple Wikipedia API.
  • On ALFWorld and WebShop, ReAct beats imitation and reinforcement learning by 34% and 10%.
  • It needs only one or two examples in the prompt.

Reasoning and acting together

  • People mix actions with inner speech.
  • Cooking example: "now that everything is cut, I should heat up the pot of water".
  • Or: "I don't have salt, so let me use soy sauce and pepper".
  • Or: "how do I prepare dough? Let me search on the Internet".
  • Acting then supports reasoning: open the fridge, check ingredients.

Reasoning alone

  • Chain of thought shows models can reason in steps.
  • But it is a static black box.
  • It uses only the model's own memory, not the outside world.
  • That leads to made-up facts and error propagation.

Acting alone

  • Other work lets language models plan and act in interactive worlds.
  • These models predict actions from language priors.
  • They do not reason about high-level goals or keep a working memory.
Four ways to answer a questionFrom Figure 1
  1. Standard: answer straight away
  2. Chain of thought: reason only
  3. Act only: search, no thoughts
  4. ReActReAct: think, act, observe

The example question asks what other device can control the Apple Remote's program. Only ReAct finds the right answer.

The idea

  • ReAct prompts a model to write thoughts and actions in turns.
  • Reason to act: thoughts create, keep and adjust plans.
  • Act to reason: actions bring in new information from outside.

Tests

  • Four benchmarks: HotPotQA (question answering) and Fever (fact checking).
  • ALFWorld (a text game) and WebShop (web shopping).

Findings

  • On HotPotQA and Fever, ReAct beats acting alone and is close to chain of thought.
  • The best result is ReAct plus CoT: internal and outside knowledge together.
  • On ALFWorld and WebShop, one or two examples win.
  • They beat methods trained on 10^3 to 10^5 tasks.
  • Gains: 34% and 10% in success rate.
  • Humans can inspect thoughts and see which facts came from outside.

Four contributions

  • 1. ReAct: a prompt-based way to combine reasoning and acting.
  • 2. Tests across diverse benchmarks.
  • 3. Ablations on acting in reasoning tasks and reasoning in action tasks.
  • 4. Limits under prompting, and early finetuning tests.

The setup

  • An agent gets an observation and picks an action at each step.
  • The context is the full history of observations and actions.
  • Mapping context to action is hard when it needs much thinking.
  • Figure 1 (1c): an acting-only agent fails to give the final answer.
  • Figure 1 (2a): it misses that sinkbasin 1 has no peppershaker, so it repeats.

The idea

  • ReAct adds language to the action space.
  • A thought is an action in language.
  • A thought does not change the world, so it gets no observation.
  • It reasons over the context and adds to it for later steps.
The ReAct loopFrom Section 2 and Figure 1
  1. Task question
  2. ThoughtThought: plan next step
  3. ActAction: search a source
  4. ObsObservation: result comes back
  5. Thought: update plan
  6. Final answer

Thoughts and actions repeat until the model can answer.

Kinds of useful thoughts

  • Break a goal into an action plan.
  • Add commonsense knowledge.
  • Pull key facts from observations.
  • Track progress and change plans.
  • Handle exceptions and adjust.

How they run it

  • The language space is unlimited, so learning there needs strong language priors.
  • So they use a frozen PaLM-540B with a few-shot prompt.
  • Each example is a human trajectory of actions, thoughts and observations.
  • Reasoning-heavy tasks alternate thought and action.
  • Tasks with many actions use sparse thoughts, placed where useful.
  • The model decides when to think.

Four features

  • A) Easy to design. People type thoughts on top of actions.
  • B) General. It works with different action spaces and reasoning needs.
  • C) Strong. It learns from one to six examples. It is robust to prompt choice.
  • D) Human aligned. People can inspect and fix thoughts.
  • Editing a thought can steer the agent (Figure 5).

Two datasets

  • HotPotQA: multi-hop questions over two or more Wikipedia passages.
  • FEVER: claims labeled SUPPORTS, REFUTES or NOT ENOUGH INFO.
  • Both use a question-only setup. The model has no support text.
  • It must use its memory or search.

Wikipedia API: three actions

  • search[entity] returns the first 5 sentences of the page, or the top-5 similar entities.
  • lookup[string] returns the next sentence in the page with the string, like Ctrl+F.
  • finish[answer] ends the task with an answer.

A weak tool, on purpose

  • It can only find a small part of a page by exact name.
  • That is much weaker than state-of-the-art search.
  • The aim is to copy how people use Wikipedia.
  • It forces the model to search through explicit reasoning.

ReAct prompts

  • For HotpotQA they pick 6 cases from the training set. For Fever, 3.
  • They write ReAct trajectories by hand.
  • More examples do not help.
  • Thoughts split questions, pull facts, use commonsense or arithmetic, and guide search.
  • Thoughts also synthesize the final answer.

Baselines

  • Standard: no thoughts, actions or observations.
  • CoT: thoughts only, no actions.
  • CoT-SC: 21 CoT samples at temperature 0.7, take the majority answer.
  • Act: actions only, no thoughts.
Mixing ReAct with chain of thoughtFrom Section 3.2
  1. ReAct finds no answer in steps
  2. ReAct→CoT-SCFall back to CoT-SC
  3. CoT-SC majority below half
  4. CoT-SC→ReActFall back to ReAct

ReAct has 7 steps for HotpotQA and 5 for Fever. More steps did not help.

Combining both

  • ReAct is more factual and grounded.
  • CoT forms better reasoning but can invent facts.
  • So the model switches to the other method with two rules.
  • Rule A: if ReAct gives no answer in 7 steps (5 for Fever), use CoT-SC.
  • Rule B: if the CoT-SC majority is under n/2, back off to ReAct.

Finetuning

  • Manual traces do not scale, so they bootstrap.
  • They take 3,000 correct ReAct trajectories.
  • They finetune smaller models, PaLM-8B and 62B, on them.

ReAct versus Act

  • ReAct beats Act on both tasks.
  • Reasoning guides acting, most for the final answer.
  • Finetuning confirms it.
Combining ReAct and chain of thought scores best on both tasksFrom Table 1
HotpotQA (EM)Fever (accuracy)
020406070Score (%)Standard28.7%57.1%CoT29.4%56.3%CoT-SC33.4%60.4%Act25.7%58.9%ReAct27.4%60.9%CoT-SC then ReAct34.2%64.6%ReAct then CoT-SC35.1%62.0%

Hover, tap or focus a bar to read its exact value.

MethodHotpotQA (EM) (%)Fever (accuracy) (%)
Standard28.757.1
CoT29.456.3
CoT-SC33.460.4
Act25.758.9
ReAct27.460.9
CoT-SC then ReAct34.264.6
ReAct then CoT-SC35.162.0

Table 1 notes

  • Supervised state of the art: 67.5 on HotpotQA and 89.5 on Fever.
  • HotpotQA EM for Standard, CoT, CoT-SC in Wang et al is 27.1, 28.9, 33.8.

ReAct versus CoT

  • ReAct beats CoT on Fever: 60.9 versus 56.3.
  • It trails CoT on HotpotQA: 27.4 versus 29.4.
  • Fever claims can differ by a slight amount, so exact outside facts matter.
TypeWhat it meansReActCoT
True positiveRight reasoning and facts94%86%
False positiveMade-up reasoning or facts6%14%
Reasoning errorWrong reasoning, or stuck in a loop47%16%
Search result errorSearch empty or not useful23%-
HallucinationMade-up reasoning or facts0%56%
Label ambiguityRight but did not match the label29%28%

Table 2: success and failure on HotpotQA (50 samples each)

They labeled 200 examples: 50 right and 50 wrong each for ReAct and CoT.

CoT fails by making things up; ReAct fails by bad reasoningFrom Table 2
ReActCoT
0255075100% of cases studiedTrue positive94%86%False positive6%14%Reasoning error47%16%Hallucination0%56%Label ambiguity29%28%

Hover, tap or focus a bar to read its exact value.

TypeReAct (%)CoT (%)
True positive9486
False positive614
Reasoning error4716
Hallucination056
Label ambiguity2928

Key observations

  • A) Hallucination hurts CoT: 14% false positives against 6%, and 56% of its failures.
  • ReAct is more grounded and fact-driven.
  • B) The ReAct format is less flexible, so reasoning errors rise.
  • A common one is repeating earlier thoughts and actions in a loop.
  • C) Useless search causes 23% of ReAct errors, and recovery is hard.

Outdated labels

  • Some HotpotQA answer labels are outdated.
  • Figure 4 is one example.

ReAct plus CoT-SC

  • The best prompts: ReAct then CoT-SC on HotpotQA, CoT-SC then ReAct on Fever.
  • Both beat CoT-SC at every sample count (Figure 2).
  • They reach CoT-SC at 21 samples using only 3-5 samples.

Finetuning (Figure 3)

  • With PaLM-8B and 62B prompts, ReAct is worst of four.
  • It is hard to learn both skills from examples.
  • After finetuning on 3,000 examples, ReAct is best.
  • Finetuned PaLM-8B ReAct beats all PaLM-62B prompting methods.
  • Finetuned PaLM-62B ReAct beats all 540B prompting methods.

Why finetuned ReAct wins

  • Finetuning Standard or CoT teaches the model to memorize facts that may be false.
  • Finetuning ReAct or Act teaches it how to find facts.
  • That skill transfers better.

The two tasks

  • ALFWorld and WebShop need long runs of actions and sparse rewards.
  • That is why reasoning to guide acting matters.
ALFWorld: setup

The game

  • A text game with 6 task types, such as "examine paper under desklamp".
  • Actions look like "go to coffeetable 1" or "take paper 2".
  • A task can have more than 50 locations and need more than 50 steps.
  • The agent must guess likely places, such as desklamps on desks.

The prompts and baseline

  • They write 3 trajectories per task type with sparse thoughts.
  • Thoughts split the goal, track subgoals, pick the next subgoal, and use commonsense.
  • They test on 134 unseen games.
  • They build 6 prompts per task type from pairs of 2 of the 3 trajectories.
  • Act uses the same trajectories without thoughts.
  • The baseline BUTLER is an imitation agent trained on 10^5 expert trajectories per task type.
WebShop: setup

The task

  • An online store with 1.18M products and 12k human instructions.
  • The agent must buy a product that fits an instruction.
  • Example: a nightstand with drawers priced lower than $140.
  • Scoring is average score and success rate on 500 test instructions.
  • Act actions: search, choose product, choose options, buy.
  • ReAct adds thoughts on what to explore, when to buy and which options matter.

Baselines

  • Imitation learning (IL) used 1,012 human annotated trajectories.
  • IL plus reinforcement learning (IL + RL) also used 10,587 training instructions.
MethodPickCleanHeat
Act (best of 6)884274
ReAct (avg)653983
ReAct (best of 6)925896
ReAct-IM (avg)555960
ReAct-IM (best of 6)626887
BUTLERg (best of 8)332670
BUTLER (best of 8)463974

Table 3 (part 1): ALFWorld success rates (%)

MethodCoolLookPick 2
Act (best of 6)677241
ReAct (avg)765524
ReAct (best of 6)867841
ReAct-IM (avg)552324
ReAct-IM (best of 6)573933
BUTLERg (best of 8)761712
BUTLER (best of 8)1002224

Table 3 (part 2): ALFWorld success rates (%)

BUTLER and BUTLERg are from Shridhar et al. All use greedy decoding except BUTLER, which uses beam search.

ReAct beats acting only and imitation learning on ALFWorldFrom Table 3
0255075100Average success rate over all tasks (%)BUTLERg (best of 8)22%BUTLER (best of 8)37%Act (best of 6)45%ReAct-IM (best of 6)53%ReAct (avg)57%ReAct (best of 6)71%

Hover, tap or focus a bar to read its exact value.

MethodSuccess (%)
BUTLERg (best of 8)22
BUTLER (best of 8)37
Act (best of 6)45
ReAct-IM (best of 6)53
ReAct (avg)57
ReAct (best of 6)71

ALFWorld results

  • The best ReAct trial scores 71%. The best Act scores 45%. BUTLER scores 37%.
  • Even the worst ReAct trial (48%) beats the best trial of both.
  • ReAct beats Act in all 6 controlled trials, by 33% to 90%, 62% on average.
  • Without thoughts, Act fails to split goals or loses track of the state.
MethodScoreSuccess rate (%)
Act62.330.1
ReAct66.640.0
IL59.929.1
IL + RL62.428.7
Human expert82.159.6

Table 4: WebShop

WebShop results

  • One-shot Act already matches IL and IL + RL.
  • ReAct adds an absolute 10% over the best before.
  • Thoughts help bridge noisy page text and the right choice.
  • Expert humans still do much better. They explore more and rewrite queries.

Reasoning versus feedback

  • The closest earlier work is Inner Monologue (IM).
  • Its "monologue" is only feedback about the environment and the goal.
  • ReAct thoughts are flexible and sparse, with many types.
  • They tested IM-style dense feedback (ReAct-IM).

ReAct versus IM

  • ReAct beats ReAct-IM overall: 71 versus 53.
  • It wins on five of six task types.
  • ReAct-IM often misjudged when subgoals were done.
  • It lacked goal splitting and commonsense on where items sit.

Models for reasoning

  • Chain of thought, least-to-most prompting, zero-shot CoT and self-consistency.
  • Selection-Inference, STaR, faithful reasoning and Scratchpad add structure or finetuning.
  • ReAct goes beyond fixed reasoning.
  • It puts actions and observations into one stream the model reasons over.

Models for decisions

  • WebGPT uses a model to browse. It needs costly human feedback for reinforcement learning.
  • BlenderBot, Sparrow and SimpleTOD train models to call APIs. They also use costly data.
  • SayCan and Inner Monologue use models for robot planning.
  • ReAct learns a policy more cheaply, from language descriptions of reasoning.

Conclusion

  • ReAct is simple and works across question answering, fact checking and interactive tasks.
  • It gives readable decision traces.
  • Hard tasks with many actions need more examples than the input length allows.
  • Finetuning on HotpotQA looks promising.
  • Next: multi-task training and reinforcement learning.

Reproducibility

  • Main tests use PaLM, which is not open.
  • All prompts are in Appendix C. GPT-3 results are in Appendix A.1.

Ethics

  • Hooking a model to outside actions has risks.
  • Examples: reading private information, or taking harmful actions.
  • The tests used only Wikipedia and WebShop, with no private data or dangerous actions.
  • Models cannot really buy products or edit Wikipedia.

TaskPaLM-540BGPT-3
HotpotQA (exact match)29.430.8
ALFWorld (success rate %)70.978.4

Table 5: PaLM-540B versus GPT-3 with ReAct

GPT-3 is text-davinci-002. HotpotQA uses 500 validation questions. ALFWorld uses 134 tasks.

A.1 GPT-3

  • GPT-3 does better than PaLM-540B on both.
  • It may be because GPT-3 is finetuned to follow instructions.
  • So ReAct works across models.

A.2 Up-to-date knowledge

  • Some HotpotQA labels are outdated, such as a hotel's room count.
  • Standard and CoT hallucinate. Act fails without reasoning.
  • Only ReAct gets the new answer.

A.3 Human in the loop

  • A human can edit two thoughts (Act 17 and Act 23) in a failed run.
  • ReAct then changes behavior and succeeds.
  • This is far easier than typing tens of actions.
  • Act and reinforcement learning methods cannot be fixed this way.

B.1 HotpotQA finetuning

  • Batch size is 64.
  • PaLM-8B: ReAct and Act train 4 thousand steps.
  • PaLM-8B: Standard and CoT train 2 thousand steps.
  • PaLM-62B: ReAct and Act train 4 thousand steps.
  • PaLM-62B: Standard and CoT train 1 thousand steps.
  • ReAct and Act gain from more steps. Standard and CoT degrade soon.

B.2 ALFWorld IM-style

  • IM-style traces use dense feedback thoughts.
  • They only decompose the goal and the current subgoal.
  • They lack thoughts on when a subgoal is done and what is next.
  • They also lack thoughts on where items are.

What is there

  • C.1 HotpotQA prompts, C.2 Fever prompts.
  • C.3 WebShop prompts, C.4 ALFWorld prompts.
  • They hold the full few-shot examples for Standard, CoT, Act, ReAct and ReAct-IM.

Examples

  • D.1 Fever trajectories. D.2 ALFWorld ReAct, Act and ReAct-IM trajectories.
  • D.3 WebShop trajectories.

Examples

  • E.1 shows examples for each success and failure mode in Table 2.
  • Search results and non-representative steps are cut to save space.
  • This write-up covers the main paper in full and each appendix at summary level.

Words to know

  • Agent: A model that picks actions and sees the results.
  • API: A way for a program to call a service.
  • Chain of thought: Reasoning steps written in plain words before the answer.
  • Exact match: A score that counts an answer only if it equals the label.
  • Hallucination: When a model states made-up facts as if they were true.
  • Imitation learning: Training a model to copy expert examples.
  • Reinforcement learning: Training a model by reward for good results.
  • Self-consistency: Sample many answers and take the most common one.
  • Trajectory: The full list of thoughts, actions and observations in one run.

Share this paper

LinkedIn (opens in a new tab)X (opens in a new tab)WhatsApp (opens in a new tab)EmailDownload PDFExplainer + original paper (PDF), 1.1 MB

Ask AI about this paper

Stuck on a word or an idea? Ask in plain words. The answer comes from the write-up on this page.

Read the original paper on arXiv: ReAct: Synergizing Reasoning and Acting in Language Models (opens in a new tab)

Jump to

One paper a week, in plain English

Every Monday: the new AI papers worth your time. Short lines, the key number, and what to do with it.

One email a week. Unsubscribe with one click. No spam.