Graph of Thoughts
Reason as a graph — merge, backtrack, and recombine thought branches.
Intent & Description
🎯 Intent
Model reasoning as a directed graph where partial solutions can be merged, thoughts revisited, and successful sub-paths recombined across branches.
📋 Context
Tree of Thoughts forces a branching structure where each path is independent. Real problem-solving often discovers that two separate lines of reasoning converge on the same insight, or that a dead branch contains a useful sub-result. GoT enables that recombination.
💡 Solution
Represent the reasoning state as a graph of thought nodes. At each step, the model can: generate new child thoughts (expand), evaluate existing nodes (score), merge two nodes into a combined thought (aggregate), or backtrack to an earlier node. Use a graph traversal policy (beam search, BFS, heuristic scoring) to manage exploration. Computationally heavier than ToT — scope carefully. See also: tree-of-thoughts, chain-of-thought, adaptive-compute-allocation.
Real-world Use Case
- Complex planning tasks where sub-goals from different branches need to be combined.
- Creative or compositional tasks where partial solutions from multiple directions are valuable.
- Research-style reasoning where multiple hypotheses need to be compared and synthesized.
Source
📌 TL;DR
When tree-of-thoughts isn’t enough, go full graph — merge branches, backtrack, recombine.
Advantages
- More expressive than tree or chain structures — captures real reasoning topology.
- Partial-solution merging can find answers that pure tree search would miss.
- Backtracking and revisiting nodes avoids getting trapped in dead branches.
Disadvantages
- High computational cost — graph traversal multiplies LLM calls quickly.
- Graph state management is complex to implement correctly.
- Marginal improvement over ToT on most practical tasks; overkill for well-scoped problems.