Reasoning

Graph of Thoughts

Model reasoning as an arbitrary DAG so thoughts can be merged, refined, and aggregated across branches.

Problem

In a tree-shaped search, each branch is explored in isolation and the model cannot reuse what one sibling branch has already computed when working on another. When the answer further depends on combining several intermediate results, the tree has no operator to merge them, so the same sub-computation is repeated under different branches and the joint answer has to be reassembled awkwardly at the end. Without explicit operators for generating, aggregating, refining and scoring partial thoughts in a directed graph, the reasoning is more expensive than it needs to be and the structure of the problem is not preserved.

Solution

Reasoning state is a DAG of thoughts. Operations include generate (CoT-style), aggregate (merge multiple thoughts), refine (improve one thought), and score. The orchestrator chains operations to produce a final thought; the agent can reuse intermediate nodes across branches.

When to use

  • Reasoning benefits from merging or refining partial solutions across branches.
  • Intermediate thoughts can be reused or aggregated rather than discarded.
  • Problems have a DAG-shaped structure rather than a single linear chain.

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.

Related