Chain-of-thought has the model write out steps before answering. ReAct interleaves reasoning with tool actions. Tree-of-thought branches into several lines of reasoning and prunes the weak ones.

Chain-of-thought, ReAct and tree-of-thought side by side

Planning & Reasoning PatternsDiagram with these labels, in reading order: Input Problem; Chain-of-Thought; (Explicit Steps); ReAct; (Thought-Action-Observation); Tree-of-Thought; (Branch & Explore); Final Answer.Input ProblemChain-of-Thought(Explicit Steps)ReAct(Thought-Action-Observation)Tree-of-Thought(Branch & Explore)Final Answer
Planning & Reasoning Patterns Overview
PatternWhat the model doesSuits
Chain-of-thoughtWrites explicit steps, such as the operation, the calculation and the answerArithmetic and logic
ReActAlternates Thought, Action and Observation, with actions such as a database query or an API callTool-using agents
Tree-of-thoughtGenerates candidate branches, scores them and prunes the weak onesPuzzles and planning with several viable paths

ReAct grounds the model in actual tool outputs, so the reasoning is tied to data and the model is less likely to hallucinate facts. A model that decides to check the weather calls a weather API and folds the observed data into its next thought. Tree-of-thought suits a trip plan where routes, transport and activities compete on cost and time.

In a chain-of-thought run on a math problem, the model first names the operation, then performs the calculation, then states the answer. Writing the steps out lets it catch mistakes early. Tree-of-thought extends this idea to problems with no single straightforward path.

Why a direct answer commits too early

On a multi-step problem, a direct answer can commit to a wrong first token that the model cannot recover from. Writing the reasoning out lets it adjust as it goes. In software terms, chain-of-thought is logging intermediate state, ReAct is an act-and-observe loop, and tree-of-thought is backtracking search. The analogy stops at one point: the generated steps are text the model conditions on, so they change the answer instead of only recording it.

Token and latency cost of structured reasoning

Each pattern spends more tokens and adds latency. Strong reasoning models reason internally, so heavy manual chain-of-thought may become redundant for them. For basic lookups, elaborate scaffolding is unnecessary.

Match the pattern to the task More structure raises accuracy on complex work and raises token use and latency on every call.

The visible reasoning trace has a use of its own: you can inspect it to find where an error began. A written trace may not match the computation that produced the answer, so treat it as a clue.

Example scenario: tree-of-thought paths go wrong

Suppose an evaluation finds 40% of reasoning steps incorrect. The figure is illustrative. One cause is weak pruning, where irrelevant branches multiply, or an exploration strategy that is too broad.

Planning & Reasoning PatternsDiagram with these labels, in reading order: Incorrect output rate; Check chain-of-thought; Check ReAct interleaving; Check tree-of-thought; structure; Improve reasoning steps; Optimize tool actions; Refine exploration and; pruning.Incorrect output rateCheck chain-of-thoughtCheck ReAct interleavingCheck tree-of-thoughtstructureImprove reasoning stepsOptimize tool actionsRefine exploration andpruning
Debugging reasoning failures
  • Measure accuracy on a sample of complex queries.
  • Log the reasoning paths for failed queries.
  • Test a more constrained exploration strategy against the current one.

Pruning more aggressively limits wasted branches and also limits the model's flexibility. Track output accuracy and the diversity of reasoning paths to see whether pruning has gone too far.

Back to the knowledge baseRequest an assessment