PromptingBasics

Tree of Thoughts

By
Dan Lee
Dan Lee
Dec 20, 2025

Ever notice how the hardest problems aren’t “what’s the answer?” but “which approach should we take?” That’s where Tree of Thoughts (ToT) helps.

Instead of forcing an AI to commit to one path immediately, ToT encourages it to generate multiple candidate approaches (branches), score or critique them, and then pick the best option (or combine the strongest parts). In plain English: it’s brainstorming with structure.

ToT in One Sentence

Tree of Thoughts = explore multiple solution paths, evaluate them, then commit to the best one.

Where ToT Shines

ToT is most useful when:

  • There are many valid answers (strategy, product, planning)
  • The task has tradeoffs (speed vs quality, cost vs scope)
  • You need reasoned selection (not just a list)
  • You’re dealing with uncertainty (missing data, ambiguous requirements)

That includes technical work (system design, debugging hypotheses) and non-technical work (campaign strategy, hiring plans, negotiation messaging).

The Basic ToT Pattern

A clean Tree-of-Thoughts prompt usually asks for:

  1. Generate N options (branches)
  2. Evaluate each option using criteria
  3. Select the best option
  4. Refine into a final plan/output

You can make this even stronger by requiring a scoring rubric and an explicit assumption list.

Example 1: Technical Decision (AI Engineer)

You’re designing an evaluation approach for a RAG assistant and don’t want random advice.

Text
Context: You are advising an AI engineer building a RAG assistant for internal docs. Latency budget is 1.5s. We need measurable quality improvements.
Instruction: Use a Tree-of-Thoughts approach to propose 4 evaluation strategies.
Input Data:
- Current: manual spot-checking + thumbs up/down
- Constraints: limited labeling budget, must run weekly, want to catch regressions
Output Indicator:
- Step 1: List 4 strategies as branches.
- Step 2: Score each (1–5) on Cost, Coverage, Signal Quality, and Implementation Effort.
- Step 3: Choose the best strategy (or hybrid) and justify in 5 bullets.
- Step 4: Provide a 4-week rollout plan as a Markdown table.

Why this works: the model can’t just “recommend something.” It has to explore alternatives, compare them, and converge on a plan you can actually execute.

Example 2: Business Strategy (Non-Technical)

A marketing lead wants a campaign plan, but the right plan depends on tradeoffs.

Text
Context: You are helping a marketing lead at a B2B SaaS company. We’re launching a feature that reduces onboarding time by 40%. Audience is mid-market ops leaders.
Instruction: Use Tree of Thoughts to generate 3 campaign angles and pick the best.
Input Data:
- Channels available: LinkedIn, email newsletter, webinars
- Constraints: 2-week launch window, small team, need clear CTA to book demos
Output Indicator:
- Provide 3 angles (branches) with a 1-sentence positioning statement each.
- Evaluate each on Clarity, Differentiation, Ease of Execution, and Likelihood to Convert (score 1–5).
- Select the best angle and produce:
(a) 5 LinkedIn post hooks
(b) 1 webinar title + outline
(c) 1 email draft (<=160 words)

Same technique, totally different domain: generate options → evaluate → commit → execute.

Don’t Over-Branch

More branches isn’t always better. If you generate 12 options, you’ll get noise. Start with 3–5 strong branches and use a clear rubric.

Takeaway

Tree of Thoughts is your go-to prompt style for complex decisions. When you need more than a single answer—when you need the best approach—ToT helps you explore multiple paths, compare tradeoffs, and converge on a plan you can defend.

If the task feels like a fork in the road, don’t ask for “the answer.” Ask for a tree, then pick the strongest branch.

Dan Lee

Dan Lee

DataInterview Founder (Ex-Google)

Dan Lee is an AI tech lead with 10+ years of industry experience across data engineering, machine learning, and applied AI. He founded DataInterview and previously worked as an engineer at Google.