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