Beyond the Tree: Merging and Refining
Tree of Thoughts (ToT) constrains reasoning to the shape of a tree: each candidate reasoning step (the paper says a thought) has a single parent, and information flows only downward from parent to children. That is already much better than a linear chain-of-thought (CoT), but it stays limited. What if two exploration branches have each found a piece of the solution and need to be combined? A tree cannot express that: its branches never rejoin.
Graph of Thoughts (GoT) lifts the restriction. Reasoning becomes a directed graph (a set of nodes joined by arrows, with no obligation to fan out from a single root) in which thoughts can:
- Combine multiple previous thoughts (branch merging)
- Be improved iteratively (refinement loop)
- Form loops (return to an earlier step with new information)
The most vivid analogy: Tree of Thoughts is like exploring a maze by taking paths that diverge but never reconverge. Graph of Thoughts is like a team of researchers who explore different leads, share their findings, and combine their results to arrive at a solution that none of them would have found alone.
Graph of Thoughts: Solving Elaborate Problems with Large Language Models (Besta et al., 2023)In a tree, information flows strictly from parent to children, branches are isolated. In a graph, you can merge divergent branches, refine ideas through iteration, and loop to correct errors. It's a strictly richer and more flexible structure, capable of modeling reasoning that a tree simply cannot express.

The Four Fundamental Operations
GoT defines four atomic operations that, when combined, can build any reasoning pattern:
Generate (Branching): create multiple candidate thoughts from a parent thought. It's the same operation as in ToT, exploring multiple directions.
Aggregate (merging): combine two or more thoughts into one. This is the operation ToT lacked, and it is what makes divide-and-conquer possible: split a problem into sub-problems, solve each on its own, then glue the partial solutions back together.
Thought A: Marketing budget = 50K€ Thought B: Expected ROI = 3.2× → Aggregation: Expected revenue =

Refine (improving): take an existing thought, critique it, and produce a better version. It is a self-correction loop in which the large language model (LLM) plays writer and reviewer in turn.
v1: Merge sort = → Critique: Merge sort splits then recombines; it is not quadratic. → v2: Merge sort =
The notation says how computation time grows as the amount of data grows, ignoring constant factors. Here is the number of elements to sort. means "doubling the list quadruples the time"; means "doubling the list a little more than doubles the time". On a million elements the gap between the two is a factor of roughly fifty thousand. The error corrected in the example is not a matter of vocabulary.
Score (evaluation): attach a quality score to a thought in order to guide what happens next. Same mechanism as in ToT (the question is put back to the model) but applicable to any node in the graph, including one produced by a merge.
GoT Architecture in Practice
Here's how GoT solves a problem concretely:
- Problem arrives and generates Thought 1a, 1b, 1c in parallel (Generate)
- Each thought is developed: 1a produces 2a, 1b produces 2b, 1c produces 2c (Generate)
- Aggregation: results 2a, 2b, 2c are merged into a synthetic thought (Aggregate)
- Refinement: the merged thought is critiqued and improved (Refine)
- Evaluation and Final Solution (Score)
The fundamental difference from a tree: branches recombine. This is exactly the pattern of algorithmic divide-and-conquer, divide the problem, solve the parts, merge the results. Merge sort is the perfect example: divide the list, sort the halves, merge the sorted lists.
The Controller: The Orchestration Brain
A controller orchestrates the operations and dynamically decides the next step:
- Analyze the current state of the graph (which thoughts exist, their scores, the connections)
- Decide which operation to apply: generate, aggregate, refine, or score
- Select the target thoughts for the operation
- Check stopping conditions (solution found, budget exhausted, convergence)
The controller can be the model itself (flexible, but you pay tokens for every orchestration decision) or a hand-written algorithm, less flexible but predictable and free. In practice the two get mixed: programmed rules for the overall structure, the model for fine-grained decisions.
That distinction is not idle for anyone comparing two systems. A graph fixed in advance in code and a graph built at run time by the model are two very different mechanisms, even when the displayed result is the same.
Precision matters here, because this claim gets mangled in the retelling. The paper's abstract says exactly this: GoT increases "the quality of sorting by 62% over ToT, while simultaneously reducing costs by >31%".
Three clarifications change how that sentence should be read.
It is not a success rate. It does not mean "62% of lists come out correctly sorted". It is a relative reduction in errors against ToT. The paper does not tally lists as passed or failed: for each list produced it counts how many elements are out of place, the number of adjacent pairs in the wrong order, plus the gaps between how often each digit should appear and how often it does. On 128-number lists, it is the median error count that drops by roughly 69% against ToT.
Here GoT is cheaper than ToT, not more expensive. That is counter-intuitive, and it is the second half of the sentence: over 31% less cost. Because a graph lets you merge partial results instead of expanding, scoring and then discarding whole branches.
The model is GPT-3.5. The authors state that their budget did not allow rerunning the experiments on other models. A result obtained on a 2023 model does not transfer as-is to today's reasoning models, whose weak spot is no longer in the same place.
None of this diminishes the result: sorting is GoT's ideal case, because it decomposes naturally into independent sub-problems whose solutions glue back together, that is merge sort exactly. But the reading grid still applies, the one in how to read a benchmark score: which measure, on which model, compared against what.
Concrete Use Cases
Decomposable problems: any problem that naturally divides into independent sub-problems to recombine.
- Data sorting and merging
- Multi-criteria analysis (each criterion evaluated separately, then synthesis)
- Project planning (parallel sub-tasks, then coordination)
Collaborative writing: each branch generates a paragraph or section. Aggregation produces a coherent text. Refinement improves fluidity and corrects inconsistencies between sections. It's like an automated editorial process.
Debugging: generate bug hypotheses in parallel (Generate), test each one (Score), combine diagnostics (Aggregate), refine the final diagnosis (Refine). The graph naturally captures the process of elimination and synthesis.
Comparison of Reasoning Paradigms
| Paradigm | Structure | Operations | Calls to the model | Best for |
|---|---|---|---|---|
| Chain-of-thought | Chain | Sequential | 1 | Simple, fast |
| Majority voting | Independent chains | Generate + vote | N (one per sample) | Robustness to randomness |
| ToT | Tree | Branch + prune | A few dozen | Exploration with backtracking |
| GoT | Graph | Branch + merge + refine | A few dozen | Problems that split and glue back |
That last column is deliberately vague, and honestly so: the call count depends entirely on the shape of graph you choose to build, not on the paradigm. GoT is not structurally more expensive than ToT, on the paper's sorting task it is cheaper, because merging partial results spares you from expanding whole branches only to throw them away. What is certain is that ToT and GoT are both in a different order of magnitude from plain chain-of-thought: dozens of calls against one.
Start with chain-of-thought. If answers wobble from one sample to the next, add majority voting (self-consistency). If the problem requires trying paths and backing out, move to ToT. GoT is justified only for problems that are genuinely decomposable, where gluing sub-solutions back together buys something measurable. Add complexity only after simplicity has failed, and measure the gain before paying for it.
Practical Limitations
Orchestration is itself a problem. When to branch? When to aggregate? When to refine? Hand those decisions to the model and you must pay it tokens to deliberate about its own method. That meta-deliberation cost shows up in no results table, and it can exceed the cost of the useful reasoning.
Cost sits an order of magnitude above chain-of-thought. Do the arithmetic: 5 branches across 3 levels, plus merges and refinements, lands at a few dozen calls to the model for one question, against one. That ratio is the durable fact; the absolute price depends on the model and the year and is not worth quoting in hard numbers. The detailed costing, with the figures published in the ToT paper, is in Tree of Thoughts.
Parallelism does not recover all the latency. Branches at the same level can run at once, but a merge must wait for everything it merges. A deep graph therefore has an irreducible critical path: as many round trips as there are levels of dependency.
GoT is elegant on paper and little deployed in production. Reasoning models (o1, DeepSeek-R1) have absorbed exploration and refinement inside the model: they do in a single call what GoT orchestrates across dozens.
Be careful with that phrasing, which is often misread: "a single call" is not "a single computation". The model emits a long reasoning trace, and every token of that trace requires a full pass through the network. The spending has not disappeared, it is simply billed as generated tokens rather than as requests, and it is entirely real. See test-time compute, which carries this trade-off in full.
Perspective
GoT is the logical end of the progression chain, then tree, then graph: reasoning treated as a search in a graph. Explicit GoT is little deployed, but its three moves (gluing partial solutions back together, rewriting by iteration, letting branches converge) turn up everywhere in today's agent systems, under other names.
Read this page for what it is: a demonstration of what is possible, not an engineering recommendation. Practice has moved toward thriftier arrangements (reasoning models, tool-equipped agents) that achieve comparable effects with a more legible bill. And in every case the central trade-off is unchanged: what you gain in quality, you pay for in compute at question time. That is the subject of test-time compute.
1. Which reasoning pattern can Graph of Thoughts express that Tree of Thoughts structurally cannot?
2. The paper claims GoT improves 'sorting quality by 62% over ToT'. What does that figure actually mean?
3. Since a graph is a richer structure than a tree, is GoT necessarily more expensive than ToT?
4. Reasoning models like o1 or DeepSeek-R1 do 'in a single call' what GoT orchestrates through dozens of calls. What should you understand by that?