# princeton-nlp/tree-of-thought-llm

[NeurIPS 2023] Tree of Thoughts: Deliberate Problem Solving with Large Language Models

Repository: https://github.com/princeton-nlp/tree-of-thought-llm
Canonical: https://ross.abutalabs.com/products/tree-of-thought-llm
Homepage: https://arxiv.org/abs/2305.10601
Language: Python
License: MIT
License Family: permissive
Topics: large-language-models, llm, prompting, tree-of-thoughts, tree-search
Last push: 2025-01-16T20:02:00+00:00

## Health v2 (maintenance only)
Score: 20/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 1, release rhythm 8, longevity 86
- inputs: {"age_days": 1204, "days_push": 594, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6057, forks 624 (observed 2026-08-28T04:09:34.686220+00:00)

## What it is
Official implementation of the Tree of Thoughts (ToT) framework for deliberate LLM problem solving, generalizing chain-of-thought prompting with tree search over intermediate reasoning steps. It provides the `tot` Python package with BFS/DFS search methods, thought generation and evaluation strategies, and tasks like Game of 24, Creative Writing, and Mini Crosswords.

## Use cases
- improve LLM reasoning on planning-heavy problems with tree search
- run tree-of-thoughts prompting instead of plain chain-of-thought
- solve the Game of 24 puzzle with GPT-4
- compare IO sampling, CoT sampling, and ToT search on benchmark tasks
- implement custom tasks with thought generation, evaluation, and selection
- reproduce NeurIPS 2023 Tree of Thoughts paper experiments

## When to choose
- you need deliberate multi-step reasoning with lookahead and backtracking over chain-of-thought
- you want the reference implementation of the ToT paper with prompts and model outputs
- your task benefits from exploring multiple reasoning paths and self-evaluation

## When to avoid
- you need cheap, low-latency inference since ToT makes many LLM calls per problem
- your task is simple enough that standard prompting or CoT suffices
- you need a production agent framework with tool use and memory rather than a research codebase

## Facets
- artifact type: library
- maturity: stable
- function: llm-inference, prompt-engineering, agent-framework, search-engine
- domain: large-language-models, artificial-intelligence
- platform: python, cli
- tags: tree-of-thoughts, tree-search, chain-of-thought, reasoning, bfs, dfs, research-code, neurips-2023, natural-language-processing, algorithms

## Member repositories
- princeton-nlp/tree-of-thought-llm (main) score 20

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:34.686220+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:48:54.450651+00:00, confidence not recorded.
  - readme: https://github.com/princeton-nlp/tree-of-thought-llm (fetched 2026-08-28T04:09:34.686220+00:00, sha 32f7814b5469)
  - homepage: https://arxiv.org/abs/2305.10601 (fetched 2026-08-29T08:45:09.692044+00:00, sha f10c7e9453c5)
  - site_page: https://info.arxiv.org/about/donate.html (fetched 2026-08-29T08:45:09.695934+00:00, sha cca9c3a11c56)
  - site_page: https://info.arxiv.org/about/ourmembers.html (fetched 2026-08-29T08:45:09.701006+00:00, sha 47cbc55ff1de)
  - site_page: https://info.arxiv.org/about (fetched 2026-08-29T08:45:09.704092+00:00, sha a1f16f915a9a)
  - site_page: https://info.arxiv.org/labs/index.html (fetched 2026-08-29T08:45:09.698718+00:00, sha b14a8d05a0ec)
- Data as of 2026-08-30T08:39:29.467469+00:00.
