REACT: SYNERGIZING REASONING AND ACTING IN LANGUAGE MODELS (2023)
July 11, 2025ReAct (Synergizing Reasoning + Acting) is a prompting strategy that enables large language models (LLMs) to generate reasoning traces and actions in an interleaved manner, allowing them to more effectively combine thought and actions. ReAct provides LLMs with reasoning traces that guide their actions. Additionally, it allows models to incorporate external knowledge obtained through actions into their reasoning process.
The paper evaluates ReAct on two types of tasks: knowledge-intensive reasoning and decision-making. HotpotQA, a knowledge-intensive task, requires reasoning over multiple Wikipedia passages. For example, one question in the dataset asks: “How many rooms are in the hotel that is home to the Cirque de Soleil show Mystere?”
To solve the task, an LLM can perform three types of actions:
search[entity]
: Retrieves the first five sentences from the corresponding Wikipedia page if it exists; otherwise, it returns the top five similar entities.lookup[string]
: Retrieves the next sentence on the page that contains the specified string.finish[answer]
: Provides the final answer to the question.
The published experiment report presents the prompt used for the HotpotQA task:
Solve a question answering task with interleaving Thought, Action, Observation steps. Thought can reason about the current situation, and Action can be three types:
(1) Search[entity], which searches the exact entity on Wikipedia and returns the first paragraph if it exists. If not, it will return some similar entities to search.
(2) Lookup[keyword], which returns the next sentence containing keyword in the current passage.
(3) Finish[answer], which returns the answer and finishes the task.
Here are some examples.