kyegomez/tree-of-thoughts

Plug in and Play Implementation of Tree of Thoughts: Deliberate Problem Solving with Large Language Models that Elevates Model Reasoning by atleast 70%

View on GitHub ↗Jump to charts ↓Open shareable report →

kyegomez/tree-of-thoughts has 4.5k+ stars and 350+ forks on GitHub, is written in Python, and was last pushed on Sep 29, 2026. Data as of . Signed-in members get hourly updates — create a free account.

Summary Information

Updated 22 minutes ago
Added to GitGenius on September 28th, 2026
Created on May 21st, 2023
Open Issues & Pull Requests: 8 (+0)
GitHub issues: Enabled
Number of forks: 374
Total Stargazers: 4,593 (+0)
Total Subscribers: 48 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 11.2 days
Mean response time: 131.3 days
90th percentile: 739.8 days
Tracked items: 19

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 0
New in 7 days: 0
Closed in 7 days: 0
Avg open age: N/A days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

Sign in to see which issues are moving.
Sign in

Detailed Description

Tree of Thoughts is a Python library that implements a reasoning framework for large language models based on deliberate problem-solving through search rather than single-pass generation.

The tool addresses the limitation of language models that generate answers in one forward pass by introducing a tree-search approach. Instead of committing to the first response, the model proposes multiple candidate next steps at each node, evaluates each candidate with a numerical score, prunes branches that fall below a confidence threshold, and backtracks when a reasoning path fails. The implementation uses function calling validated against Pydantic schemas to ensure structured output at every step, eliminating free-form text parsing during search. Candidates at the same tree level execute concurrently to reduce latency.

Developers should adopt this tool when working on complex reasoning tasks where a single-pass approach produces poor results. The framework suits problems requiring deliberate exploration of solution space, such as puzzles, planning, or multi-step logical reasoning. It works with any language model that supports function calling through LiteLLM, including GPT-4, Claude, and Groq models. The search strategy is configurable: breadth-first with beam search for exploring many options at each level, or depth-first with backtracking for following promising paths deeper. Evaluation can score candidates independently or compare them through voting.

The project maintains active development with regular updates to the codebase and responsive issue handling. The implementation has been integrated into a broader framework, with documentation and examples kept current to reflect this evolution. The tool includes comprehensive configuration options allowing users to tune generation strategy, evaluation method, search algorithm, and pruning thresholds for different problem types.