NLP Lineage

6 October 2022 · Representation and retrieval

ReAct

ReAct: Synergizing Reasoning and Acting in Language Models

S. Yao, J. Zhao, D. Yu, N. Du, I. Shafran, K. Narasimhan, Y. Cao

Date
6 October 2022
What the date marks
arXiv submission
Kind
Technique
Organisation
Princeton / Google
Access
MIT
Other dates
ICLR 2023
Threads
In the guided tour
Chapter 13. Models that act
Learning phases
7. Agents

A milestone: 2 later milestones descend directly from it, and its descendants reach 3 of the 10 threads. How levels are decided

Drafted with Claude from the paper on 15 October 2026; reviewed by Zeeshan Arif. Read from arxiv.org (arXiv version 3 (March 2023) of the ICLR 2023 conference paper).

What it changed

It prompted a language model to alternate between writing its reasoning and taking actions, such as searching Wikipedia, so that each thought guides the next action and each result feeds the next thought.

The problem before it

Two lines of work were separate. Chain-of-thought prompting showed that a model reasons better when it writes out its steps. But the authors call it “a static black box”: the model reasons only from what it already knows, so it can invent facts, and one wrong step spreads to the answer.

Other work used language models to choose actions in an environment, such as a web browser in WebGPT or a robot’s next step. These systems mostly mapped what they saw directly to an action. They did not reason in language about goals, keep track of progress, or adjust a plan when something went wrong.

The idea

The mechanism. Let the model’s possible outputs include free-text “thoughts” as well as actions. A thought changes nothing in the environment and gets no response. It only adds to the context, to help the next step. A ReAct run is a chain of steps:

The model then writes the next thought, using what it just observed. Thoughts can split a goal into parts, pull out key facts, apply common sense, notice a failed search and try another, or decide that the answer is found.

The model is not trained for this. It is a frozen PaLM with 540 billion parameters, given a few worked examples in its prompt (few-shot prompting). People wrote these examples by typing their own thoughts next to the actions they took. For question answering, the model gets a deliberately simple Wikipedia tool with three actions: search, lookup (find the next sentence containing a word on the current page) and finish.

For reasoning tasks, thoughts and actions alternate. For long tasks in an environment, thoughts appear only where they are useful, and the model decides where.

The authors also combine ReAct with self-consistency (CoT-SC: sample many chains of thought and take the majority answer). Either ReAct runs first and falls back to CoT-SC if it finds no answer, or CoT-SC runs first and falls back to ReAct if the samples do not agree.

The notation. At step t, an agent sees an observation o_t and chooses an action a_t from a set A, based on the context c_t = (o_1, a_1, ..., o_(t-1), a_(t-1), o_t). ReAct enlarges the set of actions to  = A ∪ L, where L is the space of language. An action from L is a thought: it adds to the context, c_(t+1) = (c_t, â_t), but the environment does not respond.

What it showed

Reported in the paper. It was published at ICLR 2023, a peer-reviewed conference. Most results use PaLM-540B with only a few examples in the prompt.

Limits, and what came later

The limits come from the paper:

Later work built on it. Reflexion added verbal self-reflection to ReAct agents. SWE-agent built on the reason-and-act pattern for software engineering tasks.

What to know first

How to read it

The main text is 10 pages. The appendix holds the full prompts and many example runs.

  1. Read section 1 with Figure 1. The figure compares the four prompting styles on one question, which is the clearest way into the idea.
  2. Read section 2 for the method.
  3. Read section 3.3 with Tables 1 and 2.
  4. Read section 4 for the household and shopping tasks, with Tables 3 and 4.
  5. Look at one full prompt in Appendix C.1, to see what the model is actually given.

Expect about 1.5 hours for the parts above (an estimate).

In brief, from the research data

Before it

Reasoning and tool use were separate lines: chain-of-thought thought, WebGPT acted.

The problem

Pure reasoning hallucinates facts; pure acting has no plan.

What it introduced

Interleave them in one loop: a thought, an action, an observation, repeat.

Why it matters

This loop is the skeleton of essentially every agent framework that followed.

What modern models inherit

The thought-action-observation cycle at the heart of agents.

What came next

Reflexion added memory, Toolformer learned the calls, and coding agents industrialised it.

To understand it

Learn

  • The thought, action, observation loop
  • Tool calls as model output
  • Why grounding reduces hallucination

Helpful first

Chain-of-thought prompting.

Before and after

The milestones it descends from, and the milestones that descend from it. Work developed alongside it is not counted. Weak links are left out unless you include them.

Before: where it came from

ReAct has 23 documented ancestors across 8 chapters, reaching back to Recurrent networks in 1990. Showing its direct parents and the 11 turning points among them.

ReAct has 23 documented ancestors across 8 chapters, reaching back to Recurrent networks in 1990. Showing all of them.

ReAct has 32 recorded ancestors, including indirect ones, across 8 chapters, reaching back to Recurrent networks in 1990. Showing its direct parents and the 11 turning points among them.

ReAct has 32 recorded ancestors, including indirect ones, across 8 chapters, reaching back to Recurrent networks in 1990. Showing all of them.

  1. 2022ReActThis milestone.
  2. 2022Chain of thought Turning pointReAct built directly on thisChapter 12. Thinking longer
  3. 2021WebGPTReAct was influenced by thisChapter 13. Models that act
  4. 2020RLHF for summarisation Turning pointWebGPT built directly on thisChapter 6. Teaching models what people want
  5. 2020GPT-3 Turning pointWebGPT built directly on this
    Chain of thought was influenced by this
    Chapter 5. Scale becomes a science
  6. 2020Scaling laws Turning pointGPT-3 was influenced by thisChapter 5. Scale becomes a science
  7. 2019RLHF for LMsRLHF for summarisation built directly on thisChapter 6. Teaching models what people want
  8. 2019Sparse Transformer Turning pointGPT-3 built directly on thisChapter 4. Pretrain once, use everywhere
  9. 2019GPT-2 Turning pointGPT-3 built directly on thisChapter 4. Pretrain once, use everywhere
  10. 2019WebTextGPT-2 was influenced by thisChapter 4. Pretrain once, use everywhere
  11. 2018GPT-1GPT-2 built directly on thisChapter 4. Pretrain once, use everywhere
  12. 2017RLHF originRLHF for summarisation built directly on thisChapter 6. Teaching models what people want
  13. 2017Transformer Turning pointGPT-2 built directly on this
    Sparse Transformer built directly on this
    Scaling laws built directly on this
    Chapter 3. Attention, then only attention
  14. 2016Layer normGPT-2 built directly on thisChapter 3. Attention, then only attention
  15. 2015Residual connectionsTransformer was influenced by thisChapter 3. Attention, then only attention
  16. 2015LM pretraining Turning pointGPT-1 was influenced by thisChapter 2. Words become vectors
  17. 2015BPE tokenizationGPT-2 built directly on thisChapter 2. Words become vectors
  18. 2015Luong attentionTransformer was influenced by thisChapter 3. Attention, then only attention
  19. 2014AdamTransformer was influenced by thisChapter 2. Words become vectors
  20. 2014Seq2seq Turning pointTransformer built directly on thisChapter 2. Words become vectors
  21. 2014Attention Turning pointTransformer built directly on thisChapter 3. Attention, then only attention
  22. 2014GRU / encoder-decoderAttention built directly on thisChapter 2. Words become vectors
  23. 1997LSTM Turning pointSeq2seq built directly on thisChapter 1. Language as probability
  24. 1990Recurrent networksLSTM was influenced by thisChapter 1. Language as probability
  1. 2022ReActThis milestone.
  2. 2022Chain of thought Turning pointReAct built directly on thisChapter 12. Thinking longer
  3. 2021WebGPTReAct was influenced by thisChapter 13. Models that act
  4. 2020RLHF for summarisation Turning pointWebGPT built directly on thisChapter 6. Teaching models what people want
  5. 2020GPT-3 Turning pointWebGPT built directly on this
    Chain of thought was influenced by this
    Chapter 5. Scale becomes a science
  6. 2020Scaling laws Turning pointGPT-3 was influenced by thisChapter 5. Scale becomes a science
  7. 2019RLHF for LMsRLHF for summarisation built directly on thisChapter 6. Teaching models what people want
  8. 2019Sparse Transformer Turning pointGPT-3 built directly on thisChapter 4. Pretrain once, use everywhere
  9. 2019GPT-2 Turning pointGPT-3 built directly on thisChapter 4. Pretrain once, use everywhere
  10. 2019WebTextGPT-2 was influenced by thisChapter 4. Pretrain once, use everywhere
  11. 2019Transformer-XLSparse Transformer was influenced by this (indirect influence)Chapter 4. Pretrain once, use everywhere
  12. 2018GPT-1GPT-2 built directly on thisChapter 4. Pretrain once, use everywhere
  13. 2018ELMoGPT-1 was influenced by this (indirect influence)Chapter 4. Pretrain once, use everywhere
  14. 2018ULMFiTGPT-1 was influenced by this (indirect influence)Chapter 4. Pretrain once, use everywhere
  15. 2017CoVeELMo was influenced by thisChapter 3. Attention, then only attention
  16. 2017RLHF originRLHF for summarisation built directly on thisChapter 6. Teaching models what people want
  17. 2017Transformer Turning pointGPT-2 built directly on this
    Sparse Transformer built directly on this
    Scaling laws built directly on this
    Chapter 3. Attention, then only attention
  18. 2017ConvS2STransformer was influenced by this (indirect influence)Chapter 3. Attention, then only attention
  19. 2016Layer normGPT-2 built directly on thisChapter 3. Attention, then only attention
  20. 2015Residual connectionsTransformer was influenced by thisChapter 3. Attention, then only attention
  21. 2015LM pretraining Turning pointGPT-1 was influenced by thisChapter 2. Words become vectors
  22. 2015BPE tokenizationGPT-2 built directly on thisChapter 2. Words become vectors
  23. 2015Luong attentionTransformer was influenced by thisChapter 3. Attention, then only attention
  24. 2014AdamTransformer was influenced by thisChapter 2. Words become vectors
  25. 2014GloVeELMo built directly on thisChapter 2. Words become vectors
  26. 2014Seq2seq Turning pointTransformer built directly on thisChapter 2. Words become vectors
  27. 2014Attention Turning pointTransformer built directly on thisChapter 3. Attention, then only attention
  28. 2014GRU / encoder-decoderAttention built directly on thisChapter 2. Words become vectors
  29. 2013word2vecELMo was influenced by thisChapter 2. Words become vectors
  30. 2011NLP from scratchELMo was influenced by thisChapter 1. Language as probability
  31. 2003Neural LMNLP from scratch was influenced by this
    word2vec was influenced by this
    Chapter 1. Language as probability
  32. 1997LSTM Turning pointSeq2seq built directly on this
    ELMo built directly on this
    Chapter 1. Language as probability
  33. 1990Recurrent networksLSTM was influenced by thisChapter 1. Language as probability

After: what it led to

ReAct has 2 documented descendants across 1 chapter, reaching forward to SWE-agent in 2024. Showing all of them.

ReAct has 2 documented descendants across 1 chapter, reaching forward to SWE-agent in 2024. Showing all of them.

ReAct has 27 recorded descendants, including indirect ones, across 4 chapters, reaching forward to GPT-5.6 Sol in 2026. Showing its direct descendants.

ReAct has 27 recorded descendants, including indirect ones, across 4 chapters, reaching forward to GPT-5.6 Sol in 2026. Showing all of them.

  1. 2022ReActThis milestone.
  2. 2023Reflexionbuilt directly on ReActChapter 13. Models that act
  3. 2024SWE-agentwas influenced by ReActChapter 13. Models that act
  1. 2022ReActThis milestone.
  2. 2023Reflexionbuilt directly on ReActChapter 13. Models that act
  3. 2023AutoGPTwas influenced by ReAct (indirect influence)Chapter 13. Models that act
  4. 2023Function callingwas influenced by ReAct (indirect influence)Chapter 13. Models that act
  5. 2024Devinwas influenced by ReAct (indirect influence)Chapter 13. Models that act
  6. 2024SWE-agentwas influenced by ReActChapter 13. Models that act
  7. 2024Computer usewas influenced by Function calling (indirect influence)Chapter 13. Models that act
  8. 2024MCPwas influenced by ReAct (indirect influence)Chapter 13. Models that act
  9. 2024Gemini 2.0was influenced by Computer use (indirect influence)Chapter 14. Where the threads meet now
  10. 2025Deep researchwas influenced by o3 releasedChapter 13. Models that act
  11. 2025Claude Codewas influenced by SWE-agent (indirect influence)
    was influenced by MCP
    Chapter 13. Models that act
  12. 2025Gemini 2.5built directly on Gemini 2.0Chapter 12. Thinking longer
  13. 2025o3 releasedwas influenced by Function callingChapter 12. Thinking longer
  14. 2025IMO goldbuilt directly on Gemini 2.5Chapter 12. Thinking longer
  15. 2025gpt-ossbuilt directly on o3 releasedChapter 8. The weights get out
  16. 2025GPT-5built directly on o3 releasedChapter 14. Where the threads meet now
  17. 2025IMO-ProofBenchwas influenced by IMO goldChapter 12. Thinking longer
  18. 2025GPT-5.1built directly on GPT-5Chapter 14. Where the threads meet now
  19. 2025Gemini 3built directly on Gemini 2.5Chapter 14. Where the threads meet now
  20. 2025GPT-5.2built directly on GPT-5.1Chapter 14. Where the threads meet now
  21. 2026GPT-5.3-Codexwas influenced by Computer use (indirect influence)Chapter 13. Models that act
  22. 2026Gemini 3 Deep Thinkbuilt directly on Gemini 3
    was influenced by IMO gold
    Chapter 12. Thinking longer
  23. 2026Gemini 3.1built directly on Gemini 3Chapter 14. Where the threads meet now
  24. 2026GPT-5.4built directly on GPT-5.3-CodexChapter 14. Where the threads meet now
  25. 2026Project Glasswingwas influenced by Computer use (indirect influence)Chapter 14. Where the threads meet now
  26. 2026GPT-5.5built directly on GPT-5.4Chapter 14. Where the threads meet now
  27. 2026Fable 5 / Mythos 5was influenced by Project GlasswingChapter 14. Where the threads meet now
  28. 2026GPT-5.6 Solbuilt directly on GPT-5.5Chapter 14. Where the threads meet now

Direct links and their sources

Where it came from

Built directly on

Influenced by

What it led to

Built on directly by

Influenced

Terms