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.

Level: advancedTopic: Prompt context engineering

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.