Tree-of-of-of-of-of-foughtsのフレームワークからアイデアを借りる新鮮なテクニックであるプロンプトは、確立された紹介の促進概念を広げて強化するため、ChatGPTのような大規模な言語モデルが優れた推論能力を示すことを可能にします。この思考の概要プロンプトテクニックにより、大規模な言語モデルは、知識を徐々に蓄積しながら、エラーを自律的に修正することができます。
一例では、TOTプロンプトにより、ChatGPT 3.5の推論能力が改善され、以前はChatGPT 4でのみ回答できる質問に答えました。
大規模な言語モデル(LLM)は、特定のタイプの複雑な質問に答えるのに苦労しています。これが代表的な例です:
Bob is in the living room.
He walks to the kitchen, carrying a cup.
He puts a ball in the cup and carries the cup to the bedroom.
He turns the cup upside down, then walks to the garden.
He puts the cup down in the garden, then walks to the garage.
Where is the ball?
正解は、ボールが寝室にあるということです。 LLMは非決定的ですが、いくつかの試みで受け取った回答は次のとおりでした。
「思考のチェーンプロンプト」として知られる広く認識されている概念(略してCOT)が存在し、大規模な言語モデル(LLM)が思考プロセスを解明することを奨励し、それによって正しい応答の可能性を高めます。この概念のルーツは、2022年1月から紙にまでさかのぼることができます。
コアでは、コットテクニックをプロンプトに次のように追加することで実装できます。
Think carefully and logically, explaining your answer.
このアプローチは、多くの質問に答える際にLLMSのパフォーマンスを向上させますが、その有効性は異なります。
ChatGPT 3.5の応答の例は次のとおりです。
Based on the given sequence of events, we can logically determine the location of the ball. Let's analyze each step:
1. Bob is in the living room.
- No mention of the ball in the living room.
2. Bob walks to the kitchen, carrying a cup.
- No mention of the ball in the kitchen yet.
3. Bob puts a ball in the cup.
- The ball is now inside the cup.
4. Bob carries the cup to the bedroom.
- The ball is still inside the cup.
5. Bob turns the cup upside down.
- If the ball was inside the cup, it would have fallen out when Bob turned it upside down.
6. Bob walks to the garden.
- Bob left the cup in the garden, but there is no mention of the ball being removed from the cup.
7. Bob puts the cup down in the garden.
- The ball, if it was in the cup, would still be in the cup in the garden.
8. Bob walks to the garage.
- No mention of the ball being taken to the garage.
Based on the given information, we can conclude that the ball is still inside the cup in the garden.
ChatGptがステップ5でボールが落ちたことに気付いたことを確認できますが、それでも答えが正しくありませんでした。
ChatGpt 4に頼らずに、もっと良いことができますか?
最近数週間で、いくつかの論文とPythonリポジトリの出現が見られました。
根本的な原則は、LLMに、進行するにつれて自己評価しながら、推論の複数の枝を探求する機会を提供することです。参照された論文によると、このアプローチは特定の問題に非常に効果的であるようです。
Tree-of-Of-Ofteverのフレームワークを議論する既存の論文は、通常はPythonを介してLLMに複数の呼び出しを行うことを前提としているようです。考え方の推論の主な利点の1つは、ChatGptで1つの文のプロンプトで達成できることです。
これにより、私は熟考しました:トットスタイルのプロンプトを利用して、COTの結果を改善できますか?
これが私が使用したプロンプトです:
Imagine three different experts are answering this question.
All experts will write down 1 step of their thinking,
then share it with the group.
Then all experts will go on to the next step, etc.
If any expert realises they're wrong at any point then they leave.
The question is...
そして、これがCHATGTP 3.5からの応答です:
Expert 1: The ball is in the living room.
Expert 2: The ball is in the kitchen.
Expert 3: The ball is in the bedroom.
Expert 1: Bob carries the cup to the bedroom, so the ball must be in the cup.
Expert 2: Oh, I see my mistake. Yes, the ball is in the cup.
Expert 3: Agreed, the ball is in the cup in the bedroom.
Expert 1: Next, Bob turns the cup upside down in the bedroom.
Expert 2: After that, Bob walks to the garden and puts the cup down.
Expert 3: Therefore, the ball must have fallen out of the cup when Bob turned it upside down in the bedroom. So, the ball is in the bedroom, not in the cup anymore.
Expert 1: Oh, you're right. I made a mistake. The ball is in the bedroom, not in the cup.
Expert 2: Agreed, the ball is in the bedroom.
Expert 3: Bob then walks to the garage, so the ball remains in the bedroom. It is not in the garden or the garage.
Expert 1: Absolutely, the ball is still in the bedroom.
Expert 2: Yes, the ball hasn't moved from the bedroom.
Expert 3: Therefore, the ball is in the bedroom, not in the garden or the garage.
All three experts agree that the ball is in the bedroom.
今回のChatGpt 3.5が答えを正しくする方法を見ることができます!
パフォーマンスを改善するためのプロンプトを改良する余地があり、より簡潔な応答につながる可能性があります。
他のプロンプトで成功を収めた場合は、PRを提出して、 tree-of-thought-prompts.txtに追加することを歓迎します。
思考の枠組みは、複数の利害関係者が関与する組織の意思決定プロセスに似ています。構造は、コンセンサスと思考の多様性をエミュレートしようとします。
効果は、タスクのさまざまな部分を処理するように調整された複数のエージェントを使用して拡張できます。 AutoGptはこの良い例であり、目標に対してLLM計画を自己評価します。専門化または完全に異なるLLMに異なる調整されたLLMを使用すると、思考の多様性が高まります。これらのLLMは、異なるモードで相互作用する可能性があります(チームトポロジの用語を使用して):
パフォーマンスの高いチームは、多くの場合、意思決定で個人よりも優れています。したがって、他の組織構造と特性を採用することでLLMのパフォーマンスが向上する可能性があると考えられます。思考、専門化、コンセンサスの多様性に加えて、私たちはエミュレートできるかもしれません。
コードを使用する場合は、このリポジトリを引用してください。
@misc{tree-of-thought-prompting,
title = {Using Tree-of-Thought Prompting to boost ChatGPT's reasoning},
author = {Dave Hulbert},
year = 2023,
month = may,
journal = {GitHub repository},
publisher = {Zenodo},
doi = {10.5281/ZENODO.10323452},
url = {https://doi.org/10.5281/zenodo.10323452},
howpublished = {url{https://github.com/dave1010/tree-of-thought-prompting}}
}