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-ofThought 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.
翻译:我们提出思路图框架,其能提升大型语言模型的提示能力,使其超越思维链或思维树等范式的局限。该框架的核心思想与主要优势在于,能将大模型生成的信息建模为任意图结构——其中信息单元(即“大模型思维”)构成顶点,顶点间的依赖关系形成边。这种架构可实现:将任意大模型思维整合为协同结果,提炼整个思维网络的精华,或通过反馈循环增强思维质量。实验表明,思路图在不同任务上均优于现有技术,例如在排序任务中质量较思维树提升62%,同时成本降低超过31%。我们确保该框架具备可扩展性,支持新的思维转换,从而可用于开创全新的提示方案。这项工作使大模型推理更接近人类思维或大脑机制(如递归),两者都形成复杂的网络结构。