← Papers
5 min read

ReAct, in five pictures

The 2022 paper that let a model think, use a tool, read the result and think again, shown as five short animations.

PapersAgents
Watch it in about a minute

In 2022, seven researchers at Princeton and Google let a model do two things in turns: reason in words, and act by using a tool. The name ReAct is short for “reason + act”. It is the basic loop behind AI agents.

1. Thinking alone guesses. Acting alone wanders. Do both.

Question: which was completed first, the Eiffel Tower or the Statue of Liberty?
Think + act
  1. ThoughtI need the completion year of each. Start with the Eiffel Tower.
  2. Actionsearch[Eiffel Tower]
  3. ResultThe Eiffel Tower ... was completed in 1889.
  4. ThoughtEiffel Tower: 1889. Now the Statue of Liberty.
  5. Actionsearch[Statue of Liberty]
  6. ResultThe Statue of Liberty ... was dedicated in 1886.
  7. Thought1886 is before 1889, so the Statue of Liberty came first.
  8. Actionfinish[Statue of Liberty]
Think only
  1. ThoughtThe Eiffel Tower was built for a world fair, I believe in 1879. The Statue of Liberty was dedicated in 1886.
  2. AnswerThe Eiffel Tower.
Act only
  1. Actionsearch[Eiffel Tower]
  2. ResultThe Eiffel Tower ... was completed in 1889.
  3. Actionsearch[Paris]
  4. ResultParis is the capital of France ...
  5. Actionfinish[1889]
Thinking alone can state a wrong date with confidence. Acting alone loses track of the question. Together, each thought decides the next search, and each result corrects the next thought. Made-up example to show the idea.

2. The tools were deliberately simple

The three actions the model could take on Wikipedia
  • search[topic]Returns the first 5 sentences of that page
  • lookup[text]Finds the next sentence containing it, like Ctrl+F
  • finish[answer]Stops and gives the answer

The model was never retrained. It saw a handful of worked examples in the prompt and copied the pattern.

3. Fewer made-up facts

Share of wrong answers caused by a made-up fact
  • Thinking only 56%
  • Think + act 0%
From 200 answers the authors checked by hand. ReAct had its own weak spot: 23% of its failures came from a search that returned nothing useful.

4. On question answering, the best result came from combining both

Multi-step questions answered exactly right
  • Plain prompt 28.7
  • Acting only 25.7
  • Think + act (ReAct) 27.4
  • Thinking only, most common answer of 21 tries 33.4
  • ReAct, falling back to thinking 35.1
ReAct alone did not win here. Letting the model switch between looking things up and trusting what it knows did.

5. Where it clearly won: getting things done

Household tasks completed in a text game
  • System trained on 100,000 examples per task type 37%
  • Acting only 45%
  • Think + act (ReAct) 71%
Best run for each. ReAct learned from just a few examples in the prompt.

Why it matters today

The loop every agent runs
  1. 01Think
  2. 02Use a tool
  3. 03Read the result
  4. 04Repeat

Replace the Wikipedia search with any tool, such as a calendar, a database or a code runner, and you have a modern AI agent. MCP is a standard way to plug those tools in.

Where you see it today

Agent toolkits ship this loop ready-made. LangGraph, a popular one, has offered a function called create_react_agent, named after this paper.

The details, if you want them

Who wrote it, and where to read it

ReAct: Synergizing Reasoning and Acting in Language Models by Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan and Yuan Cao, from Princeton University and Google Research. First posted on 6 October 2022 and published at the ICLR 2023 conference.

The problem, in the paper’s words
  • Reasoning and acting “have primarily been studied as separate topics”.
  • Reasoning alone (see the Chain-of-Thought paper) is “a static black box”: the model uses only what is already inside it, which can lead to made-up facts and errors that carry forward.
  • Acting alone lacks any plan or working memory to guide what to do next.
How it works
  • The model writes a thought, then an action, then reads an observation (the result), and repeats.
  • A thought changes nothing in the outside world. It only helps the model plan, keep track and adjust.
  • The main tests used Google’s PaLM model with 540 billion parameters, without retraining it.
All the results
  • Checking claims as true or false: ReAct scored 60.9% against 56.3% for thinking only. The best combination reached 64.6%.
  • Multi-step questions: as in picture 4. Systems trained specially for the task were still far ahead, at 67.5%.
  • Household tasks: 71% for the best ReAct run and 57% on average, against 45% for acting only.
  • Online shopping tasks: ReAct succeeded 40.0% of the time, against 30.1% for acting only and 29.1% for a trained system. People succeeded 59.6% of the time.
  • Human help: when a person corrected just a couple of the model’s thoughts mid-task, a failing run succeeded.
The limits the authors list
  • Complex tasks with many possible actions need more examples than fit in a prompt.
  • The model sometimes gets stuck repeating the same thoughts and actions.
  • An unhelpful search result can derail the reasoning.
Words the paper uses
  • Agent: a model that takes actions, not just writes text.
  • Action space: the list of things the agent is allowed to do.
  • Observation: what comes back after an action.
  • Grounded: based on something outside the model, such as a search result.

Next paper: Constitutional AI