A Graph That Names Its Own Gaps¶
Learning objectives
- Why "one thing, one node" is an identity rule at write time, not a cleanup job afterwards
- What separates an asserted relationship from a co-mention, and why a reader must be able to see the difference
- Why a ranking that is correct on evidence strength can still return the wrong five rows
- How an answer can cite a graph honestly: markers, a guard, and a drawing that matches the export
- Why the most useful sentence an answer can produce is "no such relationship is recorded"
- The rule that every "fixed" is verified on the surface a person actually uses
The problem with five spellings¶
Suppose a collection of documents mentions the same product a few hundred times — sometimes with a hyphen, sometimes without, once with a trademark mark, once as a folder path. To a person those are obviously one thing. To a system whose identity rule is "lower-case the name and trim it", they are five things. Every relationship extracted from those documents attaches to one of the five, so the graph holds five small neighbourhoods where there should be one large one, and a question about the product reaches a fraction of what is known about it.
It gets worse when extraction improves. A richer extractor assigns types — this name is a product, that one an environment — and if the type is part of identity, every re-typed entity becomes a second node beside its old self. The corpus doubles, and looks richer, while the answers get thinner.
The fix is an identity rule, not a merge script. Identity becomes the
canonical name: case folded, marks dropped, everything that is not a
letter or digit removed, with two deliberate exceptions — very short names,
and purely numeric ones, keep their surface form, because 1.0.0, 100% and
$100 are three different things that would otherwise collapse into one.
Type becomes an attribute that accumulates. Surface forms become aliases.
Two properties follow that a merge script never gives you:
- Every later document lands on the same node, without anyone running anything.
- Re-reading a document replaces what it contributed rather than adding a second copy, because the write path withdraws the document's prior assertions before re-asserting them.
The existing split rows still need merging once. The useful discipline there: the migration is a pure plan computed from the rows, the dry-run report is that plan, and applying it executes exactly what was reported. The first live dry-run is how the numeric exception above was discovered — before a single row had been written.
An assertion is not a co-mention¶
Two names appearing in the same document tells you they are near each other. It does not tell you how they relate. A graph that records only proximity can say "these are connected" and nothing more; a question like what does this depend on, and where does it run cannot be answered from proximity, only guessed.
An asserted relationship carries a predicate from a fixed vocabulary (depends on, deployed to, governed by), the document that stated it, the span of text where it was verified, and a trust weight inherited from that document — one that decays as the document ages or is superseded, because a chain of evidence is as weak as its weakest link.
The two kinds must stay visibly distinct all the way to the reader. In the drawing, assertions are solid lines with the predicate on them; co-mentions are dashed and unlabelled. In the prose, an answer that rests on co-mentions says "co-mentioned with", not "depends on". The temptation to upgrade a dashed line to a solid one because it probably means something is exactly the laundering the distinction exists to prevent.
The right ranking returned the wrong rows¶
With assertions in the graph, the first relationship question still came back with five generic "related to" edges. Nothing was broken: rows were ranked by evidence strength, and on a collection of current documents every neighbour of a well-connected entity ties at the maximum. The caller asked for five rows; the tie was broken by whatever order the store happened to return.
Evidence strength is the right first key. It is not the only key. At equal strength, a row with a specific predicate is more useful than one carrying the vocabulary's escape predicate, which is more useful than a co-mention. That is a tie-break, never a rank — a superseded "depends on" must not outrank a current co-mention on strength — and it is pinned by a test that fails if the tie-break is removed.
The other half lives with the asker. A question that names a relation ("depend", "deployed", "hosted") should ask the graph for those predicates first and fall back to everything only when they return nothing. Asking for more rows helps; asking for the right rows helps more.
Citing a graph honestly¶
A passage citation points at a document. A relationship citation needs its own
marker — something like [Graph: A --deployed_to--> B] — so a reader can tell
which claims rest on an edge and which on a paragraph. Two things make the
marker trustworthy:
- A guard. Every relationship cited in the answer is checked against the set the graph actually returned for that turn. A cited edge that was not returned is reported as ungrounded, separately from an ungrounded document citation, because they are different failures.
- A drawing that matches the export. The relationships an answer used are drawn on the answer canvas — deterministically, so a re-render shows the same picture — and exported with the document as a table of the same triples. The page a reviewer holds matches the screen.
The most useful sentence¶
The first typed answer said two things. It listed the deployment targets it had asserted relationships for, each cited and drawn. And it said: no dependency relationships are recorded for this entity.
That second sentence was correct, and it was the finding. Dependency relationships existed elsewhere in the graph; this entity's had been demoted by a validator that checked the entity's first-seen type rather than the set of types it had accumulated — a consequence of the identity change above, surfaced by the product in plain language. An answer that guesses would have hidden it. An answer that says "not recorded" hands you the backlog.
Verify where the person is¶
Every step above was checked by asking the question again through the same interface a customer uses, signed in, on a small screen — not by calling the component that changed. A component call proves the component. Only the customer's own path proves the product, and the two have disagreed before.
The takeaway
Make identity a write-time rule, keep assertions visibly apart from co-mentions, rank by evidence first and specificity second, cite edges with their own marker behind a guard, and treat "no such relationship is recorded" as the product writing its own next task. Then verify on the surface a person actually uses.