Do you use "Tree of Thought" prompts for complex reasoning?

Last updated by Ulysses Maclaren [SSW] 6 months ago.See history

Imagine you're using ChatGPT and you find that the model's answers lack depth or reasoning. You're not alone. Many users experience this, especially when asking complex questions. Tree of Thought (ToT) prompting can be a game-changer in such scenarios.

Note: If you're on GPT Plus, you can use this custom GPT: Tree of Thought Problem Solver.

What is Tree of Thought Prompting?

Tree of Thought Prompting is a technique that enhances the reasoning abilities of Large Language Models like ChatGPT. It allows the model to explore multiple branches of reasoning and self-correct as it goes along.

Think of ToT prompting as a brainstorming session among experts. Each expert represents a branch of reasoning. They share their thoughts, evaluate each other's reasoning, and reach a consensus.

Why is it Useful?

  • Enhanced Reasoning - ToT prompting improves the model's ability to answer complex questions
  • Self-Correction - The model can identify and rectify its errors autonomously
  • Single Prompt - ToT can run from start to finish without any user interaction.

Use ToT prompting when you need more reasoned and nuanced answers from ChatGPT, especially for complex queries.

How to Implement a Simple ToT Prompt

The basic structure of a ToT prompt involves asking the model to imagine multiple experts debating the question. Each expert shares one step of their reasoning before moving on to the next.

“Imagine 3-6 different experts are answering this question. {{ YOUR QUESTION }}

All experts will write down 1 step of their thinking, then share it with the group. Then all experts will go on to the next step, etc. If any expert realizes they're wrong at any point, then they leave.

Continue this process until we have a definitive answer.”

Figure: Good example - This structure allows the model to explore multiple reasoning paths and self-correct

Examples

"Should I vote 'yes' or 'no' on The Voice?"

Figure: Bad example - This is a nuanced question and this simple prompt is unlikely to fully explore the options

"Read https://voice.gov.au

Imagine 3 different experts are answering this question: "Should we vote 'yes' or 'no' on The Voice?"

All experts will write down 1 step of their thinking, then share it with the group. Then all experts will go on to the next step, etc. If any expert realizes they're wrong at any point, then they leave.

Continue this process, until you have a definitive 'yes' or 'no' answer"

Figure: Good example - This is a complex question that benefits from ToT prompting

We open source. Powered by GitHub