Tree of Thoughts
Saturday at Spoke & Chain: six repair jobs, two mechanics, eight hours each, and a few customers who need their bikes back by noon. Asked to "plan the day step by step", the model assigned the longest job first to the wrong mechanic, then spent every later step patching around that choice. A single chain of reasoning cannot go back. A tree can.
The rule
Branch, judge, prune — and back up from dead ends.
Tree of thoughts (ToT) treats problem-solving as a search. Instead of writing one line of reasoning from start to finish, the model:
- Branches — proposes several different next steps, or "thoughts", from the current state.
- Judges — evaluates each one: promising, uncertain, or a dead end.
- Prunes — keeps only the best few and expands those further.
- Backtracks — if every branch below a choice fails, returns to an earlier point and tries another.
Chain-of-thought is a single path. Self-consistency is several independent paths, compared only at the end. Tree of thoughts compares partial paths along the way and steers toward the good ones.
In practice, ToT is usually run by a small program that calls the model many times — one call to propose options, another to rate them — and keeps track of the tree. A lighter version fits in a single prompt: ask the model to list options, rate each against the constraints, and continue only from the best.
Constraints: 2 mechanics x 8 hours. Jobs (hours): wheel build 4,
full service 3, gear tune 1, brake bleed 2, puncture 0.5, fork service 3.
Puncture and gear tune are promised by noon.
Step 1: Propose three different ways to assign the three longest jobs.
Step 2: Rate each against the hours and the noon promises.
Step 3: Expand only the best one; if it fails, return to the next best.The shortcut
Use ToT when an early choice can ruin everything after it and you can judge a partial solution. Scheduling, puzzles and design trade-offs qualify; a one-step classification does not.
Branch
Option A: Mechanic 1 does the wheel build, Mechanic 2 the full service and fork service. Option B: Mechanic 1 does the wheel build and fork service; Mechanic 2 does the full service and brake bleed, then the small jobs. Option C: both start with the promised small jobs.
The cost is high: many model calls per problem. Reserve ToT for genuinely branching problems where a wrong early turn is expensive.
Drills
Answer fast — trust the rule.
What can tree of thoughts do that a single chain of thought cannot?
How does ToT differ from self-consistency?
Which problem is the best fit for tree of thoughts?
In the Saturday example, how many hours does Mechanic 2 work in the expanded option A plan?
Remember
- Branch, judge, prune — and back up from dead ends.
- Shortcut: use ToT when an early choice can ruin the rest and partial plans can be judged.
- Trap: paying for a tree search on problems a single pass solves.
