ToolsPromptsSkillsWorkflowsBlogAbout

Tree of Thoughts — deliberate problem solving with branching reasoning

Explore multiple reasoning paths simultaneously, evaluate each branch, and backtrack when a path leads to a dead end.

Reasoning4.1
Tree of Thoughts — deliberate problem solving with branching reasoning preview

Prompt template

Solve the problem by exploring multiple reasoning paths.

For each step:
1. Generate 3 possible next thoughts
2. Evaluate each thought (1-10) for progress toward the goal
3. Select the top 2 thoughts to continue
4. Backtrack if all paths score below 5

Problem: {problem}

Step 1 thoughts:

How to use

  1. 1Define the problem and success criteria clearly
  2. 2Generate 3 candidate thoughts at each node
  3. 3Score each thought on relevance and progress
  4. 4Prune low-scoring branches, keep top 2
  5. 5Backtrack when no path scores above threshold

Pro tips

  • Works best for puzzles, math, and strategic planning
  • Use a separate evaluation prompt for objective scoring
  • Keep branch width at 2-3 to manage token cost
  • Record the full tree for post-hoc analysis

Works best with

Ratings & Reviews

Loading reviews…

Share your experience

Select a rating

Related Skills