Pure Graph of Thoughts
Project description
Pure Graph of Thoughts
This is the official implementation of Pure Graph of Thoughts, a new implementation of the Graph of Thoughts concepts.
Graph of Thoughts was originally introduced in the paper Graph of Thoughts: Solving Elaborate Problems with Large Language Models. The official implementation of the paper's proposed API can be found here: https://github.com/spcl/graph-of-thoughts.
The pure_graph_of_thoughts
package does not conform the API proposed by the original paper nor is it a fork of it.
It aims for a more automation-friendly implementation of the general concept of Graph of Thoughts,
where both construction and traversal of a graph can be handled iteratively.
Some key differences and restrictions:
- Operations and thoughts are represented independently of their graph structure.
- As a user-facing API, operations can be defined in a declarative way over a typed and validated data structure (DSL).
- There is a strict distinction between a prompt operation executed by a language model and a code execution operation.
- To simplify parsing logic and to ensure consistent results, the JSON format is used for communication with the language model.
- The scoring is now part of an operation involving a prompt, rather than being a standalone operation that can be added arbitrarily. While this simplifies the automation process, it restricts the user's possibility of adding a validation operation.
Setup Guide
To run this code, Python 3.11
or newer is required.
The latest version of the package can be installed from PyPI:
pip install pure-graph-of-thoughts
Alternatively, the package can be installed from source.
Optional Dependencies
The project comes with optional dependencies which are required for some features.
Graph Visualization
To visualize the graphs by using pure_graph_of_thoughts.visualization
,
the optional visualization
dependencies are required.
pip install pure-graph-of-thoughts[visualization]
For a cleaner, hierarchical visualization, add dot-visualization
.
pip install pure-graph-of-thoughts[visualization,dot-visualization]
Be aware that dot-visualization
requires the GraphViz library to be installed.
Examples
An example task definition is provided together with a notebook
that shows the graph construction and execution.
To run the notebook, the optional notebooks
dependencies are required.
pip install pure-graph-of-thoughts[notebooks]
Be aware that the examples are not part of the distributed package on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pure_graph_of_thoughts-1.2.0.tar.gz
.
File metadata
- Download URL: pure_graph_of_thoughts-1.2.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 411acb839024f354b1a78628e51aedadc54c5b7a4edef264b55e1664eb8c4a52 |
|
MD5 | a5da48d9ef20eed8c47b7b70924273b0 |
|
BLAKE2b-256 | fe2ad9ae159ea86f39bea263d4f221f14e9f2290a845cfb4ee06acbf66fada50 |
Provenance
The following attestation bundles were made for pure_graph_of_thoughts-1.2.0.tar.gz
:
Publisher:
publish.yml
on mriesen/pure-graph-of-thoughts
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pure_graph_of_thoughts-1.2.0.tar.gz
- Subject digest:
411acb839024f354b1a78628e51aedadc54c5b7a4edef264b55e1664eb8c4a52
- Sigstore transparency entry: 145593093
- Sigstore integration time:
- Predicate type:
File details
Details for the file pure_graph_of_thoughts-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: pure_graph_of_thoughts-1.2.0-py3-none-any.whl
- Upload date:
- Size: 40.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 566ee7c8f174c132a518c988d9c2593d02f502a390f51925a43f7415f0a38031 |
|
MD5 | d957440521323ca9c644b63cf6ec899e |
|
BLAKE2b-256 | 7a4ace0d2566273f5b362cf25783eb3b3660cc455ccf70e7f4178f0fe6d19d1a |
Provenance
The following attestation bundles were made for pure_graph_of_thoughts-1.2.0-py3-none-any.whl
:
Publisher:
publish.yml
on mriesen/pure-graph-of-thoughts
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pure_graph_of_thoughts-1.2.0-py3-none-any.whl
- Subject digest:
566ee7c8f174c132a518c988d9c2593d02f502a390f51925a43f7415f0a38031
- Sigstore transparency entry: 145593095
- Sigstore integration time:
- Predicate type: