Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

My implementation of "Algorithm of Thoughts: Enhancing Exploration of Ideas in Large Language Models"

License

NotificationsYou must be signed in to change notification settings

kyegomez/Algorithm-Of-Thoughts

Repository files navigation

Multi-Modality

Algorithm-Of-Thoughts

DiscordTwitterLinkedInFacebookRedditHacker NewsPinterestWhatsApp

AOT BANNERThe open source implementation of "Algorithm of Thoughts: Enhancing Exploration of Ideas in Large Language Models" that increases model reasoning by nearly 80% or 10% more thanTree of thoughts!

Algorithm of Thoughts: Enhancing Exploration of Ideas in Large Language Models

Installation

pip install aot-x

Usage

fromaot.mainimportAoTtask="""Use numbers and basic arithmetic operations (+ - * /) to obtain 24. Whenconsidering the next steps, do not choose operations that will result in anegative or fractional number. In order to help with the calculations, thenumbers in the parenthesis represent the numbers that are left after theoperations and they are in descending order.Another thing we do is when there are only two numbers left in the parenthesis, wecheck whether we can arrive at 24 only by using basic arithmetic operations(+ - * /). Some examples regarding this idea:(21 2) nosince 21 + 2 = 23, 21 - 2 = 19, 21 * 2 = 42, 21 / 2 = 10.5, none of which is equalto 24.(30 6) 30 - 6 = 24 yes(8 3) 8 * 3 = 24 yes(12 8) no(48 2) 48 / 2 = 24 yesMost importantly, do not give up, all the numbers that will be given has indeed asolution.14 8 8 2OBJECTIVE#########5 10 5 2"""dfs=AoT(num_thoughts=2,max_steps=10,value_threshold=1,initial_prompt=task,openai_api_key="ENETER IN YOUR API KEY")result=dfs.solve()print(result)

Todo

  • All thoughts over 0.5 are added to cache or longterm vectorstore
  • DFS search similiar to Algorithm 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},

About

My implementation of "Algorithm of Thoughts: Enhancing Exploration of Ideas in Large Language Models"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors3

  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp