Elffuss BraidHub

kikocis/utopia public

dev · 7.8 KiBSourceRawPermalink

0008 · Ontology packs as the cold start

The problem

The ten seed relations a new KB used to receive (since removed) had no domain or range. The extraction prompt supports signatures (- buys_from (employee|team → *)), but with none to feed it each predicate degraded to prose, and prose cannot fix direction: produces — "an organization or project makes or releases the object" — hints at the subject's type without constraining it, so a model reading "Anthropic's Claude" has nothing machine-checkable to say which side is the subject. Only part_of had a counter-example written in, after a mishap; fixing direction with prose costs one mishap per predicate and holds only under that line. Ten predicates do not cover real documents either (most facts degraded to related_to), and widening to dozens does not fix direction.

schema.org turns direction into structure: 1010 classes, 1521 properties, 1488 (97.8%) with both domain and range. With schema:manufacturer Product → Organization, Claude manufacturer Anthropic is legal and the reverse is stopped at domain validation before it reaches the graph.

Candidates

Counted from the official release files of 2026-08-30 (not from the dev database: a mock corpus shows the shape of errors, not real ratios). Criteria: readable by the current importer (Turtle / RDF-XML), open license, has domain/range.

PackSizeClasses / propertiesFills
schema.org1078 KB1010 / 1521 (the shipped pack counts 1676)general: people, organizations, products, events, creative works
W3C Org82 KB13 / 34what schema:Organization lacks: Unit, Post, Membership, Role, tenure, reporting lines
PROV-O110 KB62 (shipped: 49) / 69provenance: Activity, Agent, wasDerivedFrom
FOAF43 KB12 / 62social relations; 21% overlap with schema.org and the least unique value — a candidate, not a default
IOF Core394 KB294 / 75industrial manufacturing

Overlap by key_from_iri() (keys collide, not IRIs) is about 20 words in total: org ∩ schema 6, foaf ∩ schema 15, prov ∩ schema 4. True synonyms are mapped (foaf:Person ≡ schema:Person); same name with a different meaning stays as two (org:role is a post, schema:role a part in a creative work; foaf:status is chat presence, schema:status an order status).

Decisions

  1. Multi-select at KB creation, no bundles. Alignment is declared pairwise — foaf:Person ≡ schema:Person holds whatever else is selected — so multi-select adds no alignment cost, and fixed bundles are guesswork that never matches: fintech wants IOF plus a future FIBO, a consultancy wants schema plus Org plus PROV. The UI shows each pack's size and lets the user weigh it.
  2. No import undo. Three guards — ON DELETE RESTRICT (0003_graph.sql), application-level counts in ontology.rs, and NOT builtin (now an empty condition) — already mean a type with entities cannot be deleted. That is right: the inverse of "the ontology guides, it does not enforce" — knowledge can veto the deletion of ontology. What "wrong pack" needs is a bulk view ("this import created 294 classes, 12 in use, 282 empty — delete the empty ones"): simpler than undo, touches nothing that holds data. Not built yet.
  3. Static alignment table, no runtime inference. About 20 rows by hand (22 built, SameAs and Rename, e.g. org:Role → org_role), partly copied from upstream: W3C Org declares its alignment with FOAF, PROV-O with FOAF and Dublin Core. No label similarity or embedding matching — the packs are ours, five or six of them, and the overlaps can be enumerated. An unbounded problem shrinks to a table, per 0001's criterion 6: governance experience goes into the schema, not into hidden rules.

Dead ends

Revisions

Open questions