A reasoning LLM (OpenAI o1/o3-style) doesn't just emit one token stream β it explores a tree of partial "thoughts" the way a search algorithm explores a state space. Each node here is a reasoning step; expanding a node asks the model to propose b next thoughts, and a value function estimates how promising each one is:
value(node) β P(solution reachable | thought so far)
frontier β top-k nodes by value (beam width k)
expand each frontier node β b children
keep only the best k of (frontier βͺ children)
- Tree-of-Thought (best-first): at every depth, only the k highest-value nodes survive (a beam) β this is self-consistency and ToT in miniature: multiple candidate reasoning paths are generated, scored, and pruned in parallel, letting the search backtrack away from a low-value branch instead of committing to it.
- Chain-of-Thought (single path): the same tree with beam width forced to 1 β one thought leads greedily to the next with no branching or backtracking, matching how a standard (non-reasoning) LLM generates a single linear rationale.
- Branching factor b β how many candidate next-thoughts are sampled per expansion.
- Beam width k β how many parallel branches Tree-of-Thought keeps alive; k=1 degenerates exactly into Chain-of-Thought.
- Node color encodes its value estimate (green = high-value / likely on the winning path, gray = pruned once a stronger sibling out-scores it).
Real systems (ReAct, Tree-of-Thoughts prompting, OpenAI's o1/o3 reasoning models) use exactly this shape β generate candidate reasoning steps, score them (self-evaluation, a reward model, or majority voting), and search the resulting tree instead of decoding one greedy path β which is why they solve multi-step problems that trip up single-pass Chain-of-Thought.
Honest simplifications. The value function is synthetic: value(depth) = min(0.97, 0.35 + 0.09·depth + 0.28·U) with U uniform on [0,1). It stands in for a learned verifier or self-evaluation score and is an illustrative parameter set, not a measurement of any real model; the problem labels are decoration. The search itself is exact beam search: each level expands b children per frontier node and keeps the top k, so expanded = Σd fd−1·b with fd = min(k, fd−1·b). Because the scores are independent noise, this shows the best-of-n selection effect, not real reasoning gains.