tree-of-thought-puzzle-solver  by jieyilong

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

created 2 years ago
345 stars

Top 81.4% on sourcepulse

GitHubView on GitHub
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

11 months ago

Responsiveness

1+ week

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

Explore Similar Projects

Feedback? Help us improve.