Tree of Thoughts & Self-Consistency

Explore branching reasoning paths and majority-vote strategies to dramatically improve accuracy on hard problems.

9 min read
2 quiz questions

Chain-of-thought prompting follows a single reasoning path. But what if that path is wrong? Tree of Thoughts (ToT) and Self-Consistency both address this by exploring multiple reasoning paths, then selecting or combining the best results.

Self-Consistency is the simplest multi-path technique. You run the same prompt multiple times at a moderate temperature (0.5–0.7), collect several answers, and take the majority vote. Research shows this improves accuracy by 5–15% on math and logic benchmarks compared to single-shot chain-of-thought.

Prompt (run 5 times at temperature 0.7): "A bat and a ball cost $1.10 together. The bat costs $1.00 more than the ball. How much does the ball cost? Think step by step." Run 1: $0.05 ✓ | Run 2: $0.10 ✗ | Run 3: $0.05 ✓ | Run 4: $0.05 ✓ | Run 5: $0.05 ✓ Majority vote: $0.05 (4/5 agreement = high confidence)

ToT structures reasoning as a tree where each node is a partial solution. The model generates multiple candidate next-steps at each node, evaluates which branches are promising, and prunes dead ends. This is particularly effective for planning, puzzles, and multi-constraint problems.

ToT prompt structure: "I need to solve [PROBLEM]. Generate 3 possible first steps. For each step, rate its promise on a scale of 1-5 and explain why. Then take the most promising step and generate 3 possible next steps from there. Continue until you reach a solution." The model explores: ├─ Approach A (promise: 4/5) → Step A1 → Step A2 → Solution ✓ ├─ Approach B (promise: 2/5) → pruned └─ Approach C (promise: 3/5) → Step C1 → dead end → backtrack
ToT uses more tokens than standard prompting — often 3-10x more. Reserve it for high-stakes problems where accuracy matters more than cost. For simpler tasks, self-consistency is usually sufficient.

Prompt Templates

Self-Consistency Voting

Simulates self-consistency within a single prompt by requesting multiple independent reasoning paths.

Solve this problem using 3 independent reasoning approaches. For each approach, show your work step by step. After all 3 approaches, compare the answers and select the one with the most agreement.

Problem: [PROBLEM]

Tree of Thoughts Explorer

Guides the model through branching exploration with evaluation at each node.

I need to solve: [PROBLEM]

Step 1: Generate 3 possible approaches. For each, rate feasibility (1-5) with a one-line rationale.
Step 2: Take the highest-rated approach and generate 3 possible next steps. Rate each.
Step 3: Continue with the best path until you reach a solution.
Step 4: State the final answer and your confidence level.

Test Your Knowledge

Knowledge Check

1 / 2

How does Self-Consistency improve reasoning accuracy?

Key Takeaways

  • Self-Consistency improves accuracy by 5–15% through majority voting across multiple reasoning paths
  • Tree of Thoughts structures reasoning as a search tree with evaluation and pruning at each step
  • Both techniques trade token cost for accuracy — use them when correctness matters most