ReAct Pattern: Interleaving Reasoning and Action for LLM Agents › ReAct Pattern
Language AI HandbookAll chapters ReAct Pattern: Interleaving Reasoning and Action for LLM Agents › ReAct PatternOne section · Sections in this chapter1 / 14 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Large language models generate coherent text, analyze complex ideas, and synthesize information from their training data. However, they face a basic constraint: they cannot reliably access external information, verify facts against current data sources, or interact with computational tools beyond their static parameter knowledge. In the previous chapter, we explored Function Calling, which provides models with the syntactic structures necessary to invoke external tools and APIs. While this capability represents a significant advancement, knowing how to call a function differs fundamentally from knowing when to invoke it, which specific function to choose among alternatives, and what to do with the results once they arrive.
Consider the contrast between knowing a hammer exists and knowing how to build a house. Function calling gives the model a hammer. ReAct teaches it to build. The difference lies not in the tool itself, but in the reasoning that governs when and how to swing it. A model that knows how to call a web search API still needs to decide what to search for, interpret the result it receives, recognize when the result answers a sub-question, and determine what to search next. Each of those decisions requires the model to maintain a mental model of where it stands in the problem-solving process and what still needs to be resolved.
ReAct, which stands for Reasoning + Acting, bridges this necessary gap by interleaving chain-of-thought reasoning with tool execution in a tight, iterative loop. Instead of generating a complete, monolithic plan upfront or making blind, uncontextualized tool calls, the model thinks step-by-step, acts on those thoughts, observes the results of those actions, and adapts its next thought based on the new information received. This creates a dynamic, interactive problem-solving process that closely mirrors how humans approach complex tasks in the real world: we think, act, observe the consequences, and reconsider our approach based on what we learn.
The ReAct pattern turns a static language model into an interactive agent able to multi-step reasoning, dynamic information gathering, and sophisticated error recovery. It shifts from simple prompt-response interactions to persistent, stateful computation where the model maintains working memory of its reasoning trajectory. This allows it to solve problems beyond the complexity of single-turn queries.
This design emerged from a well-observed limitation in pure Chain-of-Thought prompting (covered in Part XXX, Chapter 3), where models reason beautifully over problems they already know the answer to but hallucinate fluently when they lack the necessary knowledge. ReAct solves this by making knowledge retrieval an explicit, auditable step rather than an implicit, invisible one. The model can no longer silently confabulate: it must fetch the information it claims to need.