tree-of-thought-llm
[NeurIPS 2023] Tree of Thoughts: Deliberate Problem Solving with Large Language Models
GraphCanon updated today · GitHub synced today
Decision brief
The 'Tree of Thoughts' approach provides a structured way to deliberate problem-solving using large language models and is well-suited for tasks requiring exploration through a tree-like structure.
Good fit when
- - Use 'tree-of-thought-llm' when you need an approach that handles deliberative reasoning problems, like the game of 24, leveraging large language models.
- - Prefer this framework if your application requires evaluating and selecting among multiple potential next steps in a problem-solving scenario.
Avoid when
- - Avoid using 'tree-of-thought-llm' for problems that do not benefit from tree-like exploration or where the solution does not involve deliberate reasoning or step-by-step evaluation.
- - If real-time decision-making is critical and computational resources are limited, this tool might be too slow due to its reliance on large language models like GPT-4 which may introduce latency.
- Requirements:
- Min 4 GB RAM
Observed Jul 12, 2026 · Source: enrich:decision_facts
Verify the decision
Maintenance and security
Full trust report- Maintenance
- Dormant (577d since push)
- As of today
- Provenance
- Not a fork · Organization account
- As of today
- Security (OSV)
- 90 low (90 low)
- As of 1mo
Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.
Install
pip install tree-of-thought-llm PyPIHow it fits your stack(7)
Typed graph edges - alternatives, integrations, successors, and dependencies. Ranked by relationship type, not raw GitHub stars.
Integrates
Related
Relationship graph
Optional deeper exploration of typed edges and category neighbours.
Similar tools
Same-category neighbours not already linked as typed edges.
Evidence and technical details
Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.
Overview
A repository that implements the 'Tree of Thoughts' approach to deliberate problem-solving using large language models, demonstrated with examples like solving the game of 24.
Capability facts
- Languages
- python
Source: github.language+pyproject.toml · Aug 17, 2026
Categories
Compatibility
Sourced claims from the README excerpt - not unsourced marketing copy.
Source: README excerpt (regex_v1, Aug 17, 2026)
```python import argparseSource link
Tags
README
Quick Start
The following minimal script will attempt to solve the game of 24 with 4 5 6 10 (might be a bit slow as it's using GPT-4):
import argparse
from tot.methods.bfs import solve
from tot.tasks.game24 import Game24Task
args = argparse.Namespace(backend='gpt-4', temperature=0.7, task='game24', naive_run=False, prompt_sample=None, method_generate='propose', method_evaluate='value', method_select='greedy', n_generate_sample=1, n_evaluate_sample=3, n_select_sample=5)
task = Game24Task()
ys, infos = solve(args, task, 900)
print(ys[0])
And the output would be something like (note it's not deterministic, and sometimes the output can be wrong):
10 - 4 = 6 (left: 5 6 6)
5 * 6 = 30 (left: 6 30)
30 - 6 = 24 (left: 24)
Answer: (5 * (10 - 4)) - 6 = 24
For agents
This page has a .md twin and JSON over the API.