Tree of Thoughts (ToT)
通过生成多条思维链,并采用最常出现的答案( “ 重要 ”),我们可以从大语言模型中获得更一致且正确的回答。
此示例展示了如何通过自洽提示技术,结合多角度思考并选择最一致的答案,从而提高大语言模型响应的准确性。
Tree of Thoughts (ToT)
在熟悉思维链与自洽提示后,让我们回顾思维树( ToT)方法。12 该方法泛化了思维链提示的概念,允许大语言模型同时探索多条不同的推理路径,而非仅遵循单一线性思维链。如图 1 所示。
图 1. 左侧展示的是思维链提示的可视化效果,右侧则为思维树提示的可视化对比
全站分卷索引 · 34 卷
- 1Introduction
- 2Prompt engineering
- 3LLM output configuration
- 4Sampling controls
- 5Top-K and top-P
- 6Putting it all together
- 7Prompting techniques
- 8One-shot & few-shot
- 9System, contextual and role prompting
- 10System prompting
- 11Role prompting
- 12Contextual prompting
- 13Step-back prompting
- 14Chain of Thought (CoT)
- 15Self-consistency
- 16Tree of Thoughts (ToT)
- 17ReAct (reason & act)
- 18Automatic Prompt Engineering
- 19Code prompting
- 20Prompts for explaining code
- 21Prompts for translating code
- 22Prompts for debugging and reviewing code
- 23What about multimodal prompting?
- 24Design with simplicity
- 25Be specific about the output
- 26Control the max token length
- 27Experiment with input formats and writing styles
- 28Adapt to model updates
- 29JSON Repair
- 30Working with Schemas
- 31Experiment together with other prompt engineers
- 32CoT Best practices
- 33Summary
- 34Endnotes