Chain of Thought or ReAct: Choosing Between Them
One Prompt or One Loop#
A support queue needs priorities. Every incoming ticket has to carry a label, P1 through P4, before it reaches a human, and you have been handed the feature. Two implementations are on the table and both are an afternoon of work.
The first is one prompt. You paste the ticket body in, paste the severity matrix underneath it, and ask the model to work through that matrix out loud before it commits to a label: how many users are affected, whether a workaround exists, whether data is at risk. One call, one response, two seconds.
The second is a loop. The model reads the ticket, decides it needs the customer's plan tier, calls a function that queries Postgres, reads what comes back, and then decides whether to also pull the account's incident history from the last 30 days before labeling anything. Three or four round trips, each one shaped by the result of the previous.
Both ship by Friday. Only one of them fits the task, and what decides it is not model size, not prompt craft, and not which technique is newer. It is whether the facts the task needs are already sitting in the context window.
Call this example TICKET-TRIAGE. It has three pieces, and the split between them is the whole argument. There is the ticket body, free text written by a customer. There is the severity matrix, a set of rules you wrote and can paste into the prompt verbatim. And there is the customer's plan tier, which lives in a customers row in Postgres and appears nowhere in the prompt unless something goes and fetches it. The first two pieces are context. The third is not, and no amount of careful reasoning will conjure it.
Given a choice like that, most teams stand up the loop. Tool-calling is what the frameworks are built around, it covers the fetching case and the no-fetching case alike, and reaching for it feels like the safer engineering decision rather than a decision at all. The two techniques also grew up in separate research literatures, so there is no tidy rule sitting in anyone's documentation telling you which one a given task wants.
Two Techniques, One Difference: Intermediate Steps vs. Interleaved Observation#
| Chain of Thought | ReAct | |
|---|---|---|
| Prompt shape | One prompt, with an instruction to work through the steps | One prompt plus a tool contract and a loop around the model |
| What the model emits | Intermediate steps, then the answer | A thought, then an action, then the next thought after an observation comes back |
| Where new facts can enter | Nowhere after the prompt is sent | Every observation, mid-generation |
| Model calls per answer | Typically one | Typically one per cycle of the loop |
Take the triage case from the fork: a support ticket reading "charged twice for the October invoice, order #88431," and a routing policy that sends duplicate-charge reports to billing, outages to platform, and everything else to tier one. The ticket text is in the prompt. The policy is in the prompt. Nothing else is needed to produce a label, so asking the model to lay out its steps (the complaint names a double charge, the policy maps double charges to billing, therefore billing) changes only one thing: the tokens the model generates before it commits to an answer. Chain of Thought does not fetch anything. It restructures generation over facts the prompt already supplied, which is why it costs one call and has no external failure mode.
Now change the task slightly. Route the ticket and confirm the duplicate charge happened. The model has never seen your billing ledger, and no amount of careful stepwise reasoning will produce the charge history for order #88431. The fact has to arrive from outside, which means the generation has to stop, a tool has to run, and the result has to land back in the context before the next reasoning step.
That is the shape ReAct describes. Its authors' framing is that reasoning (chain-of-thought prompting) and acting (action plan generation) had largely been studied as separate topics, and that a single model can generate reasoning traces and task-specific actions in an interleaved manner: the traces help the model induce, track, and update action plans and handle exceptions, while the actions let it reach external sources such as knowledge bases or environments to gather information it lacks1.
Read that carefully and the comparison stops being a rivalry. A Thought step inside a ReAct loop is Chain of Thought: same stepwise generation, same prompt-resident facts, just bounded to one turn and followed by an action instead of a final answer. ReAct does not replace Chain of Thought: it wraps it in a loop and gives each iteration a chance to learn something new. The choice between them comes down to how much that loop buys you on a given task.
Inside the ReAct Loop: Why the Observation Rewrites the Next Thought#
An agent in ALFWorld, the text environment where the ReAct paper runs its decision-making trajectories2, is told to put a clean knife on a countertop. It finds knife 1 on countertop 2, picks it up, walks to countertop 1, and issues:
The action was reasonable. The syntax was valid. The object was in hand. What it lacked was a precondition: you cannot use the sinkbasin from across the room. The environment does not raise an error or explain itself. It returns two words, and the act-only agent reads them, does not reconcile them with its plan, and goes to countertop 3 to look for a second knife, where take knife 2 from countertop 3 also returns "Nothing happens"2.
That failure is the useful part. This is the paper's act-only baseline, which emits actions with no reasoning trace at all2, and what it never does is reconcile the failure with its plan: it keeps reissuing the same two actions and collecting the same two words2. The fact that broke it (where the agent is standing relative to the sinkbasin) lives in the environment, not in the prompt — but without a Thought step, there is nowhere for that returned string to be turned into a revised plan.
The loop runs Thought, Action, Observation, and then another Thought, with the observation sitting in context as ground truth the next Thought has to account for. The arrival of "Nothing happens" becomes a premise rather than noise: *the clean action failed, so I am not at the sinkbasin, so the next action is go to sinkbasin 1*. One step forward, one correction, one step forward. Chain of Thought has no equivalent position for that string to occupy. Its intermediate steps are the model's own tokens conditioning the model's next tokens, and nothing from outside the prompt ever enters the generation, so an incorrect assumption in step two propagates cleanly through step seven with no mechanism to contradict it.
TICKET-TRIAGE runs on the same three beats. Thought: routing this ticket depends on the customer's plan tier, which the ticket text does not state. Action: query the customer service for account 88213. Observation: tier=enterprise. The second Thought is now working from a fact that did not exist when the first one ran, and if the observation had come back tier=free or with a 404, the next step would differ accordingly. That is the whole trick: a feedback edge from the world back into the prompt.
A loop that can acquire facts mid-task can reach facts one pass of structured generation cannot, and it is also more expensive.
The Decision Rule: Is the Fact Already in the Context Window?#
You have a task in front of you and you want to know which technique it needs. Ask one question: can the answer be derived from what the prompt already contains? If yes, Chain of Thought is sufficient, and anything more is overhead. If no, the model has to go get something, and that means ReAct.
The question sounds almost too simple to be useful. It does more work than it looks like it should once you apply it at the granularity of a single step rather than a whole task, because most real tasks split down the middle.
Take ticket triage. A support ticket arrives with a severity matrix in the prompt and the ticket body quoted in full. Deciding that "payments API returning 500 for all customers" maps to Sev-1 under the stated matrix is a derivation: every fact needed is on the page, the work is applying rules to supplied text, and Chain of Thought handles it in one call with no tools attached. Now the same ticket needs routing by the customer's plan tier. That fact lives in a billing database. No amount of intermediate reasoning will produce it, and a model that guesses "probably Enterprise" has fabricated a fact it had no access to. One task, two steps, two different techniques.
For the cases where the split is less obvious, the When2Tool benchmark isolates three categories of tool necessity3, which work well as a checklist you run against your own task:
- Computational scale: is the data small enough to reason over in the context window? Twelve line items in the prompt: no tool. Twelve thousand rows in a warehouse: tool.
- Knowledge boundaries: is the fact in the prompt or in the model's training data, or does it live in a system the model cannot see? The severity matrix quoted above: no tool. The customer's current plan tier: tool.
- Execution reliability: does the step need a guaranteed-correct result, or is a plausible one acceptable? Explaining what a regex matches: no tool. Confirming it matches, by running it: tool.
Run those three questions over each step of your task and the technique assigns itself. Steps where all three answer "no tool" belong in a single Chain of Thought prompt. The first step that answers "tool" is where the loop starts.
One honest caveat about the rule's status. The framing comes from recent work: When2Tool's authors note that before their benchmark, no existing benchmark systematically studied when a tool call is actually needed3. That makes the three categories a useful way to think, not a settled standard with years of practice behind it. Treat the checklist as a reasoning tool you apply with judgment rather than a specification you conform to.
What Over-Reaching Costs: Fees, Latency, and New Failure Modes#
Count the calls. TICKET-TRIAGE classifying a ticket against stated severity rules with Chain of Thought is one model call: prompt in, reasoning trace and label out. The same classification wrapped in a ReAct loop is a thought, an action, a round trip to whatever the action queries, an observation appended to the context, and a second model call to produce the label the first call could already have produced. More tokens for an identical answer, plus the round trip's latency, and the loop will reach for the tool even when the prompt's rules are sufficient: across tool-augmented agents, the measured tendency is to call tools indiscriminately when the model could answer directly, and each unnecessary call spends API fees and latency without improving the answer3.
The fees are the mild part. A single prompt has one way to fail: the model produces a bad answer, and you see it immediately in the output. A loop fails in ways that need engineering before they need prompting.
| Failure mode | What the loop sees | What you must build |
|---|---|---|
| Tool timeout | No observation, or an empty one, where the next thought expects a fact | A per-call timeout plus a decision about what the loop does on no data: fall back to the model's own judgment, or stop and escalate |
| Malformed action | A thought that names a tool or argument the dispatcher cannot parse | Validation on the action before dispatch, and a retry budget so a repeatedly unparseable action does not burn the whole turn |
| Non-termination | Thought, action, observation, and a next thought that never concludes | A hard step ceiling and a termination check, so the loop exits with a partial answer instead of looping until the context fills |
None of this is exotic. It is a few hours of work, and for a ticket that genuinely needs the customer's plan tier out of the database, it is work worth doing. For a ticket whose severity is derivable from the rules already in the prompt, you have built a timeout policy, an action validator, and a step ceiling to arrive at the label one call would have returned.
The converse error is at least as common and harder to spot, because it looks like diligence. A classification is returning wrong labels, so you add reasoning scaffolding: restate the rules, require the model to list the evidence before deciding, ask it to check its work. Those instructions genuinely improve derivation when the inputs are present, which is why the approach keeps getting tried. What they cannot do is make a missing fact appear. If the plan tier was never in the context, no number of reasoning steps retrieves it; the model reasons carefully over what it has and produces a confident label built on an assumption it had no way to check. Chain of Thought improves how a conclusion is reached, never what it is reached from.
Ship It: Start with Chain of Thought, Add Tools Where the Trace Proves It Needs Them#
Here is the entire upgrade from a reasoning prompt to a tool-using loop, in LangChain:
A tool is an ordinary typed Python function with a docstring, and you hand it to a factory alongside the model4. You can pass any Python callable, a LangChain tool, or a tool dict5. The loop itself is not yours to write: there is a template agent that takes a query, reasons about it, calls a tool, observes the result, and repeats until it can answer6.
This is why the migration is additive rather than a rewrite. The Thought steps inside that loop are the same Chain of Thought reasoning you already wrote; the loop adds Action and Observation around them. The reverse also holds, and it is the part teams tend to skip: a tool-using agent still needs explicit reasoning between calls, because something has to decide which tool to call and what the returned observation means. Strip the reasoning out and you have a model guessing at function signatures.
So the Chain of Thought prompt is not scaffolding you throw away. It is the thing you instrument.
Four steps, runnable tomorrow on TICKET-TRIAGE:
- Write the no-tool prompt. Rules in the context, severity definitions stated, reasoning requested before the verdict.
- Run twenty real tickets through it and read every trace, not the final labels. Labels hide the failure; traces show it.
- Find the sentence where derivation becomes guessing. It reads like "the customer is likely on the enterprise plan, so this is P1" or "this error usually means the database connection pool is exhausted." Both are inventions about facts the prompt never supplied. Everything above that sentence is sound reasoning over available data; the line itself is where context ran out.
- Attach one tool at that point and only that point: a plan lookup, a log query. Rerun the same twenty tickets and compare traces.
If step 3 turns up nothing across twenty tickets, you are done, and you shipped the cheaper system. If it turns up three different guesses in three different places, you have found your tool surface, and you found it empirically rather than by assuming the task needed an agent. Research on when tool calls are necessary sorts the need into computational scale, knowledge boundaries, and execution reliability3; a trace that guesses at a customer's plan tier is the second of those, visible in your own output rather than inferred from a benchmark.
The open question worth taking further is what happens after the tool returns something unexpected. Rerun step 4 with a lookup that returns an empty result and watch whether the next Thought accounts for it or proceeds as though the fact arrived.
Sources
- ReAct: Synergizing Reasoning and Acting in Language Modelsreact-lm.github.io
- ReAct: Synergizing Reasoning and Acting in Language Modelsarxiv.org
- LLM Agents Already Know When to Call Tools - Even Without Reasoningarxiv.org
- arXiv - ️ LangChainpython.langchain.com
- Agents - Docs by LangChaindocs.langchain.com
- GitHub - langchain-ai/react-agent: LangGraph template for a simple ReAct agent · GitHubgithub.com
Keep reading
How LinTS and bandits choose models in an AI gateway
An AI gateway is a single endpoint that sits in front of several language models and forwards each incoming request to one of them. Model routing is the choice it makes on every...
How Spring AI Works: LLMs, Embeddings, and RAG for Java Engineers
Spring AI is a Spring Boot framework that connects Java applications to LLMs and vector stores using the same dependency-injection patterns Spring developers already know. Your...
What a forward deployed engineer does, and how to prepare
A forward deployed engineer is a software engineer who works inside the customer's organization rather than inside the product team. The job is to build and ship custom solutions...