Research paper implementation for Tree of Thoughts (ToT) prompting
Top 9.4% on sourcepulse
This repository provides the official implementation for the "Tree of Thoughts" (ToT) framework, enabling large language models (LLMs) to engage in deliberate problem-solving. It is designed for researchers and practitioners looking to enhance LLM reasoning capabilities beyond standard prompting methods, offering a structured approach to complex tasks.
How It Works
ToT introduces a framework that allows LLMs to explore multiple reasoning paths, akin to a search tree. It decomposes problems into intermediate thoughts, evaluates their potential, and uses search algorithms (like Breadth-First Search or Depth-First Search) to navigate these thought trees. This deliberate exploration and evaluation process aims to improve performance on tasks requiring strategic planning and complex reasoning.
Quick Start & Requirements
pip install tree-of-thought-llm
git clone https://github.com/princeton-nlp/tree-of-thought-llm && cd tree-of-thought-llm && pip install -r requirements.txt && pip install -e .
OPENAI_API_KEY
environment variable.Highlighted Details
propose
/sample
, value
/vote
).Maintenance & Community
The project is associated with Princeton NLP and the authors of the NeurIPS 2023 paper. Contact is available via email (shunyuyao.cs@gmail.com) or GitHub issues.
Licensing & Compatibility
The repository does not explicitly state a license in the provided README. Users should verify licensing terms for commercial or closed-source use.
Limitations & Caveats
The README notes that reproduced experiments for Game of 24 achieved a 69% score, down from the paper's reported 74%, attributed to GPT decoding randomness. The original experiment was conducted in a notebook, and aggregation of multiple runs is planned to account for sampling variability.
6 months ago
Inactive