ReAct.

A prompting pattern that alternates between reasoning steps and tool-use actions, enabling models to think through problems, take actions, observe results, and iterate.

ReAct (Reasoning and Acting) is a prompting framework that structures AI model interactions by interleaving reasoning steps with action-taking capabilities. Unlike traditional approaches where models either reason abstractly or execute tools separately, ReAct creates a cyclical pattern where models explicitly think through problems, decide on actions, execute those actions through available tools, observe the results, and then reason about what to do next. This approach bridges the gap between pure reasoning and practical problem-solving, making AI systems more capable of handling complex, multi-step tasks that require both analytical thinking and real-world interaction.

The ReAct pattern typically follows a structured format where each cycle contains three distinct phases: Think (reasoning about the current state and what action to take), Act (executing a specific tool or function), and Observe (processing the results of the action). The model explicitly verbalizes its reasoning process, making decisions transparent and allowing for course correction when actions don't produce expected results. This differs from chain-of-thought prompting, which focuses primarily on reasoning, and from simple tool-use patterns that lack explicit reasoning steps. The interleaving nature allows models to adapt their approach based on intermediate results rather than committing to a predetermined sequence of actions.

ReAct has proven particularly effective for tasks requiring research, data analysis, coding with debugging, and complex problem-solving where the solution path isn't immediately clear. The explicit reasoning steps make the model's decision-making process interpretable and debuggable, while the action-observation loop enables recovery from errors and adaptation to unexpected results. However, ReAct can be more token-intensive than simpler approaches due to the verbose reasoning steps, and it requires careful prompt design to prevent the model from getting stuck in unproductive loops. The pattern works best when combined with well-designed tools and clear guidelines about when to stop the reasoning-action cycle.