We introduce Graph of Thoughts (GoT): a framework that advances prompting capabilities in large language models (LLMs) beyond those offered by paradigms such as Chain-of-Thought or Tree of Thoughts (ToT). The key idea and primary advantage of GoT is the ability to model the information generated by an LLM as an arbitrary graph, where units of information ("LLM thoughts") are vertices, and edges correspond to dependencies between these vertices. This approach enables combining arbitrary LLM thoughts into synergistic outcomes, distilling the essence of whole networks of thoughts, or enhancing thoughts using feedback loops. We illustrate that GoT offers advantages over state of the art on different tasks, for example increasing the quality of sorting by 62% over ToT, while simultaneously reducing costs by >31%. We ensure that GoT is extensible with new thought transformations and thus can be used to spearhead new prompting schemes. This work brings the LLM reasoning closer to human thinking or brain mechanisms such as recurrence, both of which form complex networks.
翻译:我们提出思维图谱(Graph of Thoughts, GoT)框架:该框架将大型语言模型(LLM)的提示能力提升至超越思维链(Chain-of-Thought)或思维树(Tree of Thoughts, ToT)等范式的水平。GoT的核心思想与主要优势在于:能够将LLM生成的信息建模为任意图结构,其中信息单元("LLM思维")作为顶点,边表示这些顶点之间的依赖关系。该方法可实现任意LLM思维的协同组合、提炼整个思维网络的精髓,或通过反馈循环增强思维。我们证明,GoT在不同任务上均优于现有最先进方法,例如在排序任务上质量较ToT提升62%,同时成本降低超过31%。我们确保GoT可扩展集成新的思维变换,从而可用于引领新型提示方案的设计。这项工作使LLM推理更接近人类思维或递归等脑机制,二者均构成复杂网络形态。