Algorithm-Of-Thoughts
The open source implementation of "Algorithm of Thoughts: Enhancing Exploration of Ideas in Large Language Models"
Algorithm of Thoughts: Enhancing Exploration of Ideas in Large Language Models
Installation
pip install aot-x
Usage
from aot import AoT
system_prompt = """
Use numbers and basic arithmetic operations (+ - * /) to obtain 24. When
considering the next steps, do not choose operations that will result in a
negative or fractional number. In order to help with the calculations, the
numbers in the parenthesis represent the numbers that are left after the
operations and they are in descending order.
Another thing we do is when there are only two numbers left in the parenthesis, we
check whether we can arrive at 24 only by using basic arithmetic operations
(+ - * /). Some examples regarding this idea:
(21 2) no
since 21 + 2 = 23, 21 - 2 = 19, 21 * 2 = 42, 21 / 2 = 10.5, none of which is equal
to 24.
(30 6) 30 - 6 = 24 yes
(8 3) 8 * 3 = 24 yes
(12 8) no
(48 2) 48 / 2 = 24 yes
Most importantly, do not give up, all the numbers that will be given has indeed a
solution.
14 8 8 2
"""
task = "5 10 5 2 "
aot = AoT(task=task, system_prompt=system_prompt)
aot.run()
Todo
- All thoughts over 0.5 are added to cache or longterm vectorstore
- DFS search similiar to tree of thoughts
- Propose solutions function
- Backtrack to nearest successful states
- Implement evaluation strategy similiar to tot with [0.0, 1.0]
- Working demo: Conducts search then backtracks through states, provide visuals green text
- Streamlit demo
Citation
@misc{2308.10379,
Author = {Bilgehan Sel and Ahmad Al-Tawaha and Vanshaj Khattar and Lu Wang and Ruoxi Jia and Ming Jin},
Title = {Algorithm of Thoughts: Enhancing Exploration of Ideas in Large Language Models},
Year = {2023},
Metadata
Release files for aot-x 1.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aot_x-1.5.3.tar.gz | 6.6 kB | Without provenance | Details for aot_x-1.5.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aot_x-1.5.3-py3-none-any.whl | Python 3 | none | any | Details for aot_x-1.5.3-py3-none-any.whl |
Total release size: 13.3 kB
Release files / aot_x-1.5.3.tar.gz
| Download URL | aot_x-1.5.3.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
831607d89ce72e8508e0d917e51d637e6328c04d87de91b1c0cfbbd96422800d
|
|
BLAKE2b-256 checksum How to use checksums |
d320afa69917c14ef442470def68d47cef7206744b5fb5277ed182ad8df06dbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0
|
Release files / aot_x-1.5.3-py3-none-any.whl
| Download URL | aot_x-1.5.3-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b91f9ab68ff9381f320af32ed1b73ab912a8e015d2d5b4e63d85d29e3f6b07c
|
|
BLAKE2b-256 checksum How to use checksums |
86840d999ef9f086da884ea725a36d2b4d92cec37019fe03bdb4da877776b2d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0
|
Security for aot-x 1.5.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.