Sovereign Intelligence Systems
26 of 29
Chapter 26 of 29

The Graph That Teaches Itself

9 min read · 1,924 words

The corpus is the knowledge base. Relations are derived from our own substrate — never imported from an external knowledge base. An edge the user can see is an edge the user can correct.
Ontology before extraction. Quality gate before fusion. Entity fusion before serving. The graph is not a search index. It is a map of how things matter to each other.
The graph is where the documents talk to each other.

The Consilience graph ontology was specified on a single day in July 2026, in a document that runs to six hundred and twenty lines of precise technical prose. It defines three node tiers, four edge classes, a mention system with late-bound canonical resolution, dual local-and-global semantics on every node, communities as materialized views, provenance on every record, consent tiers on every derived artifact, and nine invariants that any conforming graph must satisfy. It is the most rigorous document the project has produced, and it reads like a constitution because that is what it is.

The graph is not an add-on. It is the promised architecture — the thing the Open Knowledge Framework named before it existed. The governing framework states the law in three clauses: Substrate is owned. Index is disposable. Cognition is interchangeable. The graph lives in the index layer. It is derived from the substrate. It can be deleted and rebuilt from scratch. Nothing in the graph is sacred. Everything in the graph is useful.


The three tiers

Nodes exist at three tiers of abstraction, each serving a different purpose in the system's understanding of its own knowledge.

The document tier mirrors units the substrate already addresses — chapters, conversation turns, learning reps, doctrine slices. Nothing here is extracted; these nodes are registered, with semantics attached. A chapter node carries its stable ID, its content hash, its dual descriptions (local: "this chapter's place in its book"; global: "this work's position in the corpus"), and its structural edges to the chapters that come before and after it.

The entity tier is what the text is about — people, characters, places, works-within-works, concepts and themes, events. Entities are extracted from document-tier text by compiled extraction programs, not by hand. The distinction between a person and a character is load-bearing: the author of a work and the fictional persons within it must not fuse. Extractors assign what they can defend; the resolution pass may reclassify as a correction — recorded as a new resolution record, never a rewrite.

The community tier is the corpus condensed. One kind: community. A community is a set of document and entity nodes grouped by Leiden community detection over the served edge topology, plus a generated summary — a name, a narrative description, a representative-members list. Communities are the "conceptual condensation level" that makes whole-corpus questions cheap and gives the constellation its macro map. They are materialized views: recomputed, versioned, and deletable without loss.


Mentions before verdicts

The most important design decision in the graph is what it does not do. Extraction never writes entity nodes directly. It writes mentions.

A mention is an immutable observation: this span of this document probably refers to some entity of this kind. It carries the character offsets, the text span, the entity kind the extractor could assign, and — crucially — an ordered list of candidate entities it might resolve to, each with a confidence score. The mention does not decide. It observes.

Canonical entity resolution runs independently of extraction, in three stages of escalating cost: blocking (name and alias matching) to embedding similarity (mention context versus entity semantics) to local-model adjudication. Its output is a resolution record that points the mention at an entity. The resolution can be superseded — a better resolution mints a new record; the old one remains. Entities merge by re-pointing, never by rewrite. The old entity node survives as a tombstone so that old lineage stays resolvable.

This is append-mostly design applied to identity itself. Raw data never mutates when resolution improves. A mention that was resolved to the wrong entity last week is not fixed — it is superseded. The history of the mistake is preserved alongside the correction, because the history is how the system learns to make fewer mistakes.


The learning loop

Mine corpus turns into training reps, arrange reps into a curriculum, score them with a detector, and feed the scores back into adaptation — so the next answer is better than the last one.

The graph learns because the system learns. The learning loop — specified in the same week as the graph ontology — works on a simple principle: every conversation is already being written to disk as substrate. The loop mines those conversations for reps — the smallest unit of learning: one assistant turn, the context that produced it, the user's craft signal about it, and its quality annotations.

A rep is derived data. The conversation volume remains the source of truth; a rep can always be rebuilt from the corpus. Reps are JSONL, one JSON object per line, so they stream, diff, and shard trivially. They carry the source turn's identity, the context window that produced it, the response's descriptor digest, and — the heart of the rep — the user's signal.

The user signal is derived from turn adjacency: the user's next turn is the label. An edit is a next-turn whose text substantially overlaps the assistant turn — the user rewrote the response. A re-ask is a near-repeat of the previous user turn — the response did not land. A correction is an explicit negation. An approval is acceptance and continuation. This is noisy, and the schema says so honestly. But it is signal, and signal is what the detector consumes.

The detector scores each rep on four axes: voice fidelity (does the response sound like the platform voice?), richness (did it use the expression layer well?), truth grounding (are claims supported by the tools that ran?), and craft (given the context window, was this the kind of response this user edits toward or away from?). Each axis is scored zero to one with a rationale. Reps where the detector is uncertain land in a human review queue. The operator decides; decisions append to a decided set. The decided set is the seed labels for everything that comes after.

Adaptation flows from the detector's verdicts in two forms: per-user jacket overlays (small markdown deltas that adjust how the system speaks to this specific person, derived from patterns in their edited and corrected reps) and retrieval boosts (per-user weights that bias search results toward the user's own high-scoring past turns and their most-used documents). Neither touches model weights. Both are substrate — plain files, owned by the user, revocable at any time.

The loop is neuromorphic in the truest engineering sense. Nothing runs continuously. The miner wakes when a conversation week closes. The detector wakes when the miner produces reps. The adapter wakes when the detector produces scores. The adaptation state is persistent, local, per-user, per-node — the analog of synaptic state. The miner, the judge, the reviewer, and the adapter are separate small components with one job each, mirroring the role specialization that governs the rest of the system.


The discovery protocol

The graph is not a search index. It is a map of how things matter to each other. The difference is not academic. A search index returns what matches your query. A graph returns what connects to what you asked — the things adjacent to your question that you did not know to ask about.

The agent retrieval tool menu is built on this insight. Each tool is a named, composable lens on the graph:

Vector retrieval finds passages semantically similar to the query, using hybrid dense-and-sparse embeddings with cross-encoder reranking. This is the baseline — what you asked for.

Context retrieval expands around a node — its local semantics, its one-hop edges, the passages that share concepts with it. This is what the node means in context.

Path retrieval walks bounded traversals with flow-based pruning, finding multi-hop connections between distant nodes. This is how a theology text connects to a systems paper through three intermediate edges. Studies show this reduces token consumption by sixteen to forty-four percent versus flat retrieval while producing better multi-hop answers.

Community retrieval queries the community tier for whole-corpus sense-making — prime with a community summary, then descend into its members. This is the macro lens: what does the entire corpus say about this?

Generated queries produce structural traversals for precise questions — guarded, verified, run against the graph's topology rather than its embeddings.

The discovery protocol that orchestrates these tools is perspective-driven. Agents adopt jackets — the historian, the compositor, the corpus miner — to generate diverse retrieval paths. After each exchange, the system surfaces retrieved-but-unused material: the edges the user never asked for, surfaced because the graph found them adjacent. This is the serendipity engine — the mechanical expression of the recognition that the most valuable discovery is often the thing you did not know to look for.

The connection kinds are not tags. They are the grammar of relationship: about, because, despite, alongside, honors, fears, protects, loves, remembers, contradicts, illuminates, echoes. A knowledge graph built on these edges is not a search index. It is a map of how things matter to each other. The system knows that a particular poem echoes a particular passage, and that both illuminate a moment from the conversation history, and that all three honor an aesthetic anchor. That is not information retrieval. That is the beginning of taste — the capacity to recognize not just what is true but what is beautiful, and to say why.


The constellation

The constellation is the graph made visible. It lives as a Canvas rendering — not for visual flair, but because a canvas can draw ten thousand nodes at sixty frames per second while a DOM-based renderer chokes at two hundred. The design language is token-driven: glow and gold-ladder aesthetics on a breathing cadence, full keyboard navigation, study mode, temporal dimming, hover bloom. The renderer is genuinely achieved — offscreen culling, DPR guards, cover coalescing.

Six edge kinds connect the nodes: subject (Jaccard similarity of shared subjects), semantic (cosine similarity of embeddings), coread (works opened within seven days of each other), beholding (felt-attention traces from reading sessions), aesthetic (recorded aesthetic judgments), and magi (human-authored relationships). Each kind has its own visual treatment — the gold ladder distinguishes lenses, and cross-community consilience edges get the brightest treatment, literally lighting up when the graph finds something extraordinary.

The current ceiling is architectural, not aesthetic. Edge computation runs client-side, which works for shelf-sized pools but does not scale. The fix is precomputation: serve edges as artifacts, ship topology and coordinates to the client (two hundred bytes per node, not six thousand), and the same renderer becomes a hundred-thousand-node instrument. Community detection gives the macro view — hundreds of nodes, instant — and viewport-tiered loading means the user never waits for more than the region they are inside. The depth grammar we already have — macro to neighbourhood to folio — gains a real middle rung.

The long vision for the constellation is a shared working space between reader and system. During a session, the exploration path is drawn live into the field — nodes touched brighten along the trajectory, retrieved-but-unused neighbors shimmer at the edge. The constellation stops being a map of the library and becomes a thinking surface — the visual expression of the discovery protocol, where serendipity is not accidental but structural.