AI engineering glossary · Prompt context engineering
What is Tree of Thoughts?
Tree of Thoughts (also called ToT): A prompting framework that lets a model explore several candidate reasoning steps at each stage, rate them, and keep or discard branches, much like a search over a tree. It suits puzzles and planning where a single straight line of reasoning can fail. It needs many model calls.
Tree of Thoughts: an example
For a 24-game puzzle, the model proposes three next operations, scores each as promising or not, and continues only from the best ones.
Related terms
More Prompt context engineering terms
- User prompt
- XML tags in prompts
- Zero-shot chain-of-thought
- Zero-shot prompting
- Analogical prompting
- Assistant prefill
- Automatic prompt engineer
- Batch API
Where you learn it
Tree of Thoughts is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.