Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Diagram of thought Diagram of thought Summarizer Validated Node Synthesis

From Leeroopedia

Template:Metadata

Overview

This page describes the concrete pattern for implementing final answer synthesis using the <summarizer> role in the Diagram of Thought framework. The summarizer aggregates only validated propositions into a coherent final answer, emitting explicit node citations via @node and @edge kind=use records.

Description

The summarizer synthesizes from validated nodes only. It creates its own @node record with role=summarizer and emits one @edge kind=use record for each validated source node it draws upon. This produces an auditable provenance chain: every claim in the final answer can be traced back to the specific validated proposition that supports it.

The key constraints of this pattern are:

  • The summarizer must not reference invalidated or unexamined nodes.
  • Each source dependency must be declared with an explicit @edge record.
  • The summarizer's node ID must be greater than all source node IDs (preserving DAG acyclicity).

Usage

Use this pattern after convergence assessment confirms that reasoning is complete -- that is, when the propose-critique cycle has resolved all open questions and the set of validated propositions is sufficient to construct the final answer. This is the terminal step in the DoT process.

Code Reference

Source

  • prompts/iterative-reasoner.md:L29-34 -- Summarizer role instructions
  • README.md:L93-97 -- Minimal template summarizer block

Signature

The summarizer synthesis pattern consists of three elements: a natural-language synthesis block, a node declaration, and edge declarations linking to each validated source.

<summarizer>
[Coherent natural-language answer synthesized from validated propositions, citing node IDs]
@node id=N role=summarizer
@edge src=V1 dst=N kind=use
@edge src=V2 dst=N kind=use
...

Where:

  • N is the summarizer's node ID (must be greater than all referenced source IDs)
  • V1, V2, ... are the IDs of validated proposition nodes

Import

No import required. This is a prompt pattern -- it is enacted by including the summarizer instructions in the system prompt or few-shot template. The LLM generates the @node and @edge records inline as part of its autoregressive output.

I/O Contract

Direction Description
Inputs
  • Complete reasoning DAG with all @status marks resolved (every proposition has been validated or invalidated)
  • Set of validated proposition node IDs (those with @status target=X mark=validated)
Outputs
  • Final <summarizer> block containing a coherent natural-language answer
  • @node id=N role=summarizer record declaring the synthesis node
  • One or more @edge src=Vi dst=N kind=use records linking to each validated source node

Usage Examples

The following example shows a complete final synthesis for a character-counting task. Nodes 2 and 4 were previously validated by the critic; the summarizer cites both.

<summarizer>
Based on the validated reasoning:
- Node 2 established that "strawberry" has three syllables
- Node 4 counted "r" in each: straw(1) + ber(1) + ry(1) = 3

Final answer: The letter "r" appears 3 times in "strawberry".
@node id=7 role=summarizer
@edge src=2 dst=7 kind=use
@edge src=4 dst=7 kind=use

In this example:

  • Node 7 is the summarizer node, with an ID greater than all source nodes.
  • @edge src=2 dst=7 kind=use declares that the synthesis depends on validated node 2.
  • @edge src=4 dst=7 kind=use declares that the synthesis depends on validated node 4.
  • The natural-language body explicitly names which node contributed which piece of evidence, making the provenance human-readable as well as machine-extractable.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment