fixaiprompt
All techniques
Glossary · Technique

Tree-of-Thoughts (ToT) Prompting

Also known as: ToT, Branch-and-prune reasoning

Generate multiple reasoning branches per step, evaluate each, and prune. Beats single-path Chain-of-Thought on hard decisions.

Try the interactive template

When to use it

  • High-stakes decisions with multiple viable paths.
  • Open-ended problems where the first answer is rarely the best.
  • Strategy work: pricing, hiring, technical architecture.
  • Tasks that benefit from optionality and reversibility analysis.

When not to use it

  • Tasks with one obviously correct answer.
  • Quick chat or short factual questions.
  • Anywhere the user just wants a direct opinion, not a tree of analyses.

How it works

  1. 1At each reasoning step, the model is instructed to produce N candidate continuations (typically 3–5).
  2. 2Each branch is then evaluated against criteria — likelihood of success, cost of failure, optionality preserved.
  3. 3Weakest branches are pruned. Surviving branches branch again at the next step.
  4. 4The final answer is the path that survives the deepest while accumulating the strongest scores.

Example

Lazy prompt
Should I quit my job to start a SaaS?
Using the technique
Explore 3 paths: (1) quit and go full-time, (2) build nights+weekends, (3) stay employed and angel-invest. Score each on success likelihood, downside, and optionality. Prune to top 2, branch into concrete sub-options, pick a winner.

Common pitfalls

  • Burns tokens. The tree can blow up combinatorially if not pruned aggressively.
  • Evaluation criteria must be specified clearly, or the model just picks its own first idea.
  • Without forcing a final pick, ToT can end in option-paralysis with no actionable conclusion.

Where this came from

Yao et al., 2023 — "Tree of Thoughts: Deliberate Problem Solving with Large Language Models."

Try it interactively

The interactive template lets you fill in your scenario and generates a copy-ready prompt that uses this technique.

Open the template