{"data":{"slug":"princeton-nlp-tree-of-thought-llm","name":"tree-of-thought-llm","tagline":"[NeurIPS 2023] Tree of Thoughts: Deliberate Problem Solving with Large Language Models","github_url":"https://github.com/princeton-nlp/tree-of-thought-llm","owner":"princeton-nlp","repo":"tree-of-thought-llm","owner_avatar_url":"https://avatars.githubusercontent.com/u/44678448?v=4","primary_language":"Python","stars":6048,"forks":624,"topics":["large-language-models","llm","prompting","tree-of-thoughts","tree-search"],"archived":false,"github_pushed_at":"2025-01-16T20:02:00+00:00","maintenance_label":"Dormant","stars_delta_30d":18,"url":"https://www.graphcanon.com/tools/princeton-nlp-tree-of-thought-llm","markdown_url":"https://www.graphcanon.com/tools/princeton-nlp-tree-of-thought-llm.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/princeton-nlp-tree-of-thought-llm","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=princeton-nlp-tree-of-thought-llm","description":"[NeurIPS 2023] Tree of Thoughts: Deliberate Problem Solving with Large Language Models","homepage_url":"https://arxiv.org/abs/2305.10601","license":"MIT","open_issues":8,"watchers":120,"ai_summary":"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.","readme_excerpt":"## Quick Start\nThe 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):\n```python\nimport argparse\nfrom tot.methods.bfs import solve\nfrom tot.tasks.game24 import Game24Task\n\nargs = 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)\n\ntask = Game24Task()\nys, infos = solve(args, task, 900)\nprint(ys[0])\n```\n\nAnd the output would be something like (note it's not deterministic, and sometimes the output can be wrong):\n```\n10 - 4 = 6 (left: 5 6 6)\n5 * 6 = 30 (left: 6 30)\n30 - 6 = 24 (left: 24)\nAnswer: (5 * (10 - 4)) - 6 = 24\n```","github_created_at":"2023-05-17T20:24:56+00:00","created_at":"2026-07-07T17:34:44.787114+00:00","updated_at":"2026-08-17T12:01:06.723653+00:00","categories":[{"slug":"llm-frameworks","name":"LLM Frameworks","url":"https://www.graphcanon.com/categories/llm-frameworks","markdown_url":"https://www.graphcanon.com/categories/llm-frameworks.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/llm-frameworks"},{"slug":"model-training","name":"Model Training","url":"https://www.graphcanon.com/categories/model-training","markdown_url":"https://www.graphcanon.com/categories/model-training.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/model-training"}],"tags":[{"slug":"large-language-models","name":"large language models"},{"slug":"llm","name":"llm"},{"slug":"prompting","name":"prompting"},{"slug":"tree-of-thoughts","name":"tree-of-thoughts"},{"slug":"tree-search","name":"tree-search"}],"trust":{"provenance":{"is_fork":false,"github_id":642099326,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-08-17T12:01:05.837Z","maintenance":{"label":"Dormant","score":18,"methodology":"github_public_v1","releases_90d":0,"days_since_push":577,"last_release_at":"2023-07-06T00:51:07Z","stars_delta_30d":18,"open_issues_delta_30d":0},"security_summary":{"status":"findings","scanner":"osv@v1","low_count":90,"high_count":0,"last_scan_at":"2026-07-11T11:03:55.850Z","medium_count":0,"scan_profile":"deps","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-08-17T12:01:06.386Z"},"languages":{"value":["python"],"source":"github.language+pyproject.toml","observed_at":"2026-08-17T12:01:06.386Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-08-17T12:01:06.386Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":{"min_ram_gb":4,"requires_docker":false},"constraints":{"min_ram_gb":4,"requires_docker":false},"when_to_use":["- 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."],"when_not_to_use":["- 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."],"source":"enrich:decision_facts","observed_at":"2026-07-12T14:33:03.314Z"},"constraint_facets":{"min_ram_gb":4,"requires_docker":false},"decision_summary":[{"label":"Requirements","value":"Min 4 GB RAM"},{"label":"Adopt for","value":"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."}]}}