Tree of Thoughts (ToT) is an advanced prompting technique that enables AI models to explore multiple reasoning paths in parallel, evaluate their potential, and select the most promising branches to develop further—similar to how humans explore different solutions when tackling complex problems.
---provider: OpenAImodel: gpt-4.1temperature: 0.4---# Tree of Thoughts: Advanced Problem-SolvingLet's solve this complex problem using a Tree of Thoughts approach with {{ thought_branches }} initial branches.**Problem**: {{ problem_statement }}## Thought Generation:{{ for branch in thought_branches }} ### Branch {{branch}}: [Name this approach] {{ for level in levels}} **Level {{level}} thinking:** - [Reasoning steps at this level] - [Interim conclusions] **Branch {{branch}} Outcomes:** - [Describe expected outcomes of this reasoning path] {{ '\n\t'}} {{ endfor }} ## Branch Evaluation: {{ for criteria in evaluation_criteria}} ### Criterion: {{ criteria }} - Branch {{branch}}: [Score 1-10] - [Justification] {{ '\n'}} {{ endfor }}{{endfor}}## Solution Development:{{ if branch_selection_method === "best_single" }} **Selected Branch**: [Identify best overall branch] **Development**: [Fully develop this single branch to conclusion]{{ else if branch_selection_method === "hybrid" }} **Hybrid Solution**: [Combine elements from multiple branches] **Integration Points**: [Explain how different branch elements connect]{{ else if branch_selection_method === "weighted" }} **Weighted Solution**: [Proportionally represent branches based on scores] **Weighting Factors**: [Explain the weights applied to each branch]{{ endif }}## Final Answer:[Complete solution with justification]
You can use {{ '\n\t' }} to give indentation in the code block. Is more easy to follow what’s doing the prompt
Implement Tree of Thoughts with agent collaboration, you can play with it here.
Copy
Ask AI
---provider: OpenAImodel: gpt-4otemperature: 0.3type: agentagents: - agents/creator - agents/critic - agents/synthesizer---# Multi-Agent Tree of ThoughtsSolve the following problem using a collaborative multi-agent Tree of Thoughts approach:**Problem**: {{ problem_statement }}## Process:1. The **creator** agent will generate multiple solution branches2. The **critic** agent will evaluate each branch's strengths and weaknesses3. The **synthesizer** agent will select and refine the most promising approachLet's begin solving this step by step.