princeton-nlp/tree-of-thought-llm
Tree of Thoughts prompting framework uses tree search over LLM-generated intermediate thoughts for improved reasoning and problem solving.

This implements a prompting technique that extends chain-of-thought reasoning by exploring multiple reasoning branches as a search tree rather than a linear chain. The framework generates candidate thoughts, evaluates their promise using LLM-based value estimation, and selectively explores promising paths. It demonstrates significant gains on tasks like Game of 24 and Creative Writing by enabling deliberate backtracking and lookahead in LLM reasoning.