การกระตุ้นด้วยความคิดต้นไม้แห่งความคิด (TOT) ซึ่งเป็นเทคนิคการกู้ยืมที่สดใหม่จากกรอบต้นไม้แห่งความคิดกว้างขึ้นและเพิ่มแนวคิดการแจ้งเตือนห่วงโซ่ที่ได้รับการยอมรับเป็นอย่างดี เทคนิคการแจ้งเตือนแบบต้นไม้แห่งนี้ช่วยให้แบบจำลองภาษาขนาดใหญ่สามารถแก้ไขข้อผิดพลาดได้อย่างอิสระในขณะที่สะสมความรู้อย่างต่อเนื่อง
ในตัวอย่างหนึ่งการแจ้งเตือน TOT ปรับปรุงความสามารถในการใช้เหตุผลของ CHATGPT 3.5 ในการตอบคำถามที่สามารถตอบได้ก่อนหน้านี้โดย CHATGPT 4
แบบจำลองภาษาขนาดใหญ่ (LLMS) มักจะดิ้นรนเพื่อตอบคำถามที่ซับซ้อนบางประเภท นี่คือตัวอย่างตัวแทน:
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 จะไม่ได้กำหนด แต่การตอบสนองที่ฉันได้รับในระหว่างการพยายามหลายครั้งมีดังนี้:
แนวคิดที่ได้รับการยอมรับอย่างกว้างขวางที่รู้จักกันในชื่อ รากเหง้าของแนวคิดนี้สามารถย้อนกลับไปที่กระดาษได้ตั้งแต่เดือนมกราคม 2565 ชื่อ: โซ่แห่งความคิดกระตุ้นให้เกิดการให้เหตุผลในรูปแบบภาษาขนาดใหญ่
ที่สำคัญของมันเทคนิค COT สามารถนำไปใช้ได้โดยการเพิ่มสิ่งที่คล้ายกับสิ่งต่อไปนี้ลงในพรอมต์:
Think carefully and logically, explaining your answer.
วิธีการนี้ช่วยเพิ่มประสิทธิภาพของ LLM ในการตอบคำถามมากมายแม้ว่าประสิทธิภาพจะแตกต่างกันไป
นี่คือตัวอย่างของการตอบกลับของ 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 แนะนำแนวคิดของต้นไม้แห่งความคิด (TOT):
หลักการพื้นฐานคือการให้โอกาส LLM ในการสำรวจการใช้เหตุผลหลายสาขาในขณะที่ประเมินตนเองตามที่ดำเนินไป ตามเอกสารอ้างอิงวิธีการนี้ดูเหมือนจะมีประสิทธิภาพสูงสำหรับปัญหาบางอย่าง
เอกสารที่มีอยู่การพูดคุยเกี่ยวกับกรอบการทำงานของต้นไม้แห่งความคิดนั้นปรากฏว่ามีการตั้งค่าการโทรหลายครั้งไปยัง LLM โดยทั่วไปผ่าน Python หนึ่งในข้อได้เปรียบหลักของการใช้เหตุผลที่ใช้ความคิดของห่วงโซ่คือสามารถทำได้ด้วยการพูดคุยกับ CHATGPT ในประโยคเดียว
สิ่งนี้ทำให้ฉันต้องไตร่ตรอง: เราสามารถปรับปรุงผลลัพธ์ของ 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}}
}