ReAct: The Innovation Transforming AI Agent Control
Le brief IA que les pros lisent chaque soir
Les 7 actus IA du jour, décryptées en 5 min. Gratuit.
Inclus dès l'inscription : notre sélection des meilleurs guides & comparatifs IA.
Choisis ton rythme
Gratuit · Pas de spam · Désabonnement en 1 clic
When Rigid Plans Are No Longer Enough
In the development of artificial intelligence systems, traditional models relied on predefined structures, where each step of the process was planned in advance. However, some complex problems cannot be fully anticipated. For example, to answer a question like "What is the current price of Tesla stock, and is it a good time to buy based on recent trends?", an agent must not only obtain the current price but also analyze recent performance and decide if additional information is needed. This type of task cannot be accomplished in a single step, as each decision depends on the results of the previous step. In these situations, a system must be capable of reasoning and acting iteratively, adapting to new information as it arrives. This is where the ReAct model comes into play.
Introduction to the ReAct Model
ReAct, which stands for Reasoning + Action, is an innovative control model where reasoning and tool usage are integrated into a single continuous loop. Unlike approaches such as Reflection or Reflexion, ReAct does not separate thinking and execution into distinct phases. There is no initial complete project, nor a dedicated research phase after a critique. Instead, the system progresses step by step, integrating reasoning and action into a fluid process. The main loop of ReAct unfolds as follows:
- Thinking: The model evaluates the current state and decides on the next action to take.
- Action: If additional information or calculations are needed, the model calls upon a tool, such as a web search or a database query.
- Observation: The result of this call is integrated into the current state, and the model reasons again using this updated context.
The cycle continues until the model is able to provide a complete answer without requiring further tool calls. This method differs from revision-based approaches, where a response is first completed before being improved. In ReAct, the response is built progressively, with each reasoning step influenced by the latest observation.
The Control Structure of ReAct
ReAct does not merely combine a language model with tools. The key idea lies in how the loop is organized. In previous models, pipelines followed a fixed path, with clearly defined steps. Reflection added an internal revision loop, while Reflexion introduced a separate research step. ReAct, on the other hand, eliminates these fixed phases. Reasoning and tool usage occur within the same loop, without a predefined execution path. Each cycle of ReAct involves:
- The model reasoning about the current state.
- Deciding whether to call a tool for additional information.
- The tool returning a result, which is integrated into the current state.
- The model reasoning again using the updated information.
This structure allows the plan to evolve as execution progresses, with a state that constantly changes as new observations are added. Tool calls are used to fill information gaps, and the loop stops when the model produces an answer without requesting another tool.
Comparison with Reflexion
Although both ReAct and Reflexion utilize tools, their approaches fundamentally differ. Reflexion follows a sequential process with distinct phases, such as drafting a response, critiquing the draft, searching for additional information, and revising using the obtained results. In Reflexion, the search occurs after the critique, and tool calls are generally made in a dedicated research step. The workflow looks like this: Draft → Research → Revision. In contrast, ReAct integrates these steps into a single loop, allowing for a progressively constructed response as the model interacts with the tools, without a clear separation between the phases of reasoning and execution.
Brief IA — L'actualité IA en français
L'essentiel de l'actualité de l'intelligence artificielle, décrypté et expliqué chaque jour.