A large language model can write fluent answers, but it only knows what it saw in training. Ask it about something recent or obscure and it may make up an answer that sounds right. Two ideas had grown up to help. One is chain-of-thought prompting, where the model reasons step by step. The other is letting the model act, by calling tools such as a search engine.
Until this 2022 paper, the paper says, those abilities had been studied mostly as separate topics. The authors ask: what if the model does both, in turns? ReAct, short for reason plus act, has the model write a short thought, take an action, read the result, and think again. It is the pattern behind many of today's tool-using AI agents.
ReAct prompts a language model to alternate between thoughts and actions. Thoughts help it plan, track progress and handle surprises. Actions, such as searching Wikipedia, bring in real facts. Together they reduce made-up answers and make the model's steps easy for a person to read and check.
Thinking and doing, in turns
The paper describes an agent in a loop. At each step it sees an observation from its environment and takes an action. ReAct adds one idea: the set of things the model can do now includes writing a thought, a bit of language that does not change the world, but updates the model's own context. A thought can break a goal into steps, note what has been found so far, or decide what to do about a surprise.
In the question answering tests, the authors gave the model a tiny set of actions through a Wikipedia API. search[entity] returns the first five sentences of a page. lookup[string] returns the next sentence on the page that contains the string, like pressing Ctrl+F. finish[answer] ends the task.
