tree-of-thought-puzzle-solver  by jieyilong

Tree-of-Thoughts (ToT) framework demo for solving reasoning tasks using LLMs

Created 2 years ago
350 stars

Top 79.5% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This repository implements a Sudoku solver using the Tree-of-Thought (ToT) framework, designed to enhance the reasoning and problem-solving capabilities of Large Language Models (LLMs). It targets researchers and developers looking to explore advanced LLM reasoning techniques beyond standard auto-regressive generation, offering a structured approach to complex tasks.

How It Works

The ToT framework augments an LLM with specialized modules: a prompter agent, a checker, a memory module, and a ToT controller. These components orchestrate multi-round interactions with the LLM, simulating human-like trial-and-error problem-solving. This approach allows the system to explore different solution paths and backtrack when necessary, overcoming the limitations of purely sequential token generation.

Quick Start & Requirements

  • Install: Clone the repository and install dependencies via pip install -r requirements.txt.
  • Prerequisites: Python 3.9+, OpenAI API key, and a configured config.yaml file.
  • Run: Execute puzzles with python run_tot.py "puzzle_description".
  • Experiments: Compare ToT with other methods using python run_expr.py <solver_type> <data_file>.
  • Details: Large Language Model Guided Tree-of-Thought preprint

Highlighted Details

  • Implements the Tree-of-Thought (ToT) framework for LLM reasoning.
  • Includes modules for prompting, checking, memory, and control.
  • Enables backtracking and exploration of solution space.
  • Supports comparison against zero-shot, one-shot-cot, and few-shot-cot methods.

Maintenance & Community

The project is authored by Jieyi Long. Further community or maintenance details are not specified in the README.

Licensing & Compatibility

The repository does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project relies on OpenAI's API, requiring an API key and incurring associated costs. The README does not detail performance benchmarks or specific LLM compatibility beyond mentioning OpenAI models.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
5 stars in the last 30 days

Explore Similar Projects

Starred by Shizhe Diao Shizhe Diao(Author of LMFlow; Research Scientist at NVIDIA), Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research), and
7 more.

reasoning-gym by open-thought

1.2%
1k
Procedural dataset generator for reasoning models
Created 7 months ago
Updated 3 days ago
Starred by Vincent Weisser Vincent Weisser(Cofounder of Prime Intellect), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
10 more.

tree-of-thought-llm by princeton-nlp

0.3%
6k
Research paper implementation for Tree of Thoughts (ToT) prompting
Created 2 years ago
Updated 8 months ago
Feedback? Help us improve.