Prompting & In-Context Learning

tree-of-thought prompting

Tree-of-thought prompting lets the model explore several lines of reasoning at once, like a chess player considering a few candidate moves, looking ahead down each, and pruning the ones that lead nowhere. Where a plain chain of thought commits to a single path and runs to the end, tree-of-thought branches: at each step it proposes a handful of next thoughts, evaluates how promising each looks, and keeps developing the best ones while abandoning dead ends.

This suits problems where one wrong early move dooms the whole attempt and you cannot tell until much later, such as puzzles, planning, or search-like tasks. The branching plus evaluation lets the model back out of a bad direction instead of stubbornly finishing a doomed chain. In practice it is run by an outer program that calls the model many times, once to generate candidate thoughts and again to score them, exploring the tree much as a search algorithm would.

The price is many more model calls and real engineering effort, so it is reserved for genuinely hard problems where a single straight-line attempt keeps failing. For most everyday tasks a simple chain of thought, or self-consistency, gives most of the benefit at a fraction of the cost.

Also called
ToTtree of thoughts