Atlas
Entity review & merge
A knowledge base accumulates duplicates: "Acme Corp", "Acme", and "ACME Corporation" are one company; "John:" speaker labels in three transcripts may be three different people. The implemented review inbox surfaces likely duplicate pairs, and every merge it applies is a non-destructive pointer with an undo record. This page covers the queue, the merge mechanics, and why canonical_relations is the only edge table read at serve time.
The review queue
The current inbox runs one workspace-scoped query: live, unmerged entities of the same type whose normalized names have PostgreSQL trigram similarity above 0.35. It ranks those pairs and hydrates both entity cards:
- Merge candidates — entity pairs that look like the same real-world thing (normalized name match), each shown with type, aliases, mentions, and source-document context.
Dismiss is not durable
rejection_tombstones are honored by extraction services, but this merge inbox does not create them.Why queue instead of auto-merge
Non-destructive merges
Merging is a pointer, never a rewrite. In one transaction the loser entity gets a merged_into pointer, its canonical_id repoints, its aliases repoint tagged with the merge_log id, and a log row records the actor and the evidence. No mention text is destroyed and no source document is touched.
Confirm the match
The queue shows both entities side by side with their mentions, aliases, and the evidence for the match. You pick the canonical survivor.Apply the merge
The pointer, alias repoint, and log row commit atomically, thencanonical_relationsis rebuilt for the affected entities so edges de-duplicate immediately.Undo any time
Because every mention carries link provenance, undo is lossless: clearing the pointer, retracting merge-tagged aliases, and rebuilding affected canonical relations restores the separated identities without rewriting source documents.
canonical_relations: the serve-time edge table
Merges, extraction, and manual graph changes all converge on one materialized aggregate, canonical_relations. It is the onlyedge table read at serve time — by retrieval's graph channel, the graph explorer, and the agent's kb_graph_query tool. Raw mention-level rows are never queried live. That indirection is what makes a review action instantly visible everywhere: the moment a merge commits and the aggregate rebuilds, every reader sees canonical entities and de-duplicated edges without any consumer knowing a merge happened.
Provenance survives the merge
relation_evidence (quote + offsets) and every alias back to the mention that introduced it. Merging consolidates identity without losing the paper trail.Related
- Entity graph — how mentions, wikilinks, and extraction build the graph the queue curates.
- Graph communities & layout — how the cleaned graph is clustered and laid out.