aot-x


Nameaot-x JSON
Version 1.5.3 PyPI version JSON
download
home_pagehttps://github.com/kyegomez/Algorithm-Of-Thoughts
SummaryAlgorithm of thoughts - Pytorch
upload_time2023-09-05 21:25:39
maintainer
docs_urlNone
authorKye Gomez
requires_python>=3.6,<4.0
licenseMIT
keywords artificial intelligence deep learning optimizers prompt engineering
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Multi-Modality](agorabanner.png)](https://discord.gg/qUtxnK2NMf)

# Algorithm-Of-Thoughts
![AOT BANNER](aot.png)
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](https://arxiv.org/abs/2308.10379)

# Installation
`pip install aot-x`


# Usage
```python
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},
```
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kyegomez/Algorithm-Of-Thoughts",
    "name": "aot-x",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6,<4.0",
    "maintainer_email": "",
    "keywords": "artificial intelligence,deep learning,optimizers,Prompt Engineering",
    "author": "Kye Gomez",
    "author_email": "kye@apac.ai",
    "download_url": "https://files.pythonhosted.org/packages/d3/20/afa69917c14ef442470def68d47cef7206744b5fb5277ed182ad8df06dbb/aot_x-1.5.3.tar.gz",
    "platform": null,
    "description": "[![Multi-Modality](agorabanner.png)](https://discord.gg/qUtxnK2NMf)\n\n# Algorithm-Of-Thoughts\n![AOT BANNER](aot.png)\nThe open source implementation of \"Algorithm of Thoughts: Enhancing Exploration of Ideas in Large Language Models\"\n\n[Algorithm of Thoughts: Enhancing Exploration of Ideas in Large Language Models](https://arxiv.org/abs/2308.10379)\n\n# Installation\n`pip install aot-x`\n\n\n# Usage\n```python\nfrom aot import AoT\n\nsystem_prompt = \"\"\"\n\nUse numbers and basic arithmetic operations (+ - * /) to obtain 24. When\nconsidering the next steps, do not choose operations that will result in a\nnegative or fractional number. In order to help with the calculations, the\nnumbers in the parenthesis represent the numbers that are left after the\noperations and they are in descending order.\nAnother thing we do is when there are only two numbers left in the parenthesis, we\ncheck whether we can arrive at 24 only by using basic arithmetic operations\n(+ - * /). Some examples regarding this idea:\n(21 2) no\nsince 21 + 2 = 23, 21 - 2 = 19, 21 * 2 = 42, 21 / 2 = 10.5, none of which is equal\nto 24.\n(30 6) 30 - 6 = 24 yes\n(8 3) 8 * 3 = 24 yes\n(12 8) no\n(48 2) 48 / 2 = 24 yes\nMost importantly, do not give up, all the numbers that will be given has indeed a\nsolution.\n\n14 8 8 2\n\"\"\"\n\n\ntask = \"5 10 5 2 \"\n\n\naot = AoT(task=task, system_prompt=system_prompt)\naot.run()\n```\n\n# Todo\n- [ ] All thoughts over 0.5 are added to cache or longterm vectorstore \n- [ ] DFS search similiar to tree of thoughts\n- [ ] Propose solutions function\n- [ ] Backtrack to nearest successful states\n- [ ] Implement evaluation strategy similiar to tot with [0.0, 1.0]\n- [ ] Working demo: Conducts search then backtracks through states, provide visuals green text\n- [ ] Streamlit demo\n\n\n## Citation\n```\n@misc{2308.10379,\nAuthor = {Bilgehan Sel and Ahmad Al-Tawaha and Vanshaj Khattar and Lu Wang and Ruoxi Jia and Ming Jin},\nTitle = {Algorithm of Thoughts: Enhancing Exploration of Ideas in Large Language Models},\nYear = {2023},\n```",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Algorithm of thoughts - Pytorch",
    "version": "1.5.3",
    "project_urls": {
        "Homepage": "https://github.com/kyegomez/Algorithm-Of-Thoughts",
        "Repository": "https://github.com/kyegomez/Algorithm-Of-Thoughts"
    },
    "split_keywords": [
        "artificial intelligence",
        "deep learning",
        "optimizers",
        "prompt engineering"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "86840d999ef9f086da884ea725a36d2b4d92cec37019fe03bdb4da877776b2d5",
                "md5": "4882e20c8d2a4585cc894ba30c91af38",
                "sha256": "9b91f9ab68ff9381f320af32ed1b73ab912a8e015d2d5b4e63d85d29e3f6b07c"
            },
            "downloads": -1,
            "filename": "aot_x-1.5.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4882e20c8d2a4585cc894ba30c91af38",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6,<4.0",
            "size": 6744,
            "upload_time": "2023-09-05T21:25:38",
            "upload_time_iso_8601": "2023-09-05T21:25:38.400551Z",
            "url": "https://files.pythonhosted.org/packages/86/84/0d999ef9f086da884ea725a36d2b4d92cec37019fe03bdb4da877776b2d5/aot_x-1.5.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d320afa69917c14ef442470def68d47cef7206744b5fb5277ed182ad8df06dbb",
                "md5": "d102cef21dece362491ad2963d5b8682",
                "sha256": "831607d89ce72e8508e0d917e51d637e6328c04d87de91b1c0cfbbd96422800d"
            },
            "downloads": -1,
            "filename": "aot_x-1.5.3.tar.gz",
            "has_sig": false,
            "md5_digest": "d102cef21dece362491ad2963d5b8682",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6,<4.0",
            "size": 6551,
            "upload_time": "2023-09-05T21:25:39",
            "upload_time_iso_8601": "2023-09-05T21:25:39.975862Z",
            "url": "https://files.pythonhosted.org/packages/d3/20/afa69917c14ef442470def68d47cef7206744b5fb5277ed182ad8df06dbb/aot_x-1.5.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-05 21:25:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kyegomez",
    "github_project": "Algorithm-Of-Thoughts",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "aot-x"
}
        
Elapsed time: 0.15686s