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 的推理更接近人类思维或大脑机制(如循环),两者均构成复杂网络。