The eight-document AI-companies base holds 2,135 facts under 136 distinct predicates, drawn from an ontology of 1,701 relation types (the schema.org import plus what auto-extension added from the model's own words). The top of the distribution:
employee 56 · works_for 50 · employees 15 one relation, three predicates
founders 21 · founded 7 · founder 3 · founded_in 3
has_partnership 16 · partnered_with 14
And on one entity, the board of directors, the facts the model reads are can remove, comprised, interactAction, resignation, appealed_to, ousted, removed, announced, discussed: schema.org camelCase, snake_case and free text side by side, several of them one relation.
predicate_match already folds spelling and inflection onto an existing key and turns _by passives around; by its own rule it refuses to match when two keys fold to the same string, and it does not fold synonyms. schema.org itself ships founder and founders, so the collision is in the vocabulary before extraction adds to it.
Effect
A predicate is what a graph query groups and filters by. With this vocabulary, neighbors grouped by predicate shows the same relation three times, a predicate filter on entity_facts misses two thirds of the edges it means, paths_between cannot rank a path by how specific its edges are, and a business rule (0021) written against works_for does not see employee. The fact dump the model reads today is longer and vaguer for the same reason.
What to do
- One canonical predicate per relation. At extraction, before a new relation type is created: fold onto an existing one by
inverse_of / sub_property_of / equivalence in the ontology, then by nearest relation embedding (relation_types.embedding exists) above a high threshold; only then extend. Auto-extension stops minting employees next to employee.
- A
canonical_of link on relation_types so the query tools group and filter by the canonical predicate without rewriting stored facts, and the schema.org pairs (founder/founders) resolve to one.
- Measure on the re-extraction from the phrase-entity issue: distinct predicates per thousand facts before and after, and the three families above.
Acceptance
On the eight-document re-extraction, employee / works_for / employees are one predicate (or linked to one canonical), founder(s) / founded likewise; distinct predicates used drop by about half; neighbors and paths_between group by canonical predicate; a rule on the canonical key matches facts stored under any of its variants.
Related: #558 (the query tools that group by predicate), #559 (the same re-extraction measures both), #519 (the ontology this vocabulary came from).
The eight-document AI-companies base holds 2,135 facts under 136 distinct predicates, drawn from an ontology of 1,701 relation types (the schema.org import plus what auto-extension added from the model's own words). The top of the distribution:
And on one entity, the board of directors, the facts the model reads are
can remove,comprised,interactAction,resignation,appealed_to,ousted,removed,announced,discussed: schema.org camelCase, snake_case and free text side by side, several of them one relation.predicate_matchalready folds spelling and inflection onto an existing key and turns_bypassives around; by its own rule it refuses to match when two keys fold to the same string, and it does not fold synonyms. schema.org itself shipsfounderandfounders, so the collision is in the vocabulary before extraction adds to it.Effect
A predicate is what a graph query groups and filters by. With this vocabulary,
neighborsgrouped by predicate shows the same relation three times, apredicatefilter onentity_factsmisses two thirds of the edges it means,paths_betweencannot rank a path by how specific its edges are, and a business rule (0021) written againstworks_fordoes not seeemployee. The fact dump the model reads today is longer and vaguer for the same reason.What to do
inverse_of/sub_property_of/ equivalence in the ontology, then by nearest relation embedding (relation_types.embeddingexists) above a high threshold; only then extend. Auto-extension stops mintingemployeesnext toemployee.canonical_oflink onrelation_typesso the query tools group and filter by the canonical predicate without rewriting stored facts, and the schema.org pairs (founder/founders) resolve to one.Acceptance
On the eight-document re-extraction,
employee/works_for/employeesare one predicate (or linked to one canonical),founder(s)/foundedlikewise; distinct predicates used drop by about half;neighborsandpaths_betweengroup by canonical predicate; a rule on the canonical key matches facts stored under any of its variants.Related: #558 (the query tools that group by predicate), #559 (the same re-extraction measures both), #519 (the ontology this vocabulary came from).