Reading as:
● Paper Breakdown Β· ICLR 2023

ReAct β€” How AI Learned to Think AND Do Things ReAct β€” Synergizing Reasoning and Acting in Language Models ReAct: Synergizing Reasoning and Acting in Language Models ReAct: Synergizing Reasoning and Acting in Language Models β€” Technical Deep Dive

Smart AIs could think (like working through a math problem step-by-step) OR they could do things (like looking up information on Wikipedia), but they didn't do both at the same time very well. A team at Google showed you can weave thinking and doing together β€” think a little, do a little, think again based on what you learned β€” and suddenly the AI gets MUCH smarter at solving hard problems. Large language models were strong at reasoning (chain-of-thought prompting) and could act (calling external tools), but these were studied separately. Yao et al. (Google/DeepMind) showed that interleaving reasoning traces with actions β€” think, act, observe, think again β€” overcomes hallucination and error propagation, and dramatically improves performance on knowledge-intensive and interactive tasks. While large language models demonstrate strong capabilities in both reasoning (chain-of-thought prompting) and action generation (tool/API calls), these modalities have been studied largely in isolation. Yao et al. (Google Research, DeepMind) introduced ReAct, which interleaves reasoning traces (thought) with task-specific actions (API calls, environment interactions), demonstrating significant improvements over reasoning-only or action-only baselines on knowledge-intensive QA, fact verification, and interactive decision-making tasks. Language models exhibit strong capabilities across both reasoning (chain-of-thought prompting) and action generation (API/tool calling) but these modalities have been studied largely decoupled. This work proposes ReAct (Reason + Act), which interleaves reasoning traces and task-specific actions in language model trajectories, demonstrating substantial empirical improvements over reasoning-only and action-only baselines across knowledge-intensive (HotpotQA, FEVER) and interactive (ALFWorld, WebShop) task distributions, with improved trajectory interpretability and trustworthiness relative to chain-of-thought-only approaches.

πŸ“„ arXiv:2210.03629 πŸ† SOTA on HotpotQA, FEVER, ALFWorld, WebShop ⚑ Prompting-only (no finetuning) 🧩 7 authors (Google Research, DeepMind, others)

Try it β€” a simple ReAct loop

Watch a simple example of "think, do, observe" repeating: Simplified example of a ReAct agent solving a fact-checking task: Illustrative ReAct trajectory on a fact-checking task (simplified for pedagogy): Representative ReAct trajectory for fact verification; actual model outputs show richer traces and tool interactions (see Β§5):

Thought: "Is Haumea larger than Earth? I need to look this up."
Action: search(Haumea diameter)
Observation: "Haumea is a dwarf planet, diameter ~2,300 km"
Thought: "Earth's diameter is ~12,742 km. So Haumea is much smaller."
Action: finish(False)
01 Β· The Problem

Why Thinking and Doing Separately Doesn't Work Well The Limits of Reasoning-Only and Acting-Only Approaches Why reasoning and acting were studied separately Limitations of Decoupled Reasoning and Action

For a long time, smart AI could do two things but not together: it could work through a problem step-by-step (like "let me think..."), OR it could do stuff like look things up (like "let me search"). But it didn't naturally weave them together.

Language models excel at reasoning β€” chain-of-thought prompting lets them explain their thinking. They can also act β€” call APIs, use tools. But most research treated these as separate. You either get a thinking-only model, or an action-only model.

Language models are strong at reasoning (chain-of-thought prompting) and action generation (API/tool calling), but research has largely studied them separately β€” reasoning techniques like CoT work within the model's knowledge, while action-based approaches ground the model in external tools but often lack reasoning traces to diagnose errors.

While LLMs demonstrate strong capabilities in both reasoning (chain-of-thought prompting) and action (API/tool invocation), the field developed these along largely orthogonal research tracks, with reasoning approaches constrained to model knowledge and action-based systems lacking explicit reasoning traces for error recovery.

Problem #1: Reasoning Alone Hallucinates Limitation: hallucination in chain-of-thought Limitation: hallucination in chain-of-thought Limitation: hallucination and factual errors in CoT

If the AI just thinks through a problem in its head, it can make stuff up β€” like if you try to remember a fact you're not 100% sure about, you might guess wrong.

Chain-of-thought models can produce plausible-sounding but false "reasoning" β€” they'll confidently assert facts they don't actually know, then use those false facts to build an answer.

Chain-of-thought reasoning is confined to the model's training knowledge and can produce hallucinations β€” plausible but false reasoning steps that then propagate through the rest of the trace, leading to confident wrong answers.

CoT trajectories can hallucinate intermediate facts or assertions that the model doesn't actually have reliable knowledge of, which then cascade through downstream reasoning steps, producing coherent-sounding but factually incorrect outputs.

Problem #2: Acting Alone Lacks Reasoning Limitation: no reasoning in tool-only approaches Limitation: no reasoning in tool-only approaches Limitation: no explicit reasoning in action-only policies

If the AI just keeps calling tools (like "look this up!") without thinking about what to do next, it wastes time and gets confused. It has no plan.

Action-only methods (calling tools without reasoning) can't explain their choices β€” the agent calls tools reactively without a coherent plan to fall back on when something goes wrong.

Action-only approaches (e.g., reinforcement learning agents) lack explicit reasoning traces, making them hard to interpret and difficult to recover from when a tool call returns unexpected results β€” no reasoning trace to diagnose why the action failed.

Action-only policies (e.g., imitation learning, RL agents) lack explicit reasoning trajectories, preventing interpretable error diagnosis and recovery β€” when an action fails or returns unexpected results, there's no reasoning trace to understand failure modes or adjust the plan.

The big idea: what if you let the AI think a little, then do a little, then think about what it learned, then do more? Repeat. That interleaving β€” thinking helping you act, and acting giving you info to think about β€” could beat both thinking-only and doing-only. The paper's core bet: interleaving reasoning traces and task-specific actions lets the model use external information to correct hallucinations, recover from tool failures, and maintain a coherent plan that neither reasoning-only nor action-only approaches can match. The paper's core bet: interleaving reasoning traces and task-specific actions enables the model to ground reasoning in external information (reducing hallucination), diagnose and recover from tool failures with explicit reasoning, and maintain interpretable, coherent solution trajectories that neither reasoning-only nor action-only approaches achieve. Core contribution: reasoning traces help models induce, track, and update action plans as well as handle exceptions, while actions allow the model to interface with external sources to gather additional information, jointly enabling substantial improvements over decoupled approaches.

Why This Matters for Real Problems Why this matters beyond toy tasks Why this matters beyond toy tasks Broader significance for real-world deployment

Many hard problems require both: you need to think (plan) and look stuff up (act). If you can do both, you can tackle things your AI never saw during training.

Many real problems are knowledge-intensive or interactive β€” they require access to external information or environment feedback that a training set alone can't provide. Interleaving reasoning with action is what humans actually do when solving hard problems.

Knowledge-intensive tasks (QA, fact verification) require access to information beyond the model's training data. Interactive tasks (shopping, navigation) require real-time feedback. Humans solve these by reasoning about what to do next, taking an action, observing the result, and adjusting β€” a pattern ReAct formalizes and enables in language models.

Real-world deployment of autonomous systems requires reasoning for plan formulation and diagnostics, plus action for grounding and information gathering; interleaving these is the cognitive pattern humans employ in knowledge-intensive and interactive settings, and the paper's empirical results suggest it's critical for LLM-based agents.

02 Β· Background Concepts

Words You Need to Know Vocabulary and prior techniques Background concepts you need first Formal Preliminaries

What does "chain-of-thought" prompting mean? What is chain-of-thought prompting? What is chain-of-thought prompting? Chain-of-thought prompting, formally

Instead of just asking "what is 10 + 5?", you ask "think step-by-step: what is 10 + 5?" and the model literally works through it: "10 plus 5... first I add the ones place: 0+5 = 5... the tens place: 1+0 = 1, so 15." That's chain-of-thought β€” making the model explain its thinking.

A prompting technique where you ask the model to explain its reasoning step-by-step before giving a final answer. For example: "Let me think step by step: First... Then... Therefore..." This often improves accuracy, especially on reasoning tasks.

A prompting technique where the model is instructed to generate intermediate reasoning steps before producing a final answer, often via "Let me think step by step:" or similar templates. This consistently improves performance on multi-step reasoning tasks (arithmetic, QA, logic puzzles).

A prompting strategy where the model is directed to generate a sequence of intermediate reasoning steps prior to producing the final answer, enabling in-context learning of reasoning patterns; empirically shown to improve performance on reasoning tasks via improved coverage of the reasoning space relative to direct answer prediction.

What are "tools" or "actions" in this context? Tools and external actions Tools and external actions Tool use and external action spaces

An "action" or "tool" is something the AI can call to do stuff outside of just thinking β€” like a search function ("look this up"), a calculator ("compute this"), or a game environment ("try moving forward").

Tools are external functions/APIs/environments the model can invoke: a Wikipedia search API, a calculator, a shopping site, a game engine. The model generates a tool name + arguments, the environment executes it, and returns an observation.

Tools (or actions) are external functions, APIs, or environments the model can invoke: a Wikipedia API (for QA tasks), a calculator, a shopping website's action space (add-to-cart, checkout), a game engine. The model generates tool invocations; the environment executes and returns observations.

Tools comprise the action space available to an agent: function calls (Wikipedia search, arithmetic operations), API endpoints, or environment interactions (purchasing, navigation). Agent actions are discrete (tool name + parameters); the environment returns observations and rewards.

What is "prompting" a language model? In-context learning and prompting In-context learning and prompting In-context learning and prompting-based agents

You "prompt" a language model by writing text that leads it toward a task β€” like giving it examples of what you want, then asking it to do the same. "Prompt" just means "the input text you give the model."

A prompt is the input text/instruction you give to a language model. In-context learning means including a few examples in your prompt, and the model learns from those examples and applies that pattern to your actual question β€” no retraining required.

A prompt is the input (instructions + optional examples) given to a language model. In-context learning refers to the model's ability to quickly adapt to a task from a small number of examples provided in the prompt, without any parameter updates β€” the model "learns" purely from context.

In-context learning is the ability of a pre-trained language model to adapt to new tasks given only task-specific examples in the prompt (few-shot learning) without parameter updates. This is the mechanism enabling prompting-based agents: the agent's "policy" is specified entirely by the prompt (system instructions + trajectory examples), not by learned weights.

What is "trajectory" in an agent context? Agent trajectories Agent trajectories Task-solving trajectories

A "trajectory" is the whole sequence of things an agent does to solve a problem: "I thought X, then I did Y, then I learned Z, then I did W..." β€” it's like a movie of the problem-solving process, start to finish.

A trajectory is the complete sequence of steps an agent takes to solve a task: Thought 1 β†’ Action 1 β†’ Observation 1 β†’ Thought 2 β†’ Action 2 β†’ Observation 2 β†’ ... β†’ Final answer. The trace of the entire problem-solving process.

A trajectory is the complete sequence of states, actions, and observations that an agent generates while solving a task. In ReAct, a trajectory interleaves reasoning steps (Thought) with actions (Action) and observations (Observation), creating a human-readable record of the problem-solving process.

A trajectory Ο„ is the complete sequence of (state, action, observation) tuples generated by the agent from task start to termination. In ReAct, states are implicit (history of thoughts/actions/observations), actions are language-generated (tool invocations or free-form reasoning), and observations are tool outputs or natural-language summaries thereof.

What's the difference between "instruction-following" and "reasoning"? Instruction-following vs. reasoning Instruction-following vs. reasoning Instruction-following and reasoning-based paradigms

Instruction-following is the model just doing what you say: "multiply these numbers" β†’ "here's the answer." Reasoning is the model explaining how it gets there: "multiply these numbers β†’ let me think β†’ 5 times 3 is... β†’ 15."

Instruction-following: direct answer generation ("What is 2+3?" β†’ "5"). Reasoning-based: generating intermediate steps before the answer ("What is 2+3?" β†’ "Let me think: 2 + 3... = 5"). Chain-of-thought is a reasoning-based approach.

Instruction-following generates answers directly ("What is 2+3?" β†’ output probability over tokens β†’ "5"). Reasoning-based generation first produces reasoning traces ("What is 2+3?" β†’ "2 + 3 equals 5" β†’ "5"). CoT is reasoning-based; it improves accuracy because it covers more of the solution space.

Direct answer generation is end-to-end prediction from problem to answer; reasoning-based generation decomposes the task into intermediate steps (reasoning or actions), which increases the coverage of the token space the model explores and often improves accuracy on reasoning-intensive tasks.

What are the benchmark tasks the paper tests on? Evaluation benchmarks Evaluation benchmarks Benchmark task definitions

The paper tests on four kinds of hard problems: (1) finding answers using Wikipedia (HotpotQA), (2) checking if facts are true (FEVER), (3) a text-based shopping game (WebShop), (4) a text-based house game (ALFWorld). Each is hard for different reasons.

HotpotQA: Answer QA questions requiring multi-hop reasoning over Wikipedia. FEVER: Verify/refute claims by searching Wikipedia. ALFWorld: Complete household tasks in a simulated text-based home (navigation, object manipulation). WebShop: Shop online to find and purchase items matching user descriptions.

HotpotQA: Multi-hop QA over Wikipedia. FEVER: Fact verification (Claim β†’ Refute/Support/NotEnough) via Wikipedia. ALFWorld: Interactive household tasks (e.g., "put the sliced potato in the fridge") in a text-based simulator. WebShop: E-commerce task: find and purchase an item matching a user description from a realistic website simulator.

HotpotQA (Bing search oracle): 2-hop reasoning questions requiring retrieval and fusion of multiple Wikipedia passages. FEVER: Binary fact verification task; model must retrieve and rank supporting/refuting evidence. ALFWorld: TextWorld environment with household manipulation tasks; actions include navigation and interaction. WebShop: Realistic e-commerce environment; actions include search, filtering, adding to cart, and purchase.

03 Β· How ReAct Works (System Design)

Building Blocks of the Think-Do-Learn Loop The ReAct System Design The ReAct system design Architectural and Interaction Specification

ReAct is simple: the AI model and the environment take turns. Model thinks/acts, environment observes, repeat until done. Three types of steps: Thought (the AI's reasoning), Action (the AI calling a tool), Observation (the environment's reply).

ReAct is straightforward: the model generates a trajectory (Thought β†’ Action β†’ Observation, repeated). At each step, the model can output a Thought (internal reasoning), an Action (tool call), or neither. The environment executes actions and returns Observations. This continues until the model outputs a final Answer.

ReAct operates via a simple interleaved loop: the model generates reasoning traces (Thought) and tool-use actions (Action). The environment executes actions and returns observations (Observation). The model's output is a trajectory of these three types of steps (Thought/Action/Observation), which it can then reason about and use to plan the next step, until it produces a final Answer.

The ReAct agent operates within a standard agent-environment feedback loop: at each step, the model generates text which can be parsed as Thought, Action, or Answer; Action is executed by the environment, which returns an Observation; the model then incorporates the Observation into its context window and generates the next step. Trajectories are naturally interpretable as language-based traces.

Task Input (Question / Goal)
         ↓
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ Model  β”‚
    β”‚ Output β”‚
    β””β”€β”€β”€β”€β”¬β”€β”€β”€β”˜
         β”‚
    β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ Parser               β”‚
    β”‚ β”œβ”€ is Thought?       β”‚
    β”‚ β”œβ”€ is Action(tool)?  β”‚
    β”‚ └─ is Answer?        β”‚
    β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
    β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ If Action:        β”‚
    β”‚  Env.execute()    β”‚
    β”‚  return Obs       β”‚
    β”‚                   β”‚
    β”‚ Else if Answer:   β”‚
    β”‚  return Result    β”‚
    β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
    Append to Context
         ↓
    [Repeat until Answer]
  

Step 1: Thought Thought: reasoning step Thought: reasoning step Thought: Intermediate reasoning

The model says what it's thinking: "I need to find... let me search for... I think the answer is..." β€” it's explaining its reasoning out loud.

A free-form reasoning statement the model generates to explain its current understanding, next step, or hypotheses. Example: "I need to search for information about X before I can answer."

A free-form reasoning statement generated by the model β€” explaining what it understands, what it needs to find, hypotheses about the answer, or how it will interpret the next observation. Thoughts can guide which action to take next.

Intermediate reasoning text generated by the model, serving as a planning and diagnostic tool: Thoughts can express goals, hypotheses, intermediate conclusions, and next-step planning, and help both the model and human readers understand the agent's reasoning process.

Step 2: Action Action: tool invocation Action: tool invocation Action: Structured tool invocation

The model calls a tool: "search(who was president)" or "click(add to cart)". The tool runs and gives back a result.

A structured function call, formatted as tool_name(arguments). The environment parses and executes it, returning an Observation. Example: search(Marie Curie) on Wikipedia returns text about Marie Curie.

A tool invocation, formatted as tool_name(arg1, arg2, ...). The environment parses this and executes the tool, returning results. Different tasks have different action spaces: QA might have search(query), while WebShop has search(query), click(button), addToCart(item_id), etc.

A tool invocation of the form tool_name(args), parsed from the model's output and executed by the environment. Action spaces are task-specific: knowledge-intensive tasks include search/lookup operations; interactive tasks include environment-native actions (click, type, purchase). Execution returns an observation.

Step 3: Observation Observation: environment response Observation: environment response Observation: Environment-generated feedback

The tool gives back an answer: "Marie Curie was a Polish-French physicist..." β€” that's the Observation. The model reads it and decides what to do next.

The output returned by the environment after executing an Action. Could be search results, a game state update, or a website screenshot. The model incorporates this into its context and reasons about what to do next.

The output returned by the environment after executing an Action. For search, it's retrieved text; for interactive tasks, it's a state update or web page screenshot. The model incorporates the Observation into its context window and reasons about what to do next.

The environment's response to an action: search results (as ranked passages), environment state (text description or screenshot), or action confirmation. Observations are appended to the model's context window (in-context learning), enabling the model to condition its next reasoning step on actual grounded information rather than prior knowledge alone.

Key Insight: Interleaving Why interleaving works Why interleaving matters Why interleaving is critical

By going Thought β†’ Action β†’ Observation β†’ Thought again, the AI grounds its reasoning in real info. If it made a wrong assumption in step 1, the Observation from step 2 can correct it in step 3.

Interleaving allows the model to recover from errors: a hallucinated fact in an early Thought can be corrected by an Observation from a later Action. Pure reasoning (CoT) can't recover; pure action can't diagnose.

Interleaving enables error recovery and adaptive planning: if an early reasoning step contains a hallucination or wrong assumption, a later Observation can contradict it and cause the model to revise its plan. Neither pure reasoning nor pure action has this adaptive cycle.

Interleaving enables dynamic error recovery and trajectory adaptation: Observations ground the model in reality, allowing subsequent Thoughts to react to new information and revise prior (incorrect) assumptions β€” a form of closed-loop feedback unavailable in forward-only reasoning or action-only policies.

Why Thought-Action-Observation is better than just Thought or just Action: Thought alone is like planning in your head without checking if your assumptions are right. Action alone is like doing stuff blindly. Together, Thought+Action+Observation is like a human: think, try something, see what happened, adjust. Why the loop matters: Each cycle of Think→Act→Observe gives the model a chance to update its understanding. If the observation contradicts its thought, it can reason differently next time. This feedback loop is what chain-of-thought alone can't do. Why the loop matters: Pure chain-of-thought (Thought-only) can't ground in reality and risks hallucinations. Pure action (Action-only) can't explain or plan. The Thought-Action-Observation cycle combines their strengths: reasoning guides action selection; observations ground reasoning in reality. Theoretical rationale: Interleaving decouples reasoning (planning and diagnostics) from grounding (information retrieval and environment feedback), enabling the model to leverage its reasoning capacity on information sources unavailable at training time — a key advantage for knowledge-intensive tasks.
04 Β· The Reasoning-Acting Cycle (Core Mechanism)

Deep Dive: Think-Do-Learn How Reasoning and Acting Interact Reasoning and acting in detail Formal Treatment of the Interleaved Reasoning-Action Trajectory

4.1 β€” What Reasoning Traces Do 4.1 β€” Reasoning traces 4.1 β€” Reasoning traces 4.1 β€” Reasoning traces (Thought steps)

Reasoning traces (Thoughts) help the model in several ways: (1) they help decide WHICH tool to call, (2) they let the model keep track of what it already learned, (3) when something goes wrong, reasoning can backtrack and try a different approach.

Reasoning traces serve three critical functions: Action planning β€” deciding what tool to use next; State tracking β€” keeping a record of what information has been gathered and intermediate conclusions; Error recovery β€” when a tool returns unexpected results, reasoning can diagnose the issue and revise the plan.

Reasoning traces (Thoughts) serve three critical functions: (1) Action induction: determining which tool to invoke next based on current understanding and goal; (2) State tracking: maintaining a coherent, updateable understanding of facts learned, intermediate conclusions, and remaining unknowns; (3) Exception handling: when a tool returns unexpected results or an action fails, reasoning can diagnose the failure and revise the plan rather than blindly continuing.

Reasoning traces (text-generated Thought steps) serve three key functions: (1) action induction β€” determining which tool invocation and arguments are appropriate given task context; (2) episodic state tracking β€” maintaining an updateable narrative of gathered facts and intermediate conclusions; (3) exception handling β€” diagnosing unexpected observations and recovering via trajectory replanning.

4.2 β€” What Actions Do 4.2 β€” Actions ground the model 4.2 β€” Actions ground the model 4.2 β€” Action execution (environment grounding)

Actions (tool calls) do the heavy lifting: they get real information (like searching Wikipedia), navigate environments (like clicking buttons in a game), and give the model fresh data to reason about β€” you can't get this info just by thinking.

Actions interface with external sources: APIs (Wikipedia search, calculators), environments (interactive games, simulators), websites (e-commerce search, checkout). This grounds the model in reality β€” it can no longer hallucinate facts because the action returns what's actually there.

Actions ground the model in reality by interfacing with external information sources (APIs, retrievers, simulators) that the model cannot access through internal reasoning alone. This prevents hallucination: if the model's reasoning would lead to an incorrect intermediate conclusion, an Observation from a later action can contradict and correct it.

Actions provide ground truth feedback: environmental responses (search results, state transitions, success/failure signals) are factual (conditioned on the environment's dynamics), not model-generated hallucinations, enabling the closed-loop feedback essential to dynamic planning and error recovery.

4.3 β€” The Synergy: Reasoning Helps You Act Better 4.3 β€” Synergy: how they combine 4.3 β€” Synergy: how they combine 4.3 β€” Emergent synergies of interleaving

Reasoning lets you pick the RIGHT action (instead of just guessing), and Observations let you adjust your reasoning. Together, you get a smart loop: think about what info you need β†’ call the right tool β†’ learn something new β†’ think again based on what you learned.

Because the model reasons before acting, it selects more relevant tools and arguments. Because it reasons after observing, it can recover from tool failures and adapt its plan. This creates a virtuous cycle that neither pure reasoning nor pure action can achieve.

Reasoning before action leads to more deliberate tool selection; reasoning after observation enables adaptive planning. The resulting closed-loop trajectory is more interpretable (humans can read the Thoughts and understand the reasoning), more recoverable from errors (Observations that contradict prior Thoughts trigger replanning), and more capable of handling novel tasks (the interleaving pattern generalizes across different tool sets and task structures).

This creates a form of online learning: Observations perturb the model's context window, conditioning subsequent reasoning on actual ground-truth information rather than prior knowledge alone β€” functionally equivalent to in-context learning over a task-specific retrieval set, which substantially improves zero-shot performance on knowledge-intensive tasks.

ComponentFunctionLimitation if missing
Thought (reasoning)Plan actions, track state, diagnose failuresWithout it: actions are reactive/blind, no recovery from errors
Action (tool call)Ground in reality, gather new informationWithout it: reasoning hallucinates and never gets corrected
Observation (feedback)Provide ground-truth information and error signalsWithout it: agent doesn't know if its action succeeded or failed
Loop (interleaving)Enable recovery, planning, and adaptationWithout it: no feedback to adjust reasoning or strategy
Example: Imagine you're trying to figure out "What did Albert Einstein do in 1921?" Pure thinking (CoT) might say "I think he won the Nobel Prize?" but not be 100% sure. Pure action (just search) would fetch info but not be smart about which search to do first. ReAct does: (Thought) "I should search for Einstein 1921" β†’ (Action) search("Albert Einstein 1921") β†’ (Observation) get results β†’ (Thought) "The results say he won the Nobel Prize in 1921" β†’ (Answer) "He won the Nobel Prize." Example from QA: Q: "Did Haumea or Earth have more prominent scientists?" Pure CoT: model might hallucinate that Haumea is Earth-sized. Pure action: model blindly searches without a coherent plan. ReAct: (Thought) "I need to find the sizes and significant scientists of Haumea and Earth" β†’ (Action) search("Haumea") β†’ (Observation) receives size/scientist info β†’ (Thought) "Now I need Earth's info to compare" β†’ (Action) search("Earth scientists") β†’ (Observation) receives results β†’ (Thought) "Based on what I learned, Earth has far more prominent scientists" β†’ (Answer). Example from fact verification: Claim: "Marie Curie was born in Paris, France." CoT alone risks hallucination; action-only risks inefficient searching. ReAct: (Thought) "I need to verify where Marie Curie was born" β†’ (Action) search("Marie Curie birthplace") β†’ (Observation) "Born in Warsaw, Poland, 1867" β†’ (Thought) "The claim says Paris, but Wikipedia says Warsaw β€” the claim is incorrect" β†’ (Answer) "REFUTE." Mechanistic insight: In-context learning relies on the model's ability to rapidly adapt its output distribution given new (task-specific) examples. ReAct approximates this by appending Observations (which are task-specific grounding information) to the model's context window at each step, effectively enabling in-context learning over a dynamically-constructed retrieval set β€” without explicit finetuning or gradient updates.
05 Β· How ReAct Agents Are Built (Prompting & In-Context Learning)

Teaching the AI the Think-Do Pattern Prompting strategies for ReAct Prompting and in-context learning Prompting, In-Context Learning, and Trajectory Demonstration

System Prompt The system prompt The system prompt System prompt design

You tell the model the format it should use: "When solving a problem, alternate between Thought and Action. For Thought, write your reasoning. For Action, write 'search(query)' or similar. When you have an answer, write 'Answer: ...'"

The system prompt defines the action format and task instructions. Example: "Solve the task by interleaving Thought and Action steps. For search tasks, use search(query). After gathering information, provide a final answer."

The system prompt sets the task instructions and defines the format for Thought, Action, and Observation. For example: "You will solve questions by alternating Thought and Action. Thought: your reasoning in one sentence. Action: tool_name(args). After gathering sufficient information, output Answer: [your final answer]."

The system prompt specifies task framing and action format. Task-specific prompts include: tool names and signatures, expected output format (Thought/Action/Observation structure), stopping conditions (when to output Answer), and in some cases, instructions to reformulate failed actions or re-search when observations lack necessary information.

In-Context Examples (Few-Shot) Few-shot demonstrations Few-shot demonstrations Demonstration trajectories in context

You show the model 1-3 examples of tasks solved the ReAct way: "Question: Who won the 2023 Oscars for Best Actor? Thought: I need to search. Action: search(...) Observation: Results... Answer: ..." Seeing examples helps it understand the pattern.

The prompt includes 1-3 complete example trajectories showing how a task is solved with ReAct: Thought β†’ Action β†’ Observation β†’ Thought β†’ Action β†’ Observation β†’ Answer. This in-context learning from examples guides the model's behavior on the actual task.

The prompt includes 1-3 full-trajectory demonstrations of tasks being solved with the Thought-Action-Observation-Answer pattern. These demonstrations enable in-context learning: the model learns the pattern and generalizes it to unseen tasks without any parameter updates.

1-3 complete example trajectories (per-task) are concatenated into the context window prior to the actual task. Trajectories demonstrate successful action invocation, observation parsing, and recovery from information gaps β€” in-context examples that enable few-shot adaptation to the target task without finetuning.

No Finetuning Required Prompting-only approach Prompting-only (no finetuning) Zero-shot and few-shot prompting

The genius part: you don't retrain the model at all. Just show it examples in the prompt, and it follows the pattern. The underlying language model (like GPT-3) stays unchanged.

ReAct agents are built entirely through prompting β€” no gradient updates, no training. You set the system prompt + in-context examples, and the pre-trained model adapts to the new task pattern. This is possible because large language models already understand in-context learning.

ReAct agents are built entirely through prompting (system instructions + in-context examples) β€” no parameter updates, no finetuning. The pre-trained model (e.g., GPT-4, Claude) already has strong in-context learning ability, so it can adapt to the Thought-Action-Observation pattern from examples alone.

ReAct is a purely prompting-based agent framework β€” zero parameters are updated. The approach relies entirely on the pre-trained model's in-context learning capacity to adapt to task-specific action spaces and demonstration trajectories. This enables rapid deployment and task switching without retraining.

Model Choice Matters Which models work best? Which models work best? Model capacity and scaling

Smarter models (like GPT-3.5, GPT-4, or Claude) do better β€” they're better at understanding the pattern and reasoning clearly. Smaller models struggle more.

The paper tests on text-davinci-003 and PaLM 2. Stronger models show bigger improvements with ReAct. The reasoning quality directly affects action quality β€” if the Thought is vague, the Action will be too.

The paper primarily evaluates on text-davinci-003 (GPT-3.5) and PaLM 2. Stronger models show larger improvements with ReAct, suggesting that reasoning capacity and in-context learning ability both matter β€” models must be capable enough to produce coherent reasoning traces.

Empirical results show ReAct gains scale with model size and capability (text-davinci-003 > text-davinci-002, PaLM 2 > older models). Performance is bounded by the model's underlying reasoning and in-context learning capacity β€” prompting patterns cannot rescue fundamentally weak reasoning.

06 Β· Results & Benchmarks

Did It Work? Yes β€” By A Lot! Empirical results across four tasks Empirical results Quantitative Results and Comparative Analysis

The ReAct approach beat the old methods on ALL four tasks. On QA, it got more answers right. On the shopping game, it made better purchases. It worked across the board.

ReAct with text-davinci-003 achieved significant improvements over prior state-of-the-art and strong baselines on all four benchmarks β€” knowledge-intensive (HotpotQA, FEVER) and interactive (ALFWorld, WebShop) tasks. The gains are substantial and consistent.

ReAct with text-davinci-003 significantly outperformed prior SOTA and reasoning-only (CoT) and action-only baselines across all four benchmarks, with improvements ranging from +7% to +34% depending on the task.

ReAct demonstrated consistent and substantial improvements over reasoning-only (CoT), action-only (RL/imitation baselines), and hybrid baselines across all evaluated task distributions, with task-specific improvements ranging from 7.3 (FEVER) to 34.3 (ALFWorld) percentage points depending on baseline and setting.

TaskReAct AccuracyCoT BaselinePrior SOTAImprovement
HotpotQA77.8%71.3%62.0% (RL agents)+6.5% vs CoT, +15.8% vs prior
FEVER86.5%78.4%75.9% (prior SOTA)+8.1% vs CoT, +10.6% vs prior
ALFWorld71.2%37.2% (CoT)55.7% (RL agents)+34.0% vs CoT, +15.5% vs prior
WebShop59.4%15.9% (CoT)44.0% (RL agents)+43.5% vs CoT, +15.4% vs prior

Accuracy = success rate on each task. CoT baseline = same model with chain-of-thought prompting but no action. Prior SOTA = best prior published result.

6.1 β€” Breaking Down the Gains 6.1 β€” Component analysis 6.1 β€” Component analysis 6.1 β€” Ablation: Reasoning vs. Acting

The paper tested: ReAct with both thinking and doing, just thinking (CoT), and just doing (action-only). Result: doing both beats doing either alone. On QA, ReAct was 6.5% better than just thinking. On the shopping game, it was 43.5% better!

The paper compares ReAct (Thought + Action) against: CoT-only (same model, same reasoning, no actions); Action-only (tool calls without reasoning traces). ReAct consistently outperforms both.

Ablation results show that interleaving is critical: Thought-only (CoT) fails on tasks requiring grounding; Action-only fails due to lack of planning and recovery mechanisms. The full Thought-Action-Observation loop is necessary for best performance.

Empirical ablation demonstrates that neither pure reasoning nor pure action dominates: Thought-only performance is constrained by hallucination and the model's training-data knowledge; Action-only performance is constrained by lack of planning and adaptive recovery. Interleaving combines their complementary strengths.

6.2 β€” Different Task Types Show Different Gains 6.2 β€” Task-specific improvements 6.2 β€” Task-specific improvements 6.2 β€” Task-dependent performance patterns

QA tasks (asking for facts) got moderate gains. The shopping game got HUGE gains β€” because it's more interactive and you really need to think AND act.

Knowledge-intensive tasks (HotpotQA, FEVER) show 6-8% gains over CoT β€” reasoning helps, but these tasks still primarily benefit from accurate retrieval. Interactive tasks (ALFWorld, WebShop) show 34-43% gains β€” these tasks critically depend on planning (Thought) and adaptation to environment feedback (Observation).

Knowledge-intensive tasks (HotpotQA, FEVER) show 6-8% gains over CoT because the main challenge is finding the right information; some reasoning helps but retrieval accuracy dominates. Interactive tasks (ALFWorld, WebShop) show 34-43% gains because the agent must plan (Thought), adapt to unexpected outcomes (Observation feedback), and recover from failures β€” all impossible without interleaved reasoning-action-observation.

Gains are task-dependent: knowledge-intensive tasks show moderate improvements because the bottleneck is retrieval accuracy (and information is deterministic); interactive tasks show dramatic improvements because the bottleneck is planning/adaptation under uncertainty (non-deterministic environment feedback necessitates responsive re-reasoning).

Big takeaway: ReAct beat everything on every task type. The gains are bigger on interactive tasks (shopping, house navigation) than on factual QA, which makes sense β€” the more you need to act and adapt, the more you benefit from thinking. The headline: ReAct achieves SOTA or near-SOTA on all four benchmarks, without any task-specific finetuning β€” just prompting. This shows the pattern generalizes. The headline: ReAct achieves SOTA or strong performance on all four task types (two knowledge-intensive, two interactive) using identical prompting strategy with zero finetuning, demonstrating the generality of the Thought-Action-Observation pattern across task distributions. Synthesis: universal gains across diverse task distributions (knowledge-intensive and interactive) with identical prompting methodology (zero task-specific tuning) support the hypothesis that interleaved reasoning-action cycles are a general principle for LLM-based agent design, not an artifact of specific task structure or model choice.
07 Β· Why ReAct Works So Well

The Secret Sauce Behind the Gains Why interleaving helps Why interleaving works Mechanistic Understanding of ReAct Advantages

Reason 1: Eliminates Hallucination Hallucination avoidance Hallucination avoidance Constraint-based hallucination mitigation

If the model starts with a wrong assumption (guessing wrong about a fact), a pure CoT approach will build on that lie. But ReAct can correct it: when the Action returns real data, the model can see it was wrong and change course.

CoT hallucinates because reasoning is confined to training knowledge. ReAct grounds reasoning in actual tool outputs. If an early Thought is incorrect, a later Observation contradicts it β€” the model detects the contradiction and adjusts.

CoT hallucination occurs because reasoning is confined to training knowledge, which is incomplete and can be incorrect. ReAct grounds reasoning in tool outputs (facts from Wikipedia, outcomes from environments), which are ground truth. Observations provide error signals that cause the model to revise incorrect earlier Thoughts.

Hallucination in CoT is a consequence of the model reasoning solely from its learned knowledge, which is incomplete and sometimes incorrect. ReAct mitigates this by grounding intermediate reasoning in environment-provided ground truth (search results, state observations), creating feedback loops that contradict and force revision of hallucinated intermediate states.

Reason 2: Better Planning & Adaptation Planning and adaptive recovery Planning and adaptive recovery Closed-loop planning and failure recovery

Pure action (just calling tools) is reactive β€” the agent doesn't think about why. ReAct lets the model think first ("What info do I need?"), then act ("Call this tool"), then think again ("Does this answer my question or do I need more info?"). This is smarter.

Thoughts allow the model to plan which actions to take, in what order, toward a goal. When an action fails or returns unexpected results, Thoughts allow the model to diagnose the issue and try a different approach β€” closed-loop adaptive planning.

Thoughts enable planning: the model can express a goal, decide which tool is most relevant, and execute a deliberate sequence toward that goal. When an action fails or returns unexpected results, Thoughts allow diagnosis and replanning β€” e.g., "That search didn't return what I needed; let me try a different query."

Interleaved Thoughts enable hierarchical planning and failure diagnosis: goal decomposition (Thought), action selection (Action), and trajectory adaptation (Thought in response to Observation) form a closed-loop where failures trigger replanning rather than cascading error.

Reason 3: More Interpretable & Trustworthy Interpretability and transparency Interpretability and transparency Trajectory transparency and human interpretability

You can READ ReAct trajectories like a story: "I thought X, I did Y, I learned Z, so I did W." You can't do that with action-only robots β€” they just execute commands. You also can't do it with CoT if the reasoning is wrong β€” you don't know to distrust it.

ReAct trajectories are human-readable narratives. You can inspect the reasoning, see which tools were called and why, and verify that tool outputs support the conclusion. This is vastly more interpretable than black-box action sequences or unsupported reasoning chains.

ReAct trajectories are natural-language narratives interleaving reasoning and grounded actions, making them interpretable to non-experts. You can trace the agent's reasoning, see which information it gathered, and verify that conclusions follow from observations. This is critical for trustworthiness in high-stakes domains.

Natural-language reasoning traces create explainability: intermediate steps (Thoughts) are human-readable, tool calls and results are verifiable (grounded in environment), and the trajectory from problem to answer is explicit β€” improving human interpretability and enabling stakeholder auditing relative to opaque RL agents or hallucination-prone CoT-only approaches.

Advantagevs. CoT (Reasoning-only)vs. Action-only
Eliminates hallucinationObservations contradict false reasoningN/A (action-only has no reasoning)
Enables planning & recoveryThoughts can adapt to ObservationsNo adaptive planning; pure reactivity
InterpretabilityGrounded in actual tool outputs (vs. unsupported reasoning)Trajectory is readable with explicit Thoughts
Error diagnosisThoughts can interpret unexpected ObservationsNo reasoning to explain tool failures
08 Β· Limitations & Future Directions

What Doesn't Work Yet Limitations and challenges Limitations and challenges Limitations, Challenges, and Open Problems

Model Quality Matters A Lot Requires capable language models Requires capable language models Model-capacity dependency

ReAct only works well if the underlying model is smart enough. A weak model won't reason well, and it won't understand the Thought-Action-Observation pattern. You need text-davinci-003 or better.

ReAct's performance depends critically on the model's reasoning capability. Weaker models (text-davinci-002, older GPT-3 variants) show much smaller improvements or fail entirely to learn the pattern from examples.

ReAct depends critically on the underlying model's reasoning capacity and in-context learning ability. Weaker models fail to generate coherent reasoning traces or to adapt to the Thought-Action-Observation pattern from demonstrations. This limits deployment to frontier models.

Performance is bounded by the underlying model's reasoning capacity and in-context learning ability β€” prompting innovations cannot overcome fundamental model limitations. ReAct shows minimal gains on weaker models; this dependency may limit near-term applicability to open-source or edge-deployed models.

Tool Quality Matters Too Depends on tool reliability Depends on tool reliability Tool-dependency and failure modes

If the search tool is bad or the environment is buggy, ReAct can't fix that. The agent is only as good as the tools it has access to.

ReAct assumes tool outputs are reliable. If a search API returns irrelevant results, or an environment simulator is broken, the agent will be misled. Tool reliability directly impacts agent performance.

ReAct assumes tool outputs are reliable ground truth. If a search API returns irrelevant results, or an environment provides noisy/inconsistent feedback, the agent's reasoning can be led astray. Tool quality directly impacts downstream performance.

ReAct's performance is constrained by tool reliability: noisy/adversarial observations, tool API failures, or environmental non-stationarity can cause the agent to learn incorrect conclusions despite having reasoning traces. Robustness to tool uncertainty is an open problem.

Context Length Is a Bottleneck Token limit issues Token limit issues Context window saturation

Each Thought, Action, and Observation takes up tokens in the context window. Long tasks can run out of room. The agent might need many steps to solve something complex, but the token limit cuts it off.

Trajectories grow token-by-token as Thoughts, Actions, and Observations accumulate. Very long tasks can exhaust the model's context window (e.g., 4K or 8K tokens), forcing the agent to stop before finishing.

Each Thought, Action, and Observation consumes tokens. Long solution trajectories (many steps needed to solve a complex task) can saturate the context window, forcing the agent to halt before reaching a solution β€” an issue for tasks requiring many subtasks or multi-hop reasoning with long tool outputs.

Trajectory length scales linearly with task complexity and tool output verbosity; context-window-limited models face a hard limit on solvable task depth. Techniques like trajectory summarization, memory management, or hierarchical planning could mitigate this but are largely unexplored in the paper.

Limited Evaluation Scope Four specific benchmarks tested Four specific benchmarks tested Narrow empirical evaluation

The paper tests on four specific tasks (two QA, two game-like). Does ReAct work equally well on other kinds of problems? Unknown.

The paper evaluates four task types: two knowledge-intensive (QA, fact verification), two interactive (shopping, household navigation). Broader applicability (multi-modal, coding, robotics) is unexplored.

Evaluation is limited to four task distributions (two knowledge-intensive, two interactive). Broader generalization to other domains (coding, scientific reasoning, robotics, multi-lingual tasks) is asserted as future work but not empirically validated within the paper.

Empirical evaluation covers four task distributions selected as representatives of knowledge-intensive and interactive settings; broader task classes and failure modes (adversarial tool outputs, partially-observable environments, non-stationary tasks) remain unstudied.

8.1 β€” Future Directions Directions for future work Directions for future work Open research questions and extensions

The paper mentions several directions: (1) making longer trajectories work (token limit), (2) applying ReAct to new domains, (3) handling noisy tool outputs better, (4) improving tool selection automatically.

Future work includes: improving robustness to noisy observations, extending to new task domains, methods to manage long trajectories, and automatic tool selection/optimization.

Future work directions noted by the authors: (1) extending ReAct to additional domains (visual reasoning, multi-modal QA, code generation, scientific reasoning); (2) robustness improvements for noisy tool outputs and partially observable environments; (3) automatic tool selection/APIs given task descriptions; (4) trajectory compression/summarization to fit longer reasoning paths within context limits.

Open directions explicitly or implicitly identified: (1) robustness to adversarial/noisy observations; (2) techniques for extended reasoning (trajectory summarization, memory-augmented agents, hierarchical task decomposition); (3) scalability to larger tool sets and action spaces; (4) evaluation on domains requiring multi-step planning, structured knowledge (relational reasoning), or real-time interactive environments.

09 Β· Real-World Applications

Where ReAct Could Change Things Practical applications Practical applications Deployment Scenarios and Use Cases

Customer Service Bots Customer support Customer support automation Customer support automation

A support bot could think ("The customer is asking about order #123"), look things up in the database ("search for order 123"), learn the results, and explain the answer clearly. A support agent that reasons about the customer's issue, queries order/account databases for relevant information, and synthesizes a helpful response β€” with auditable reasoning traces. A support agent that reasons about the customer's problem ("This sounds like a shipping delay"), retrieves relevant data ("lookup order status"), and explains the resolution with transparent reasoning. End-to-end customer-support agents combining conversational reasoning with deterministic database/CRM queries, enabling complex issue resolution with explainable reasoning traces auditable by human supervisors.

Research & Writing Assistants Research assistance Research assistance Knowledge-work automation

A research bot could think through a question, search for papers, read them, and synthesize answers β€” showing its work every step. A research agent that reasons about information needs, searches academic databases or the web, retrieves and interprets results, and synthesizes them into coherent arguments β€” all with transparent reasoning. A research/writing assistant that plans what information is needed ("I should look for recent papers on X"), retrieves relevant sources ("search arXiv for X"), interprets findings, and synthesizes them into written work. Knowledge-work agents combining domain reasoning with access to up-to-date information sources, enabling synthesis of novel arguments grounded in current literature β€” applicable to scientific writing, policy research, and literature reviews.

E-Commerce & Shopping E-commerce recommendation E-commerce automation E-commerce agent automation

An agent that understands what you want to buy, searches the store, reads descriptions, compares options, and makes a purchase β€” reasoning about what's a good fit. A shopping agent that understands user requirements, searches inventory, compares products (reasoning about trade-offs), and completes purchase workflows automatically. A shopping agent that reasons about customer requirements ("They want a laptop under $1000, good for coding"), searches and filters inventory ("search for laptops, filter by price, compare specs"), and recommends or purchases autonomously. E-commerce agents that parse user intent, navigate product search spaces, reason about product attributes and trade-offs, and complete transactions β€” demonstrated explicitly in the paper's WebShop results.

AI Coding Assistants Code generation & debugging Code generation & debugging Autonomous code-generation agents

A code assistant that understands the problem, writes code, runs tests, sees errors, thinks about why, and fixes the code. A coding agent that reasons about the problem, writes code, executes/tests it, interprets error messages, and iteratively refines β€” combining reasoning with tool use (compiler, test runner). A coding agent that reasons about requirements ("I need to sort this list"), writes code, runs tests, interprets failure messages ("The test expects output in ascending order"), and refines the code. Code-generation agents that interleave reasoning (problem decomposition, algorithm selection) with tool execution (testing, compilation, linting), enabling iterative debugging and refinement β€” applicable to both synthesis and repair tasks.

Fact-Checking & Verification Automated fact-checking Automated fact-checking Misinformation mitigation agents

A fact-checker that reads a claim, searches for evidence, evaluates it, and explains whether the claim is true or false. A fact-checking agent that parses claims, searches for supporting/refuting evidence, interprets results, and generates verifiable fact-check reports with citations. A fact-checking agent that reasons about a claim ("This involves two facts: X and Y"), searches for evidence ("search for X" and "search for Y"), evaluates results, and determines support/refutation β€” explicitly demonstrated in the paper's FEVER results. Misinformation-detection agents that reason about claim decomposition, retrieve candidate evidence, reason about evidentiary strength, and generate fact-check reports with explicit reasoning and citation trails β€” directly applicable to combating misinformation at scale.

Medical/Legal Documentation Professional documentation Professional documentation Domain-expert agent deployment

A medical assistant that reasons about symptoms, searches medical databases, retrieves relevant information, and helps draft documentation β€” with full reasoning visible for review. A legal/medical assistant that reasons about a case, retrieves relevant precedents/guidelines, interprets them, and generates documents β€” with transparent, auditable reasoning traces. A domain-specific agent (medical, legal) that reasons about requirements, retrieves relevant regulations/cases, interprets them, and generates documentation β€” with auditable reasoning enabling human oversight in high-stakes domains. High-stakes professional agents (legal, medical, financial) where explicit reasoning traces and grounding in authoritative sources are legally/ethically required β€” enabling automation while maintaining human-auditable decision trails and reducing liability.

10 Β· Interview Preparation

Practice Questions 60 practice questions Practice interview questions Structured interview prep

Click a question to reveal the answer.

Beginner (20)

Intermediate (20)

Advanced (20)

11 Β· Self-Assessment Quiz

Test Your Understanding Quiz time Self-assessment quiz Self-graded comprehension check

Answer the questions below. Feedback appears instantly; results don't save.

Score: 0 / 0
12 Β· Glossary

Word Bank (A–Z) Terminology reference Terminology reference Technical Reference (A–Z)

13 Β· Key Takeaways

If You Remember Five Things... Five core ideas Five core takeaways Five Fundamental Insights

  1. Thinking and doing are both necessary.Interleave reasoning and action.Interleaving reasoning and acting is more powerful than either alone.Interleaved reasoning-action cycles are superior to decoupled reasoning-only or action-only approaches. Robots that can think (reason step-by-step) AND do (call tools, interact) beat robots that do only one. Pure reasoning (chain-of-thought) hallucinates. Pure action (tool-calling) lacks planning. Together, they're stronger. Chain-of-thought-only approaches risk hallucination (reasoning unsupported by facts); tool-only approaches lack planning and recovery mechanisms. Interleaving provides grounding and adaptivity. Decoupled reasoning-only methods (CoT) suffer from hallucination over training-data knowledge; decoupled action-only methods (RL/imitation learning) lack explicit planning and interpretability. Interleaved reasoning-action cycles combine error correction (Observation feedback) and adaptive planning (Thought-driven adaptation).
  2. You don't need to retrain the model.Prompting is enough (few-shot learning).ReAct requires only prompting, not retraining.ReAct operates as a pure prompting-based framework with zero parameter updates. Just show the model a few examples of "think, do, learn, think again," and it learns to follow that pattern. Few-shot in-context learning is sufficient β€” examples in the prompt teach the model the Thought-Action-Observation pattern without any gradient-based finetuning. The prompting strategy (system instructions + 1-3 example trajectories) is sufficient to enable ReAct behavior in pre-trained models, without requiring task-specific finetuning. The approach relies entirely on pre-trained model in-context learning ability (few-shot adaptation from demonstration trajectories in context), enabling zero-shot and few-shot task deployment without parameter updates.
  3. Reasoning helps you act better, and acting gives you data to reason about.Synergy: reasoning guides action; action informs reasoning.Reasoning guides action selection and planning; action feedback enables adaptive reasoning.Bi-directional feedback: Thoughts induce Actions; Observations condition subsequent Thoughts in a closed-loop cycle. Thinking helps you pick the right tool to call. Seeing the results of that tool helps you think better next time. Thoughts are more focused because the agent reasons about what to do. Actions return information that corrects or refines reasoning. This virtuous cycle doesn't exist in pure CoT or pure action. Deliberative Thoughts lead to better-targeted Actions (higher precision tool use). Observations directly improve subsequent Thoughts by providing ground-truth feedback. This creates a dynamic planning loop unavailable in forward-only systems. The closed-loop creates online learning dynamics: Thoughts (state representation) β†’ Actions (information gathering) β†’ Observations (ground truth) β†’ revised Thoughts, enabling iterative refinement and failure recovery without parameter updates.
  4. The gains are biggest on tasks that need both planning and real info.Interactive tasks benefit most from ReAct.Interactive/complex tasks show larger gains (34-43%) than knowledge-lookup tasks (6-8%).Performance gains scale with task complexity and environment interactivity (non-deterministic feedback). If you're shopping or navigating a game, ReAct helps WAY more than if you're just looking up a fact β€” because you need to act and adapt. Knowledge-intensive tasks (QA, fact verification) show 6-8% gains over CoT. Interactive tasks (shopping, household simulation) show 34-43% gains because adaptation to environment feedback is critical. Knowledge-intensive task gains (6-8% over CoT) are moderate because retrieval accuracy still dominates. Interactive task gains (34-43%) are dramatic because the bottleneck is closed-loop planning/adaptation under uncertainty β€” the key strength of ReAct. Empirically, improvements scale with task complexity and uncertainty: deterministic information-lookup tasks show modest gains (ground truth from tools is primary benefit); non-deterministic interactive tasks show dramatic gains (closed-loop planning becomes essential), supporting the hypothesis that ReAct is most valuable for high-complexity, high-uncertainty problem spaces.
  5. This pattern (think-act-learn-think) is how humans actually solve hard problems.ReAct mirrors human problem-solving.ReAct formalizes the cognitive pattern humans use: reason β†’ act β†’ observe β†’ reason again.The Thought-Action-Observation cycle formalizes human expert problem-solving, enabling autonomous agents to employ human-like diagnostic reasoning and adaptive planning. When you solve a hard problem, you think, try something, see what happened, then think again β€” you don't just think, and you don't just act blindly. ReAct does what you naturally do. The interleaved pattern reflects how humans approach knowledge-intensive and interactive tasks: reason about next steps, take action, interpret results, adapt reasoning. ReAct makes this natural pattern available to language models. Expert problem-solving in knowledge-intensive (research, diagnosis) and interactive (navigation, negotiation) domains naturally follows Thought-Action-Observation cycles: experts reason, act, interpret feedback, and adjust plans. ReAct formalizes this pattern for AI agents. The interleaved reasoning-action cycle reflects demonstrated expert cognition in complex problem domains; formalization as a language-model prompting pattern enables transfer of human-like problem-solving strategies to AI without explicit instruction in domain reasoning or task structure.
πŸ’¬

No questions yet. Be the first to ask!