Skip to content

8.20 Business-model catalogue — LinkML and SSSOM

A business model's catalogue is the one place that says what each of its entities and properties means, how it is typed, which code list it takes and which standard term it maps to. The catalogue is a LinkML schema in the repository, and that schema is where a business model is edited; the document database holds a loaded copy of it, never the source (ADR-0018 (docs/adr/adr-0018-postgresql-authoritative-document-database-derived.md) §3 point 3, 8.3). Mappings that need a reason are an SSSOM table beside it. FeeCheck's catalogue, the first, is in docs/model/feecheck/catalogue/, which is not published.

8.20.1 The catalogue of a business model

File What it is Status
<model>.yaml the source: a LinkML schema — classes, properties, types, code lists, mappings, annotations built for FeeCheck, read by no code; loading it into the document database planned
mappings.sssom.tsv the mappings that need a justification or a caveat, as an SSSOM table built for FeeCheck
examples/ a document read into the catalogue by hand, to show and test the shape built for FeeCheck: the synthetic IMA fixture, which the pipeline evaluation set's expected normalised layer builds on (plan 362 (docs/plans/362-evaluation-set.md))
.linkmllint.yaml the lint rules: LinkML's recommended set, adjusted to the model's naming built for FeeCheck, with snake_case naming switched off because its slots follow the camelCase attribute paths

What each element carries.

Part Content
definition a description, the range (type, class or enum) and the cardinality
plain mappings standard terms in the SKOS match types — exact_mappings, close_mappings, broad_mappings, narrow_mappings, related_mappings — through prefixes such as iso20022:, emt:, en16931:, fibo:, cuad:
annotations the model's own metadata; FeeCheck's are the part of the contract (A–S), the verifiability class (MD, CALC, REG, SHOW), the attribute-list row, the master-data reference and the canonical attribute path (8.19.5)
code list entries meaning, the standard code, and aliases, the wordings documents use

SSSOM for the mappings that need a reason. A plain close_mappings entry says that two terms are near; an SSSOM row also says why and who decided — for example that EMT 07110 is a product rate where a model's fee condition is a bilateral one. Its mapping_justification can mark a mapping proposed by an LLM as unreviewed until a person has confirmed it. A mapping that needs no explanation stays in the schema alone.

Some standards have stable identifiers (FIBO and SKOS terms are web addresses); others need a prefix the model defines (EMT field numbers, EN 16931 business terms, CUAD categories), which does not resolve.

Kinds of catalogue. LinkML lines up with ISO/IEC 11179: a class is an object class, a slot a property, a slot with its range a data element, an enum a value domain.

Kind Standard or tool Level For a business model's attributes
Dataset catalogue W3C DCAT; OpenMetadata, DataHub, Microsoft Purview, Collibra whole datasets, tables, pipelines describes where data lives, not what an attribute means; the tools need a server
Metadata registry ISO/IEC 11179 concept, data element concept, data element, value domain a conceptual model, not a format; it needs a carrier
Schema with semantic mappings LinkML (Linked data Modeling Language) classes, properties, types, code lists, mapping fields per element one YAML file, with mappings on every element
Mapping tables SSSOM (Simple Standard for Sharing Ontological Mappings) one row per mapping: subject, predicate (skos:exactMatch, skos:closeMatch …), object, justification a mapping with its reason

8.20.2 Two layers

A business model's values exist in two layers that the extraction keeps apart (CLAUDE.md (CLAUDE.md), 8.7), and constraints go on only one of them:

Layer Describes Constraints Status
Claim what the model may say: per property a list of candidates, each a raw value and its passage structure only — the keys are required, but each list may be empty: no minItems, pattern, minLength, minimum or ifabsent default. An empty field is a valid answer, and a constraint here would let the self-correcting validation loop push the model into inventing a value — the reason CLAUDE.md forbids minLength on the claim's schema not in the catalogue; the claim's schema is generated from the record (8.11.4)
Normalised the typed value after the citation check and the normaliser (8.21.1) ranges, patterns, minimums, enums; a violation becomes a flag on the datum for the reviewer, never a retry described by FeeCheck's catalogue; the normaliser planned

Only a claim layer's schema is ever used to validate a model answer.

8.20.3 Working on a catalogue

The tools run through uv and are not part of ./gradlew build, which stays offline and unchanged. The versions are pinned here; Python 3.12, because the LinkML stack does not support 3.14 yet. From the model's catalogue folder — FeeCheck's shown, with its schema feecheck.yaml and its tree root FeeAgreement:

uvx --python 3.12 --from linkml==1.12.1 linkml-lint --config .linkmllint.yaml feecheck.yaml
uvx --python 3.12 --from linkml==1.12.1 linkml-validate -s feecheck.yaml -C FeeAgreement examples/ima-acme-corp.yaml

The SSSOM command line's validate returns success even for a malformed file in version 0.4.17, so the table is checked through the library:

uvx --python 3.12 --from sssom==0.4.17 python -I -c "from sssom.parsers import parse_sssom_table; from sssom.validators import validate; from sssom.constants import SchemaValidationType as V; validate(parse_sssom_table('mappings.sssom.tsv'), [V.JsonSchema, V.PrefixMapCompleteness], fail_on_error=True); print('valid')"

After editing the schema, run all three.

8.20.4 The catalogue and the extraction

What the model may say is ExtractionClaim; what each field means, it reads in the hand-written prompt (ExtractionPrompt), and ExtractionClaimTest pins that the prompt asks for every key the schema declares. No schema is sent with the request: the extraction loop takes the answer's text, and Spring AI's StructuredOutputValidationAdvisor generates the schema from the record only to validate each answer, appending the validation error to the user message and asking again. The answer goes to ExtractionResponseParser as text, the citation check derives the verdict, and ExtractionResult holds what survived (CLAUDE.md (CLAUDE.md), 8.11.4).

What exists.

Tool What it does What it lacks
OntoGPT / SPIRES (Monarch Initiative) takes a LinkML schema and free text, builds the prompt from each property's name or a custom prompt, recurses into nested classes, and grounds leaf entities to identifiers of existing vocabularies; its paper reports extraction accuracy comparable to mid-range relation-extraction methods and strong grounding compared with the bare model, on biomedical benchmarks, not on contracts reads the model's output as pseudo-YAML, not strict YAML or JSON; no text span or evidence per extracted value — only the source document
LinkML's guidance for AI prompts generates Pydantic models or JSON Schema from the schema and passes that to the model as a function or structured-output definition no validation loop of its own; recommends validating the output before it is trusted
LinkML's Java generator (gen-java) emits Java records with --template-variant=records the default variant uses Lombok; no statement on how actively it is maintained was found

The roles a catalogue could take. An assessment from the sources below, not a decision:

Role Assessment
descriptions and examples the model reads good — property descriptions and examples feed the prompt's text, generated into it or checked against it by a test as ExtractionClaimTest does for the keys; most of the extraction quality comes from there
code lists for the normaliser good — the deterministic normaliser maps a wording to a code from the entries' meaning and aliases, with no LLM involved
the schema each answer is validated against with a parity test — LinkML would generate a JSON Schema for the claim layer, and a committed copy would be compared in a plain JUnit test with the schema Spring AI generates from the record, so drift would fail the build and no Python would enter it. The advisor could take the LinkML schema directly (outputJsonSchema(...), exclusive with outputType(...)), but that would no longer keep the record as the source
generating the Java records poor — it blurs the hand-written split between claim and result, and Lombok is the default variant
adopting OntoGPT no — Python, pseudo-YAML parsing, and no evidence per value, which the citation check rests on
one prompt per nested class, as SPIRES does worth considering, at a price — one extraction call per part of the model: smaller schemas and answers, and a failure in one part does not empty the others; but the document is sent once per call, which multiplies input tokens and latency against the cost and response-time requirements, and the per-call machinery (prompt markers, telemetry, the ambiguity rule) runs per part; grouping parts into a few calls is the middle way
SSSOM not shown to the model — it documents mappings, feeds an export crosswalk and marks mappings an LLM proposed as unreviewed

How far the catalogue drives the extraction:

TBD

8.20.5 Sources