graph-of-thoughts

Official Implementation of "Graph of Thoughts: Solving Elaborate Problems with Large Language Models"

What is graph-of-thoughts?

Official Implementation of "Graph of Thoughts: Solving Elaborate Problems with Large Language Models"

Overview of graph-of-thoughts

What it is

Graph of Thoughts (GoT) is the official implementation of the paper “Graph of Thoughts: Solving Elaborate Problems with Large Language Models.” It is a framework that models complex problems as a Graph of Operations (GoO) and automatically executes that graph using a Large Language Model (LLM) as the engine. The framework is designed to be flexible and extensible, allowing users to implement GoOs that resemble previous approaches such as Chain-of-Thought (CoT) or Tree-of-Thoughts (ToT).

Key features

  • Models problems as a Graph of Operations (GoO) and executes them with an LLM.
  • Flexible and extensible design; can implement GoOs resembling CoT or ToT.
  • Includes examples for problems like sorting and keyword counting.
  • Provides Controller and Operations modules for managing execution.
  • Code is fully documented to aid understanding and extension.
  • Paper results can be reproduced using the provided examples and paper directory.

Use cases

The framework is intended for solving elaborate problems that can be represented as a graph of operations, such as sorting lists of numbers, keyword counting in text, and other complex reasoning tasks that benefit from structured, multi-step LLM interactions.

Getting started

Install the package via pip: bash pip install graph_of_thoughts For development, clone the repository and install in editable mode: bash git clone https://github.com/spcl/graph-of-thoughts.git cd graph-of-thoughts pip install -e . After installation, configure an LLM by following the instructions in the Controller README. Quick-start code examples for sorting problems (using both CoT-like and GoT approaches) are provided in the repository README.

License and pricing

The license is not stated in the repository metadata. The software is listed as open source and free to use.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/spclgraph-of-thoughts.svg)](https://yunodb.com/tools/spclgraph-of-thoughts?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/spclgraph-of-thoughts?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/spclgraph-of-thoughts.svg" alt="Featured on YunoDB" height="20"></a>