Skip to content

Ontology validation

The ontology critic and its acceptance rules.

ONTOLOGY_RECONCILE_MINTED_TERMS

Default: detect · Type: one of off, detect, rewrite

What to do when a newly minted term's label, notation or local name matches, case-insensitively, an existing term of compatible role in any catalog ontology. Under vector retrieval the renderer sees only part of the catalog, so it can mint a duplicate of a term it was not shown. 'detect' logs each pair and changes nothing; 'rewrite' also replaces the minted IRI with the catalog IRI in the merged update (enable it once 'detect' shows the matches are true duplicates); 'off' skips the check.

ONTOLOGY_UPDATE_MODE

Default: insert_delete · Type: one of insert_delete, insert_only

Which side of an ontology patch is applied. 'insert_only' drops every delete -- from renders, consolidation and the critic -- before it reaches the working graph or the catalog, and counts the dropped triples in 'ontology/deletes_dropped_insert_only'. Prompts are unchanged, so the model may still propose deletes.

ONTOLOGY_CRITIC_PASSES

Default: 0 · Type: int

Review-and-patch passes per ontology unit, in LLM calls. 0 (default) disables the ontology critic. With 1 the pass is spent only on a unit whose deterministic findings include a mandatory one, so a clean unit costs no critic call. With 2 or more every pass runs on every unit.

ONTOLOGY_MAX_CLASS_DEPTH

Default: 6 · Type: int

Deepest named-class chain a newly minted class may sit on, counted from owl:Thing, a well-known vocabulary term, or a class with no named superclass. A deeper minted class is a hierarchy_too_deep finding: chains of single-use intermediates are what a document-driven render builds and another document does not reuse.

ONTOLOGY_PLAN_ENABLED

Default: true · Type: bool

Plan a document's ontology before its units render: one LLM call over the whole document proposes the classes and properties it adds to the domain, checked against the whole catalog without a model. Every unit renders against the plan, and a term a unit mints outside it is held back for consolidation. Off, units mint freely, each from its own chunk.

ONTOLOGY_PLAN_MAX_CHARS

Default: 60000 · Type: int

Characters of document text the plan call sees. Beyond it, every unit is cut to the same share of its length.

ONTOLOGY_PLAN_MAX_TERMS

Default: 60 · Type: int

Largest number of terms one document's plan accepts.

ONTOLOGY_PLAN_CATALOG_MAX_TERMS

Default: 400 · Type: int

Catalog terms listed to the plan call as reuse candidates: the home ontology's first, then the rest of the catalog.

ONTOLOGY_PLAN_NEIGHBOURS

Default: 3 · Type: int

Catalog terms the vector index finds nearest each planned term, shown to the renderer and to consolidation as reuse candidates. Needs an indexed catalog; 0 disables the lookup.

ONTOLOGY_CONSOLIDATION

Default: on · Type: one of off, on

Decide every term a document minted before it is written. Terms that need a decision are found without a model (outside the plan, one document's case, a value set, a catalog duplicate, a name variant); only they go to one LLM call per batch, which returns keep, merge into another term, generalise, demote to a property value, or drop, compiled into the update without a model. No such term, no call. Off, planned terms are kept and terms outside the plan are dropped.

ONTOLOGY_CONSOLIDATION_MAX_TERMS

Default: 80 · Type: int

Terms per consolidation call; more terms take more calls.

ONTOLOGY_CRITIC_MAX_DELETE_SHARE

Default: 0.1 · Type: float

Largest share of the delta one critic pass may remove. Stricter than the facts equivalent because an ontology delete propagates onto shared, versioned catalog terminals: its blast radius is every document using the term, not this unit.

ONTOLOGY_CRITIC_MIN_DELETES

Default: 3 · Type: int

Deletions always permitted regardless of share.

ONTOLOGY_ACCEPT_BLOCKING_FINDING_KINDS

Default: ["foreign_delete", "foreign_namespace", "subclass_cycle", "role_confusion", "hierarchy_... · Type: list[str]

Deterministic ontology findings that block acceptance. The default is the destructive-or-lossy subset plus hierarchy_too_deep. Blocking on every mandatory finding would put missing_label in the set, which fires whenever a render mints a term without a label -- routine, and a permanent per-unit tax rather than a defect signal.