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.
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.
- ThoughtI need the completion year of each. Start with the Eiffel Tower.
- Actionsearch[Eiffel Tower]
- ResultThe Eiffel Tower ... was completed in 1889.
- ThoughtEiffel Tower: 1889. Now the Statue of Liberty.
- Actionsearch[Statue of Liberty]
- ResultThe Statue of Liberty ... was dedicated in 1886.
- Thought1886 is before 1889, so the Statue of Liberty came first.
- Actionfinish[Statue of Liberty]
- ThoughtThe Eiffel Tower was built for a world fair, I believe in 1879. The Statue of Liberty was dedicated in 1886.
- AnswerThe Eiffel Tower.
- Actionsearch[Eiffel Tower]
- ResultThe Eiffel Tower ... was completed in 1889.
- Actionsearch[Paris]
- ResultParis is the capital of France ...
- Actionfinish[1889]
2. The tools were deliberately simple
- 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
4. On question answering, the best result came from combining both
5. Where it clearly won: getting things done
Why it matters today
- 01Think
- 02Use a tool
- 03Read the result
- 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.
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