← 返回目录

Tree of Thoughts (ToT)

第 16 / 34 卷日期:

通过生成多条思维链,并采用最常出现的答案( “ 重要 ”),我们可以从大语言模型中获得更一致且正确的回答。

此示例展示了如何通过自洽提示技术,结合多角度思考并选择最一致的答案,从而提高大语言模型响应的准确性。

Tree of Thoughts (ToT)

在熟悉思维链与自洽提示后,让我们回顾思维树( ToT)方法。12 该方法泛化了思维链提示的概念,允许大语言模型同时探索多条不同的推理路径,而非仅遵循单一线性思维链。如图 1 所示。

图 1. 左侧展示的是思维链提示的可视化效果,右侧则为思维树提示的可视化对比

全站分卷索引 · 34 卷
  1. 1Introduction
  2. 2Prompt engineering
  3. 3LLM output configuration
  4. 4Sampling controls
  5. 5Top-K and top-P
  6. 6Putting it all together
  7. 7Prompting techniques
  8. 8One-shot & few-shot
  9. 9System, contextual and role prompting
  10. 10System prompting
  11. 11Role prompting
  12. 12Contextual prompting
  13. 13Step-back prompting
  14. 14Chain of Thought (CoT)
  15. 15Self-consistency
  16. 16Tree of Thoughts (ToT)
  17. 17ReAct (reason & act)
  18. 18Automatic Prompt Engineering
  19. 19Code prompting
  20. 20Prompts for explaining code
  21. 21Prompts for translating code
  22. 22Prompts for debugging and reviewing code
  23. 23What about multimodal prompting?
  24. 24Design with simplicity
  25. 25Be specific about the output
  26. 26Control the max token length
  27. 27Experiment with input formats and writing styles
  28. 28Adapt to model updates
  29. 29JSON Repair
  30. 30Working with Schemas
  31. 31Experiment together with other prompt engineers
  32. 32CoT Best practices
  33. 33Summary
  34. 34Endnotes