Papers · 2022 · Reading: 21 min, plus 3 in closed details.
Paper · ICLR 2023 · arXiv 2210.03629

ReAct: Synergizing Reasoning and Acting in Language Models (ReAct)

Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, Yuan Cao
Princeton University (Yao, Narasimhan); Google Research, Brain team (the rest). Yao did the work as a Google intern · October 2022 (arXiv v1, 6 October 2022); v3, 10 March 2023, adds the GPT-3 appendix; published at ICLR 2023

In one line: Interleaving free-form thoughts with environment actions in one prompted loop (PaLM-540B) beats acting-only everywhere and reasoning-only on FEVER (60.9 vs 56.3) but not HotpotQA (27.4 vs 29.4 EM), where switching to and from CoT-SC does best; ALFWorld 71% best of 6 prompts (57% on average) and WebShop +10 points of success over imitation and RL; the template most modern agent loops descend from.

71% vs 37% success
ALFWorld, ReAct against imitation learning
two in-context games against BUTLER trained on 105 expert trajectories per task type (best trials; the average ReAct prompt scores 57%) · Table 3
40.0% vs 29.1% success
WebShop, one-shot ReAct against imitation learning
500 test instructions; IL+RL 28.7%, Act 30.1%, human experts 59.6% · Table 4
0% vs 56% of failures
caused by hallucination, ReAct against CoT
HotpotQA, 200 hand-labelled trajectories; ReAct's own failures are mostly reasoning errors (47%), loops included · Table 2

How far to trust it: Believe the mechanism and the decision-making wins: the ALFWorld and WebShop gaps are three to six standard errors wide, from one or two exemplars. Treat the HotpotQA and FEVER orderings as inside the noise, and read ALFWorld's 71% as the best of six prompts picked on the test games (the average prompt scores 57%). The evidence, judged.

The idea in one sentence: let a few-shot-prompted language model write free-text thoughts between its tool actions, each thought appended to the context like an action that returns no observation; reasoning then plans the next action and the observations ground the reasoning, which cuts hallucination on question answering and lifts ALFWorld success from 45% (actions only) to 71% with one or two examples.

You need: few-shot prompting (GPT-3) and chain-of-thought. The agent loop as it is built today (native tool calls, stop conditions) is on Building a harness; multi-hop retrieval methods compared on Agentic retrieval; this page is the paper. New terms: thought (free text the model writes that does not touch the environment); Act (the ablation with thoughts deleted); dense and sparse thoughts (a thought before every action, or only where the model chooses); exact match (EM) (the answer string equals the label); CoT-SC (self-consistency: majority vote over sampled chains of thought); trajectory (one episode's full text).

Add language to the action space: thoughts steer the actions, observations correct the thoughts

Left: the whole method (§2): at each step the model writes either a thought, appended to its context with no feedback, or an action, which the environment answers with an observation. Right: the baselines are the same hand-written trajectories with thoughts, actions or both deleted, so each comparison isolates what was removed; the answers are those of Figure 1 on the Apple Remote question, the scores HotpotQA exact match from Table 1. Notice that ReAct is not the top scorer there (CoT is, within the noise); its clear wins are on FEVER and the decision tasks.

Problem

§1 Introduction

By late 2022 two lines of language model work had matured separately (§1).

  • Reasoning. Chain-of-thought prompting (CoT) showed that a prompted model can reason step by step. But CoT is "a static black box": the model reasons only over its own internal representations, is not grounded in the world, and cannot look anything up. So it hallucinates facts and propagates early errors through the whole chain (Figure 1 (1b), §1).
  • Acting. Work such as WebGPT, SayCan and Inner Monologue used language models to emit actions in interactive environments. These systems did not reason abstractly about high-level goals or keep a working memory; Inner Monologue's "reasoning" only restates facts about the current state. WebGPT and dialogue agents also needed expensive human feedback or imitation and reinforcement learning (§1, §5).

The question: can free-form reasoning and environment actions be interleaved in one loop, each improving the other, with nothing but a few-shot prompt?

Idea: thoughts are actions that touch nothing

§2

Take the usual agent setup. At step t the agent sees an observation ot and picks an action at from a policy π(at | ct), where the context ct = (o1, a1, …, ot−1, at−1, ot). Learning that policy is hard when the mapping from context to action is "highly implicit and requires extensive computation" (§2).

 = A ∪ L,   a thought ât ∈ L returns no observation:   ct+1 = (ct, ât)
The whole method, §2: add the space of language L to the action space A. A thought does not change the environment and gets no feedback; it only composes useful information from the context and appends it, to condition what comes next.

The model decides for itself when to think and when to act. The paper lists the kinds of thought it saw (§2):

  • decomposing the goal and making a plan;
  • injecting commonsense knowledge;
  • extracting the important part of an observation;
  • tracking progress and moving to the next subgoal;
  • handling exceptions and adjusting the plan.

The paper names the two directions of the synergy. Reason to act: thoughts create, maintain and adjust plans. Act to reason: actions bring outside information into the reasoning (§1). The stage beside this text is Figure 1's question, run four ways: Standard, CoT (reason only), Act (act only) and ReAct, one lane each, so you can watch where each one goes wrong. The Replay the traces tab steps through the same episode turn by turn with counters and the harness code, and has five more of the paper's episodes.

  1. One question, four prompts. The same HotpotQA question opens every lane: "Aside from the Apple Remote, what other device can control the program Apple Remote was originally designed to interact with?" Behind it stands its prompt of six solved exemplars, 114 words for Standard, 308 for CoT, 515 for Act and 938 for ReAct, because each baseline is the ReAct exemplars with parts deleted. At the back is the Wikipedia API, a separate object that only actions reach.
  2. Standard: one guess. Question in, answer out: "iPod". Wrong: with nothing to look up and no room to reason, the model guesses an Apple device.
  3. CoT: a fluent chain on a false fact. One 35-word thought opens with "Apple Remote was originally designed to interact with Apple TV", which is hallucinated (the remote was made for Front Row, a program), and every later step inherits it. The answer "iPhone, iPad, iPod Touch" is wrong, confidently. Nothing reaches Wikipedia: CoT reasons only over what the model already holds.
  4. Act: finds the page, cannot use it. Three searches stream into Wikipedia: Apple Remote, then Front Row (no such title; the API returns similar ones), then Front Row (software), the page that holds the answer. Then Finish[yes]: it had the evidence but no step in which to put it together, so the final action is not even an answer of the right type.
  5. ReAct: plan, search, extract. Thought 1 decomposes the question and sends nothing to the environment. Search[Apple Remote] brings back "originally designed to control the Front Row media center program" (act to reason); Thought 2 extracts that fact and plans the next search (reason to act).
  6. ReAct: the same dead end, handled in words. Search[Front Row] hits the dead end Act hit. Thought 3 reformulates from the similar titles, Search[Front Row (software)], and the right page comes back.
  7. ReAct: synthesise, then finish. Thought 4 is the step Act was missing: "Front Row (software) is controlled by an Apple Remote or the keyboard function keys. So the answer is keyboard function keys." Finish[keyboard function keys] is correct, and every fact in the chain can be traced to an observation.
  8. Who wrote the context. Per lane, the words the model wrote stand on the plinth and the words the environment returned hang below it: Standard 1 and 0, CoT 39 and 0, Act 8 and 24, ReAct 90 and 53. CoT writes everything itself, Act mostly reads, ReAct does both: the trade-off between factuality and flexibility of §3.3 in one episode.

Figure 1 (1), transcribed; the right and wrong answers are the paper's. Each block is one entry of the trajectory, its height growing with the words as printed (observations cut with "..." where the paper cuts them); the glass tray under each lane is the context, growing as entries are appended. The exemplar stacks are the words of the paper's six HotpotQA prompts for each method, counted from Appendix C.1 by recompute.py. Words, not tokens.

Dense or sparse thoughts. On reasoning-heavy tasks every step is thought, action, observation ("dense" thought). On decision-making tasks a trajectory can run past 50 actions, and most steps need no deliberation. There the model places thoughts sparsely, where they help (§2).

The four properties the paper claims (§2)

All four come from the policy being one prompted language model (§2): easy to design (annotators type their thoughts on top of their actions; "No ad-hoc format choice, thought design, or example selection is used"), general (question answering, fact checking, a text game and web shopping with one recipe), performant and robust (one to six in-context examples, robust to which ones) and controllable (a person can read and edit a thought mid-run).

The loop is a few lines of code. The authors' released notebook generates "Thought i:" up to the next "Observation i:". It splits the text at "Action i:", runs the action against Wikipedia, appends all three to the prompt, and stops after a finish action or seven steps. When the split fails, it asks the model again for just the action and counts a "bad call" (hotpotqa.ipynb). Every agent framework since has wrapped that parse, act, append cycle (see Why it matters); how the loop is built now, with native tool calls instead of string splits, is on Building a harness.

Knowledge-intensive tasks: setup

§3.1, §3.2

Tasks. HotpotQA is multi-hop question answering over two or more Wikipedia passages. FEVER is fact verification: each claim is SUPPORTS, REFUTES or NOT ENOUGH INFO. Both run "question-only": the model gets no supporting paragraphs and must use its own knowledge or look things up (§3.1).

A deliberately weak tool. The Wikipedia API has three actions (§3.1):

  • search[entity] returns the first 5 sentences of the entity's page, or else the top-5 similar titles from Wikipedia search;
  • lookup[string] returns the next sentence on the page that contains the string, like Ctrl+F;
  • finish[answer] ends the task.

The paper says this is "significantly weaker than state-of-the-art lexical or neural retrievers". The point is to imitate how a person browses and to force retrieval through explicit reasoning.

Prompts. The authors took 6 HotpotQA and 3 FEVER training questions at random and wrote ReAct trajectories for them by hand; more examples did not help (footnote 2).

What the hand-written thoughts do (§3.2, Appendix C)

Thoughts in them decompose the question ("I need to search x, find y, then find z"). They also extract facts ("x was started in 1844"), do commonsense or arithmetic ("1844 < 1989"), reformulate searches and synthesise the answer (§3.2, Appendix C).

Baselines by deletion. Every baseline prompt is the ReAct trajectories with parts removed, so a comparison isolates exactly what was deleted (§3.2):

  • Standard: all thoughts, actions and observations removed (question, then answer);
  • CoT: actions and observations removed, a reasoning-only baseline. CoT-SC (self-consistency) samples 21 CoT trajectories at temperature 0.7 and takes the majority answer;
  • Act: thoughts removed, loosely like WebGPT but prompted rather than trained.

Deleting text changes the prompt's length as well as its content. In words, the six ReAct exemplars run to , against for Standard, for CoT and for Act (counted from Appendix C.1).

Combining internal and external knowledge. ReAct turned out more factual, while CoT is better at structuring the reasoning but hallucinates. So the paper backs off from one to the other (§3.2):

  • ReAct → CoT-SC: if ReAct has not answered within 7 steps (HotpotQA) or 5 (FEVER), fall back to CoT-SC (more steps did not help, footnote 3: see below).
  • CoT-SC → ReAct: if the majority answer of the n CoT-SC samples appears fewer than n/2 times, so the model's own knowledge looks unsure, fall back to ReAct.
Why 7 and 5 steps (footnote 3)

More steps did not help: trajectories that needed exactly 7 or 5 steps were only 0.84% and 1.33% of the correct ones (footnote 3).

Fine-tuning. Writing reasoning traces by hand does not scale, so the paper bootstraps instead, as in STaR. It keeps 3,000 trajectories with correct answers generated by ReAct (and likewise by each baseline) and fine-tunes PaLM-8B and PaLM-62B on them.

Fine-tuning hyperparameters (Appendix B.1)

Batch size is 64. ReAct and Act train for 4,000 steps; Standard and CoT for 2,000 (8B) or 1,000 (62B), because they "degrade soon after finetuning" (§3.2, Appendix B.1).

Every main result uses one frozen model, PaLM-540B, prompted. Appendix A.1 adds GPT-3 (text-davinci-002) runs (§2, Appendix A.1).

Knowledge-intensive tasks: results

§3.3, Table 1, Table 2, Figure 2
on HotpotQA, which scores higher: ReAct on its own, or chain-of-thought on its own?

ReAct beats Act on both tasks, 27.4 against 25.7 on HotpotQA and 60.9 against 58.9 on FEVER. That is the value of reasoning to guide acting, "especially for synthesizing the final answer" (§3.3). In Figure 1, Act found the right page and then answered "yes".

The failure analysis is the part most often cited. The authors sampled 50 correct and 50 incorrect trajectories from each of ReAct and CoT on HotpotQA, 200 in all, and labelled them by hand (Table 2, charted under Table 1):

  • Hallucination causes 56% of CoT's failures and none of ReAct's. 14% of CoT's "successes" are false positives (right answer, hallucinated reasoning), against 6% for ReAct.
  • ReAct's failures are mostly reasoning errors (47%). The structure makes it less flexible in forming reasoning steps. The category includes a failure specific to ReAct: the model repeats its previous thought and action and cannot jump out of the loop. The authors suspect greedy decoding (footnote 6).
  • Uninformative search causes 23% of ReAct's failures: a bad search result derails the reasoning, and the model has a hard time recovering. The paper calls this "an expected trade-off between factuality and flexibility".
  • Label ambiguity (right answer, not an exact match to the label) is 29% of ReAct's failures and 28% of CoT's. Some HotpotQA labels are simply outdated. In Figure 4, only ReAct gets the up-to-date answer, and exact match marks it wrong (replay it in the replay tab).

ReAct plus CoT-SC is the best prompting method. On HotpotQA the best is ReAct → CoT-SC at 35.1; on FEVER, CoT-SC → ReAct at 64.6. Figure 2 plots both against the number of CoT-SC samples. The paper says the combinations beat CoT-SC at every sample count and reach CoT-SC's 21-sample score "using merely 3-5 samples" (§3.3, Figure 2). Recovered from the figure's vector paths, that holds at 5 samples on HotpotQA. On FEVER, CoT-SC → ReAct needs 7 (Figure 2 rebuilt).

All prompting stays far below fully supervised systems: 67.5 on HotpotQA and 89.5 on FEVER (Table 1). The authors read that gap as the case for fine-tuning.

On HotpotQA CoT edges ReAct, on FEVER ReAct leads, and backing off between ReAct and CoT-SC beats both

Answer the question first. On FEVER, where claims can differ by a single detail, ReAct leads 60.9 to 56.3. Toggle the task:

Table 1, PaLM-540B. The whiskers are ±1 standard error assuming 500 questions: the paper never says how many questions Table 1 used, and the released code runs 500 random dev questions. At that size the ReAct and CoT gap on HotpotQA (2.0 points) is smaller than one standard error of the difference (); how such errors are computed in general is on Eval statistics (the central limit theorem gives the standard error).

Hallucination causes over half of CoT's failures and none of ReAct's

Fine-tuning flips the ranking

§3.3, Figure 3
PaLM-8B, prompted with the same exemplars: which of the four methods does worst on HotpotQA?

Fine-tuned, the ordering changes (Figure 3):

  • PaLM-8B fine-tuned on ReAct (25.1) beats every prompted PaLM-62B method; the best of those is CoT at 23.5.
  • PaLM-62B fine-tuned on ReAct (32.7) beats all four prompted PaLM-540B methods in the figure; the best is CoT at 29.4.
  • Fine-tuning Standard or CoT does much worse. The paper's reading: those runs teach the model to memorise (possibly hallucinated) facts, while ReAct and Act runs teach it to act to get information, "a more generalizable skill" (§3.3).

Note what "all 540B prompting methods" means. It is the four methods of Figure 3. The 62B fine-tuned ReAct's 32.7 does not beat 540B CoT-SC (33.4) or either combination (34.2 and 35.1) from Table 1.

Prompted, ReAct is worst at 8B; fine-tuned on 3,000 trajectories, it is best at both sizes tried

Answer the question first, then toggle the panel.

Figure 3 rebuilt from the bar heights in the figure's vector graphics, measured against its own gridlines (to about 0.01 point). The paper prints no numbers for it. The 540B prompted bars match Table 1 to 0.05; no 540B model was fine-tuned.

Decision-making tasks

§4, Tables 3 and 4

ALFWorld is a text game aligned with the embodied ALFRED benchmark: 6 task types (pick, clean, heat, cool, look, pick two), goals such as "examine paper under desklamp", games with more than 50 locations that take an expert more than 50 steps, and a premium on knowing where household objects usually are (§4). Here thoughts are sparse: the model writes one only where it needs to plan or track progress. Evaluation: the 134 unseen games, against BUTLER, which imitates 105 expert trajectories per task type.

ALFWorld prompts and the excluded baseline (§4, footnote 7)

The authors wrote three trajectories per task type with sparse thoughts (decompose the goal, track subgoals, pick the next one, reason about where things are); every ordered pair of two makes a prompt, so 6 prompts per type, and Act uses the same trajectories without thoughts. A GPT-2 fine-tuned on 3,553 games did much better than BUTLER but trained across task types, so it is left out (footnote 7, Micheli and Fleuret).

WebShop is a shopping site with 1.18M real Amazon products, scored on 500 test instructions by success rate (SR, the share of episodes whose bought product meets every wanted attribute). ReAct gets one exemplar; the baselines are trained by imitation learning (IL) and IL plus RL.

WebShop in full (§4)

12k human instructions ("a nightstand with drawers ... nickel finish, and priced lower than $140"); besides success rate, "score" is the average share of wanted attributes the bought product covers. IL trains on 1,012 human trajectories and IL+RL on a further 10,587 instructions (§4, Yao et al. 2022).

ALFWorld runs six prompts per method. Does the worst ReAct prompt beat the best Act prompt?

Results. On ALFWorld the best ReAct trial reaches 71% against 45% for the best Act trial and 37% for BUTLER; without thoughts, Act fails to break goals into subgoals or loses track of the state (Table 3). On WebShop one-shot Act already matches IL and IL+RL (30.1% against 29.1% and 28.7% success) and ReAct reaches 40.0%, "an absolute 10% improvement over the previous best success rate" (40.0 − 29.1 = 10.9; Table 4), its thoughts bridging noisy observations and actions ("the item has options '39x18x18inch' and 'blue' and seems good to buy"). Human experts reach 59.6% by exploring more and reformulating queries (§4). The abstract's "34% and 10%" are these two gaps: 71 − 37 and about 10.9.

Is it the reasoning, or just more feedback? Inner Monologue's monologue only restates the state and what remains to do; the paper argues it "does not truly comprise of inner thoughts", credits IM as the first closed loop, and calls ReAct the first to combine reasoning and acting with a language model in one (§4, §5). The ablation re-annotates the same trajectories with dense IM-style thoughts limited to the current goal and subgoal (ReAct-IM, Appendix B.2). ReAct wins 71% to 53% (best trials), ahead on five of six task types; ReAct-IM misses when a subgoal is done, what comes next and where items are likely to be (§4).

Editing thoughts steers the agent. In Figure 5 a ReAct run fails after a hallucinated thought. A person deletes one sentence and adds a hint to another, and the same model succeeds. Editing two thoughts replaces typing tens of actions. Act and reinforcement-learned policies offer nothing like this, since there is no thought to edit and changing a few actions does not change the rest (Appendix A.3). Replay it in the replay tab.

Another model. GPT-3 (text-davinci-002, greedy) does better than PaLM-540B: 30.8 against 29.4 on a 500-question HotpotQA subset and 78.4% against 70.9% on ALFWorld with PaLM's best prompt set (Table 5), possibly thanks to instruction tuning.

Limits the authors state. Tasks with large action spaces need more demonstrations than fit in a prompt; more high-quality human annotation is "the desiderata", and multi-task training plus reinforcement learning the next step (§6). The ethics statement flags the risk of giving a model real actions; here nothing can really be bought or edited.

Without thoughts the agent loses track; with two sparse thoughts it plans where to look and what comes next
The bottom half of the paper's Figure 1: an ALFWorld task, put some pepper shaker on a drawer. Left, Act-only: the agent opens a drawer, goes to the sink basin and twice tries to take a pepper shaker that is not there, nothing happens, failure. Right, ReAct: a thought says the shaker is more likely in cabinets or on countertops, the agent searches them, finds it on countertop 3, a second thought says next put it in the drawer, and it succeeds
Notice the two blue Think steps on the right: the first narrows the search to cabinets and countertops, the second marks the subgoal done and names the next one; the Act-only agent on the left repeats an impossible action. The paper's Figure 1, panel (2), cropped; the top half is the 3D stage in Idea. Credit: Yao et al. 2022, CC BY 4.0, from arXiv 2210.03629.
Even the worst ReAct prompt beats the best Act prompt on ALFWorld

Answer the question first. ReAct's advantage held in all six controlled trials, a relative gain of 33% to 90%, averaging 62% (§4). Success over all 134 games:

Table 3, the "All" column, plus the worst ReAct trial from the text. Whiskers: ±1 binomial standard error over 134 games. "Best of 6" picks the best prompt after seeing the test results, so the average ReAct prompt (57%) is the fairer single number. Act's average is not reported.

How much of this to believe

Tables 1 to 5, Figures 2 and 3

What holds up.

  • The decision-making gaps are large. ALFWorld best ReAct against best Act is 26 points with a standard error of about 5.8 (z ≈ 4.5). Against BUTLER it is 34 points (z ≈ 5.9). WebShop ReAct against IL is 10.9 points with a standard error of about 3.0 on 500 instructions (z ≈ 3.6). These are binomial standard errors that treat the runs as independent (gaps recomputed).
  • The ablations are controlled. Every baseline prompt is the same trajectories with parts deleted, and on ALFWorld all six ReAct prompts beat the best Act prompt.
  • It replicates on a second model family. GPT-3 does as well or better (Table 5). The prompts and code are public, and the pattern has since been reimplemented countless times. Everything in Why it matters below runs some form of this loop.
  • The authors flag their own weaknesses. ReAct trails CoT on HotpotQA, it gets stuck in loops, prompting sits far below supervised systems, and some labels are outdated. That counts in their favour.

What to discount.

  • HotpotQA and FEVER orderings are within the noise. The paper does not say how many questions Table 1 used. With the 500 the released code runs, one score has a standard error of about 2 points, and ReAct against CoT on HotpotQA (−2.0), ReAct against Act (+1.7) and ReAct → CoT-SC against CoT-SC (+1.7) are all under one standard error of the difference. The FEVER gaps of 4 to 5 points are about 1.4 to 1.5. A paired test on the same questions would be tighter, but no per-question results are published. There is one greedy run per method and no error bars.
  • "Best of 6" is chosen on the test games. ALFWorld's 71% is the best of six prompts, picked after seeing results on the 134 evaluation games. The average ReAct prompt scores 57%, and Act is reported only as its best. BUTLER's numbers are best of 8, copied from its paper, with beam search where ReAct is greedy. Table 3's per-task "best" cells are each maximised on their own, so they average above the "All" column (ReAct's six task bests average 75.2 against an "All" of 71): compare only "All".
  • Benchmarks and baselines from the same group. WebShop and its IL and IL+RL baselines come from the first author's own earlier paper (Yao et al. 2022), and the numbers are copied from it rather than rerun.
  • The numbers disagree with each other in places: Figure 2 against Table 1 on FEVER, Table 5 and the code README against Table 1, a Table 2 column that cannot come from 50 examples, a mislabelled table. None of these changes a conclusion, but they mark a paper assembled quickly.
    The five inconsistencies, each with its source
    • Figure 2's FEVER panel puts CoT at 59.3 and 21-sample CoT-SC at 61.0, while Table 1 says 56.3 and 60.4 (Figure 2 rebuilt).
    • Table 5 gives PaLM-540B ReAct 29.4 on HotpotQA against Table 1's 27.4, though on a different 500-question subset.
    • The code's README labels "PaLM-540B (paper)" with 29.4 on HotpotQA and 62.2 on FEVER, and GPT-3 with 30.4, where Table 5 says 30.8.
    • Table 2's ReAct failure column (47, 23, 0, 29) adds to 99 and cannot come from 50 labelled examples, which would give even percentages (recompute.py finds no count up to 60 that rounds to it).
    • The main text calls the ALFWorld table "Table 4" (it is Table 3), and the "Act" prompt printed in Table 7 ("No thoughts are provided") contains a think: line.
  • Prompt length is not controlled. The ReAct exemplars are about eight times the length of Standard's (). Deleting the thoughts also removes most of the in-context text.
  • The base model is closed. PaLM-540B was never released, so nobody can rerun the main tables. The public code uses GPT-3, and that model has now been shut down (OpenAI deprecations: text-davinci-002, 4 January 2024).

Verdict. Believe the mechanism and the decision-making results. Interleaved thoughts make an acting agent better, grounding cuts hallucination, and the ALFWorld and WebShop gains are several standard errors wide from one or two examples. Treat the knowledge-task orderings (ReAct against CoT, the combinations against CoT-SC) as suggestive, not shown. Read 71% as a best case: the typical prompt scores 57%.

The method itself is now standard, so instead of "What it takes to use this", the Then and now tab follows what replaced each part of the 2022 recipe.

Why it matters beyond the paper

It is the template of the modern agent loop. Thought, tool call, observation, appended to the context and repeated until a finish action. The two directions the paper named, reason to act and act to reason, are still how agent design is discussed. The loop as harnesses build it today is on Agentic harnesses (where the loop and tool calling came from) and Building a harness.

Each piece of the 2022 recipe was later replaced by training. The original was brittle. Actions were free text parsed with string splits, every task needed hand-written exemplars, it got stuck in the loops the paper documents, and the prompt carried hundreds of words of exemplars. Structured function calling removed the parsing, native tool-use training removed the exemplars, and reasoning models turned the thought channel into trained reasoning between tool calls: ReAct's dense-thought mode, learned end to end (dated detail below; the Then and now tab steps through one turn in each format). The paper anticipated this arc. Its fine-tuning section shows the format works far better trained than prompted, and its conclusion calls for multi-task training and reinforcement learning (§6).

It reframed retrieval. Classic RAG retrieves once and then reads. In ReAct the model decides what to retrieve next from what it has already seen: iterative, agentic retrieval, now the norm for multi-hop and deep-research work. ReAct against Self-Ask, IRCoT and the rest, measured on one question set, is on Agentic retrieval (retrieval as a tool the model calls).

Its evaluation style stuck. Hand-labelled taxonomies of success and failure (hallucination against reasoning error against bad search), and the trade-off between factuality and flexibility, remain the standard vocabulary for debugging agent trajectories; failure taxonomies for agents today are on Agent and trajectory evaluation.

Direct follow-ups: Reflexion (verbal self-reflection between attempts) and Tree of Thoughts (search over thoughts, same first author), both 2023.

Adoption and the products that replaced each piece, sources read 3 October 2026 (dated; it will change)

The loop in frameworks and harnesses:

  • LangChain's first agents (November 2022) prompted with a literal "Thought: / Action: / Action Input: / Observation:" format and parsed the text (mrkl/prompt.py). The ReAct repository's README points readers to LangChain's "zero-shot ReAct Agent" (README).
  • AutoGPT (2023) and open coding agents such as OpenHands (2024) run the same kind of loop.
  • Today's harnesses describe theirs the same way: Claude Code documents "the agentic loop", and the OpenAI Agents SDK says "If the LLM produces tool calls, we run those tool calls, append the results, and re-run the loop".
  • Anthropic's Building effective agents (December 2024) defines agents as "LLMs using tools based on environmental feedback in a loop".

What replaced each part of the recipe:

  • Structured function calling (OpenAI, 13 June 2023, then every provider) moved the action into a JSON object the model is trained to emit. That removed the parsing layer.
  • Native tool-use training baked the loop into the weights, with Toolformer (February 2023) as an early sketch, so no exemplar trajectories are needed.
  • Reasoning models turned the thought channel into reinforcement-learned reasoning tokens (DeepSeek-R1, January 2025). They emit those tokens between tool calls: OpenAI's o3 can "agentically use and combine every tool within ChatGPT" (April 2025). Claude 4 added "extended thinking with tool use", alternating "between reasoning and tool use" (May 2025), and interleaved thinking lets Claude "think between tool calls within a single assistant turn" (docs). That is ReAct's dense-thought mode, learned end to end.

Connections

  • GPT-3 (2020-05): the few-shot in-context learning that ReAct pushes to interactive tasks.
  • RAG (2020-05): fixed retrieve-then-generate; ReAct is the model-directed, iterative alternative that agentic RAG descends from.
  • InstructGPT (2022-03): the RLHF machinery that later trained tool use natively, replacing ReAct-style prompting.
  • DeepSeek-R1 (2025-01): reinforcement-learned reasoning tokens; interleaved thinking and tool calls are the trained descendant of ReAct's thought channel.
  • Topics: agentic-frameworks, agentic-harnesses, rag-and-retrieval.