🌳 Module 7 40 mins

Tree of Thoughts

Exploring Multiple Paths

Learn advanced brainstorming techniques that explore multiple solution paths simultaneously.

What You'll Learn

  • • Branching logic in prompts
  • • Self-correction mechanisms
  • • Synthesising the best elements
  • • Complex problem decomposition

What is Tree of Thoughts?

Tree of Thoughts (ToT) is an advanced technique that explores multiple reasoning paths simultaneously, like branches on a tree. Instead of following a single chain of reasoning, the AI generates several approaches, evaluates them, and then synthesises the best elements.

This technique is particularly useful when the first idea is not always the best, or when you need to explore different angles before committing to a solution.

Tree of Thoughts Structure

1. Brainstorm 3 different approaches to this problem
2. For each approach, evaluate its strengths and weaknesses
3. Identify the best elements from each approach
4. Synthesise a final solution that combines the best elements

Branching Logic in Prompts

ToT prompts explicitly ask the AI to generate multiple approaches:

  • "Generate three different strategies for..."
  • "Explore this problem from three different angles..."
  • "Consider multiple approaches: conservative, moderate, and aggressive..."

Self-Correction Mechanisms

Tree of Thoughts includes built-in self-correction. The AI evaluates each branch, identifies flaws, and can revise or discard approaches that do not work. This leads to more robust solutions.

Synthesising the Best Elements

After exploring multiple paths, the AI combines the strongest elements from each approach into a final, superior solution. This synthesis step is what makes ToT so powerful.

Complex Problem Decomposition

Tree of Thoughts is ideal for complex problems that can be broken down into sub-problems. Each branch can tackle a different aspect, and the synthesis brings everything together.

Moving Forward

Tree of Thoughts is a powerful technique for complex problem-solving. Next, you will learn Adversarial Validation, which uses competing AI personas to critique and refine outputs to exceptional quality.