World's first open-source enterprise world model.
0061 · The ontology is proposed from the open graph and judged by its questions
- Status: In progress · accepted 2026-09-26 · cuts 1 and 1.1 built (#947, #950), cut 3 slices 1–2 (#955, #962) · revised 2026-10-16 (#1257) · revised 2026-10-17 (#1288) · open: cut 2, the rest of cut 3, cut 4
- Written: 2026-09-26 (conventions in the README)
- Related: 0044 §4 decided the workbench and named this cut; 0003 grew the ontology from
ontology_missesand surface predicates, which 0044 cut 1 left idle and #725 retires; 0012 makes every element a contract a person signed, which this record keeps; 0053 is what makes approval re-decide signatures without a new mechanism; 0008 is the second of the three sources; 0043 and #725 give the queue its shape. From #725's "Ontology proposals" row and 0044's open question about a base with no questions.
A base has 1,178 phrase signatures the aligner decided bind to nothing and 500 kind words with no class. Each of those is a thing the documents say and the ontology cannot hold. Today they sit as rows: the workbench's
Suggestreadsontology_missesand surface predicates from the extractor that no longer runs, and its proposals carry a label and a reason but not the statements they would type, not a definition the aligner could use, and no notion of whether anyone needs them. Nothing says what the ontology is for, so nothing can say whether a proposal is worth approving, and an approved property changes the typed graph only if someone remembers to run alignment again.
What exists
The open graph holds statements with their phrases, quotes, kind words and names [0044 cut 1]. Alignment decides each signature (phrase, subject class, object class, value or not) once, against the properties whose declared structure fits, with a fingerprint of what it considered [0053]; phrase_bindings keeps none and undecided with statement_count and examples, type_bindings keeps kind words with no class. ontology_proposals stores the growth loop's four sections (entity_types, relation_types, attribute_types, map_to) as JSON with open / adopted / rejected; decide_proposal flips the status and the adopted element is created by the old path. Definitions live on entity_types.description and relation_types.description; alignment shows them to the model. Nothing records what a base is meant to answer.
Decisions
1. A competency question is a row of the base, and the ontology is judged by it. competency_questions holds a question in the person's words, optionally the expected answer or the shape it needs (the classes and properties an answer must traverse), who wrote it, and the last time it was checked and how it went. Questions are the standard 0044 §4 named: an ontology element earns its place by helping answer one. A base with no questions is not blocked: the agent proposes questions from what the open graph says most (the most frequent signatures and kind words, the most connected entities), marked proposed until a person accepts, edits or rejects them. This answers 0044's open question; it does not let the agent decide what the base is for.
2. The ontology agent proposes from the open graph, against the questions. Its inputs are the signatures decided none or undecided with their statement counts and example quotes, the kind words with no class, the current ontology, and the accepted questions. It proposes object types, link types, properties and implication rules, and every proposal carries a definition written for the aligner, the example statements that motivated it, the signatures it would bind, and the questions it serves. Proposals land in ontology_proposals, one row per element key, refreshed rather than duplicated. The job runs on demand from the workbench and after alignment settles when unbound signatures have accumulated past a threshold; it never writes the ontology. It replaces the 0003 Suggest that read ontology_misses, whose own comment records that 86.7% of what it showed the model was single-document noise.
3. Approval is an action that writes the ontology and re-decides the signatures. Adopting a proposal creates or edits the element with its definition, domains and ranges: structure is part of approval [0044 §4], so a property arrives with the classes it joins, not as a bare label. The signatures the proposal named are then re-decided by alignment with no new mechanism: their basis changed, which is exactly what 0053 made re-decision mean. Edit-and-approve is the same path with the person's text. A signature a person decided stays as the person left it. Rejecting records the reason so the agent does not propose the same element again for the same signatures.
Revision 2026-10-16 (adoption is one commit, #1257): decision 3 did not say that adopting is one operation, and adoption committed the element, its alignment job and the adopted status separately, embedding the element inside the request; an attribute whose example statement has an entity object was committed before its regression case was refused, leaving an element no proposal adopted. Adopting now commits the element (for a reuse, the person's bindings), its regression cases, the adopted status and its follow-up jobs together or not at all, and makes no model call: like the editor, it queues embed_ontology ahead of alignment. Only adoption adopts; the status-only endpoint rejects.
Revision 2026-10-17 (a reuse keeps what a person decided after the agent read it, #1288): decision 3's "A signature a person decided stays as the person left it" did not say against what. A reuse wrote every shape and kind word it named as the adopter's binding, overwriting a binding a colleague decided after the agent read it, which neither the proposal nor the adopter had seen. For a reuse, the decision the agent read is what the proposal answers and is replaced; a person's decision made after that read stays. The proposal records when each decision it read was made. A person's later decision that binds the way the proposal does counts as written, and a shape keeps its regression case; one that differs is left as it is, gets no case and is listed in the answer. A reuse with nothing left to write is refused. A reuse saved before this revision recorded no reads, so adopting it keeps every person's decision.
4. Every approved element carries regression cases. The example statements that motivated a proposal become ontology_regression_cases on adoption: a statement and the property or class it is expected to bind to. A later edit to the element's definition, domains or ranges reruns alignment on exactly those signatures and records which cases still bind. A failing case is shown on the workbench beside the edit; it is not reverted for the person, because a definition may be tightened on purpose. A person can add a case from any statement ("this should bind here"), which is the "make a rule" action #725 names.
5. Two numbers measure the ontology. Questions answered correctly: each accepted question is asked over the typed graph the way a person would ask it in chat, and the answer is judged against the expected answer where one is written, or against whether the shape it needs exists and holds facts. Proposals people change: the share of the agent's proposals rejected or edited before adoption. Both are reported per base and by the bench 0044's table names, FDA and statistics corpora with written questions.
6. Not in this record. No automatic adoption: the ontology is a contract a person signed [0012], and the agent's confidence does not change that. No edits to imported IRIs [0001]. No change to how questions are answered: the chat and its tools stay as they are; this record gives them a standard, not a new engine. Retiring the old machinery (ontology_misses, adoption from proposed_predicate, the type-resolution path) is #725's list and follows once the agent produces; the old Suggest stays reachable until then.
What it costs
- Model calls per proposal round are bounded by unbound signatures, batched like alignment (twelve a call with the glossary once per batch, 0044 decision 3's cost lesson) plus one call per batch of question proposals. A round on a 100-document Re-DocRED base is about a hundred calls; the number is measured with the cut.
- Alignment reruns on adoption, bounded to the signatures the proposal named, so the typed graph moves within a minute of a decision rather than at the next full round.
- Two tables and a queue:
competency_questions,ontology_regression_cases, and the workbench's proposals list becomes #725's "Ontology proposals" queue with approve, edit-and-approve, reject, defer. - Definitions become load-bearing. The aligner reads them; a proposal's definition is written for it, and an edit is checked against regression cases. That is the cost of making definitions matter, and the reason regression cases exist.
Dead ends
- Proposing from
ontology_missesand surface predicates. No statements behind them, no signatures, no counts that mean anything after the extractor changed; the 0003 loop measured 86.7% noise on its own input and never knew whether a proposal was needed. - Letting the agent adopt above a confidence. An ontology element is a contract every later alignment reads; a wrong one types facts wrongly across the base until someone notices. 0012 was written after exactly that.
- Judging the ontology by coverage (share of signatures bound). Coverage rewards binding everything; the questions reward binding what the base is for. A signature that no question needs may rightly stay open.
Cuts
competency_questionswith its API and workbench list; the agent job proposing types, properties and rules with definition, examples, signatures and questions;ontology_proposalspayload extended; adoption writes the element with its structure and re-decides the named signatures; rejection with a reason.- Regression cases: written on adoption, rerun on edit, shown on the workbench; "make a case" from a statement.
- Questions for a base that has none, proposed by the agent; the competency bench (
scripts/bench/competency.mjs) on the FDA and statistics corpora with written questions, reporting the two numbers of decision 5. - Retire the 0003
Suggestpath,ontology_missesand adoption fromproposed_predicateper #725, once the agent has replaced them on a real base.
Open questions
- What "answered correctly" means for a question with no expected answer written: the shape check is weaker than a judged answer, and a question that the open graph alone can answer does not need the ontology at all.
- Proposals against an imported pack: a proposed property that a pack already has under another name should become a
map_to, and the agent needs the pack's definitions to see it. - Whether a rejected proposal's reason should suppress the element for a time or until the signatures behind it change.
Cut 2 implementation boundary — 2026-10-10
The first slice agreed in #1103
keeps a statement's expected property and direction, actor, and adoption / person
origin. An Editor adds a case with POST /api/v1/kbs/{kb_id}/ontology/regressions
and {statement_id, relation_type_id, direction}; the statement and property must
belong to that base. Literal objects use forward attribute bindings. Repeated
confirmation retains the original attribution.
The existing signatures query returns statement IDs alongside its examples and quotes. A proposal keeps the first example's ID with each shape, and adoption writes those cases and the proposal's adopted status in one transaction. Older proposals without IDs write no cases; removed examples are skipped rather than replaced, as requested in the review of #1178.
A binding decision records the latest comparison in the same transaction: property
and direction must match, except that a person's bound signature always passes and
explicitly reports human_bound. Rejections do not pass. The result retains the actual
binding and its decision time alongside the check time; an existing decision is initially
reported at its original time. These cases observe alignment without another evaluator,
model call, evaluation job, or version identity. They are not a semantic accuracy
benchmark. The workbench view follows in a second PR.
Cut 2 workbench boundary — 2026-10-10
The second slice welcomed on merging #1178
shows a base's live statement cases in the ontology workbench. A Viewer reads
GET /api/v1/kbs/{kb_id}/ontology/regressions: source and property labels,
expected and actual direction, the latest stored comparison and its check time,
and origin and attribution. Expanding a case reads the existing evidence route
and links back to the document. A preserved human binding is called a human
decision, not an independent match; the binding's decision time remains distinct
from the comparison's check time.
An Editor uses “Make a case” beside an open statement in the document viewer, chooses the expected property without a model answer preselected, and confirms its direction through the existing POST. Typed projections and legacy facts do not supply statement IDs. Literal statements offer forward attributes only. The list refreshes through the existing graph and review events; refreshing reads saved results and never starts alignment. No evaluator, job, schema migration, or version identity is added.
Cut 2 negative expectations — proposed 2026-10-12
The review of #1184
found that a person cannot say a statement should bind to no property. The
example, 不再负责 bound to responsibleFor, motivates a human expectation,
not a rule that every negation or ending must be unbound. This contract must
land before implementation; the preceding slices remain implemented.
An expectation says either bound or none. Extend the existing Editor POST
with optional expected_binding, either bound or none; omission means
bound and preserves existing requests. Bound requires relation_type_id
and direction with their current validation. None uses
{statement_id, expected_binding: "none"}, with both target fields omitted or
null. Reject unknown expectation values, incomplete bound targets, and any
non-null target on a none request. A missing property alone is not a negative
expectation. Both kinds require a live open statement in the same base and
Editor access. Adoption continues to write positive cases only.
Absence has no synthetic property. For a negative case,
expected_property_id and expected_direction are both null; for a positive
case both remain present. Preserve existing rows, same-base isolation, and
ownership checks. Repeated confirmation of the same negative expectation,
including concurrent requests, returns the original case with its actor and
origin. Deleting a target property removes its positive cases; a negative case
has no target to delete.
Compare committed decisions, not just target IDs. A negative case passes
only on an explicit none decision. bound and undecided fail; no decision
leaves the case unchecked. A null actual property alone does not pass, since
undecided decisions also have no property. A person's explicit none decision
passes a negative case and fails a positive one. Comparisons retain the actual
decision and its time separately from the check time, in the existing binding
transaction; no evaluator, extra job, or binding status is added.
The human-bound exception applies only to positive cases. Positive cases
retain the existing exception and report human_bound, not an independent
match. A negative expectation conflicting with a person's bound signature
fails and explicitly reports a conflict with the human binding, including the
actual property and direction. A failed case does not overwrite the person's
binding: it makes the disagreement visible for a person to resolve.
Status history
The status line as it stood on 2026-09-27, before status lines were cut to one line:
Accepted 2026-09-26 · 0044 cut 5 · cut 1 built (#947, migration 0077): competency questions are rows, the agent proposes from unbound signatures and kind words into
ontology_proposals, adoption writes the element and re-decides its shapes through alignment · cut 1.1 (#950, migration 0078): the agent records every shape it saw, "already in the ontology" becomes a map_to proposal adopted as a person's binding per shape, adoption embeds the element before alignment, and the editor's create and update handlers queue the same refresh ahead of alignment, which waits for it · measured on a 100-document base: ~9k tokens a call, 12 calls a round, about half of a round's proposals adoptable as-is · cut 3 first slice (#955, migration 0079): the agent proposes questions for a base with none,competency.mjsasks the accepted ones through chat and the two numbers are reported (11 of 11 on the bench base) · second slice (#962): each answer records whether it went through the graph; on the bench base 10 of 11 answered, 8 with graph facts, 6 from the graph alone · cut 2, the rest of cut 3 (FDA and statistics corpora) and cut 4 open · the ontology agent reads the open graph's unbound signatures and kind words against the base's competency questions and proposes types, properties and rules with definitions, examples and the signatures they would bind; approval writes the ontology and re-decides those signatures; every approved element carries regression cases; the ontology is measured by the questions it answers