Elffuss BraidHub

kikocis/utopia public

dev · 6.9 KiBSourceRawPermalink

0010 · An unnamed relation stays empty

The problem

related_to encoded "the extractor found an edge but the ontology has no matching relation" — a program state. Yet it sat in relation_types as a builtin relation, listed on the ontology page beside acquired and works_at, as though someone had decided the relation between the two things is called "related". Nobody had.

The cost was measured before deleting it: in one 348-chunk KB, 533 facts hung on it and every one displayed as 有关联, while every one also carried the source's wording in fact_evidence.proposed_predicate. The meaning was in the database all along, covered by a fake vocabulary word.

Decisions

  1. facts.predicate_id becomes nullable and related_to is deleted. The reader sees more: on a real corpus (14,706 facts, 5,934 on related_to), 93 graph edges that all read "related" now read placed_pressure_on / agreed_to_resign / countersued / revived_legal_action / license_from.
  2. Display falls back to the source's wording through one SQL function, fact_surface_predicate(uuid). The most frequent wording wins, ties by lexical order — the rule predicate_match::merge_key uses, and deterministic, so one edge has one name on the graph, in the panel and in the history. Only 3.0% of facts (16 of 533) had more than one wording. One function rather than a subquery in each of the eight read paths: eight copies diverge, and divergence here means different names on different pages.
  3. The reader must see where a word comes from, or the lie is retold another way. Rows carry inferred: edges outside the ontology are drawn in a lighter gray; the panel and document output say on hover "not in the ontology; this is the source's wording"; facts with neither show an italic "unnamed relation" — never a made-up word.
  4. Data changed in place, no migration path. The database held test data before release. Once users have run for half a year, 0001's "only new extractions; rebuild the backlog" applies again.
  5. mapped_to follows. Only related_to was excluded from the prompt, so the model used mapped_to (entity → data-source schema) on entity↔entity pairs 41 times. It leaves the prompt, then relation_types altogether (0011): the same error, control flow written as vocabulary. The FALLBACK_RELATION_* constant and branches, the extraction_drops reason "no fallback relation", and the "fallback predicate" wording went with it.

Dead ends

Revisions