Pular para o conteúdo principal

Tree of thoughts (ToT)

Definição

Tree of thoughts extends CoT by maintaining multiple raciocínio branches. At each step, the model generates several continuations; a heuristic (or another model) scores them and guides search (por ex. best-first, beam).

Use quando a single chain-of-thought path might get stuck (por ex. game moves, multi-step planning) and you can afford multiple LLM calls. It trades compute for better search over the space of solutions. See raciocínio patterns for the full set of options.

Como funciona

Parte de uma raiz (por ex. a pergunta ou estado inicial). Ramificação: em cada etapa, gera várias continuações (por ex. next raciocínio steps or moves). Score each branch with a heuristic or a separate model (por ex. “how promising is this partial solution?”). Expand the best node(s) and repeat; prune low-scoring branches to limit cost. Search strategy (best-first, beam, BFS) and branching factor control exploration vs compute. The tree is built incrementally until a solution is found or a depth/budget limit is reached.

Casos de uso

Tree-of-thoughts is useful when you want to explore and score multiple solution paths instead of a single chain.

  • Game playing and planning where multiple moves need evaluation
  • Math or logic with several solution paths to explore
  • Creative or projeto tasks where generating and scoring options helps

Documentação externa

Veja também