Every organisation has a handful of words everyone uses and nobody ever stops to define: ask three different teams what a piece of “equipment” or a “supplier” actually is, and everyone will nod along while picturing something different in their heads. Humans get away with that more often than we probably should, because we quietly fill in the gaps from experience (at least until two departments eventually try to merge their spreadsheets and nothing lines up anymore).
Now, drop an LLM into the middle of that. Not just any, a frontier LLM, the best of the best. The usual assumption is that if your tables and categories have sensible names and labels, maybe with a quick one-line description attached, the AI will just figure it out. Sitting down to agree on strict, carefully worded definitions feels like pure bureaucracy. Who really has the time for that? You may have also heard a few colleagues use metaphysics as a swear word. Nobody has time for that.
I keep wondering how true that actually is, so I decided to run a small experiment that you may hopefully find interesting. I put together a tiny, self-contained scenario borrowed from two domains where getting words wrong carries weight: pharmaceutical quality checks and border customs screening.
Picture a pallet of chemical drums sitting in a port for inspection, or arriving in quarantine at a pharma site. Before anyone clears those drums, you really only need to answer three fairly basic questions:
- Who made the chemical?
- The record mentions a “batch”: is it talking about the physical drums that came out of a factory reactor, a tiny glass sample pulled at the dock, or a tray of 24 vials that sat inside a lab machine?
- Which file is a shipping form written by the seller (claiming it is harmless industrial glycol), and which one is a lab scan pointing to something restricted?
I turned this scenario into a small ontology of just 12 categories and 15 records. I wanted to see what happens when you hand those exact three questions to very different tools: a classic logic engine (a reasoner, which follows strict logic rules), a couple of local AI models, and a frontier reasoning model, first with no definitions at all, then with casual everyday ones, and finally with strict, tightly written ones.
| What’s Inside |
|---|
12 CategoriesSupply Chain Role: Manufacturer Role, Broker Role, Carrier RoleInspected Material: Production Batch, Forensic Specimen, Assay Run TrayInspection Record: Shipping Manifest, Spectroscopy Datum, Quarantine Directive |
| 15 Records (Consignment FX-204) Companies: Helios Chemical Supply Ltd, Vanguard Precision Works, Meridian Freight LinesRoles: Role H1, Role V1, Role M1Activities: Activity 404 (Reactor Synthesis), Activity 901 (Brokered Invoice), Activity 550 (Container Transit), Assay 77 (Port Raman Scan)Materials: Consignment FX-204 Drums, Vial FX-204-A, Batch Lab-09Documents: Inspection Record 88A, Inspection Record 44B |
1. Starting from BFO 2020
Before naming anything in the ontology, I anchored the schema to BFO 2020 (ISO/IEC 21838-2) and IAO. And I had to make two structural decisions:
- Keeping Continuants and Occurrents strictly disjoint. Things that persist over time (organisations, chemical drums, vials, inspection records) cannot simultaneously be processes that unfold in time (chemical synthesis, commercial title transfer, cargo transport, Raman assay).
- Putting everything into clean upper buckets:
bfo:MaterialEntityfor organisations and physical materials,bfo:Rolefor relational roles realised in specific processes (a company isn’t intrinsically a manufacturer just because its trading name sounds industrial; it bears a role when it actually runs synthesis),iao:InformationContentEntityfor records about cargo, andbfo:Processfor mutually disjoint supply-chain and assay activities (ChemicalSynthesis,TitleTransfer,CargoTransport,RamanAssay).

None of this is domain-specific yet, which is the point. We already have a clear separation between who runs a process, what physical material comes out of it, and which document makes a claim about it.
2. Siblings and Unclassified Consignment
In practice, bad classifications rarely cross distant branches of an ontology. Nobody confuses a centrifuge with a legal invoice. Where things actually get messy is between close siblings sitting under the same parent class, especially when different teams reuse the same words for different things (classic faux amis).
So I built three sibling triads under three parent classes and left every definition slot empty to start with:
| Parent Genus | Sibling 1 | Sibling 2 | Sibling 3 |
|---|---|---|---|
:SupplyChainRole (< bfo:Role) | :ManufacturerRole | :BrokerRole | :CarrierRole |
:InspectedMaterial (< bfo:MaterialEntity) | :ProductionBatch | :ForensicSpecimen | :AssayRunTray |
:InspectionRecord (< iao:ICE) | :ShippingManifest | :SpectroscopyDatum | :QuarantineDirective |

Then I added a concrete test consignment (Consignment FX-204) with realistic naming traps. Here, every suspect individual is asserted only at its generic parent class, plus its process links. Look at this carefully:
1. Role trap
On a quick glance, “Helios Chemical Supply Ltd” looks like a chemical supplier, when in fact it only brokered the invoice.

2. "Batch" as a faux ami
All three items are typed only as :InspectedMaterial. Anyone who has worked with pharma LIMS exports or customs lab sheets knows the headache: things such as instrument queue trays get exported under the label "Batch" all the time.

3. Claims vs. sensor output
Both files are typed only as :InspectionRecord, with conflicting notes attached:

3. Two Ways to Write Definitions: Casual Notes vs. Strict S = G + D
To test what definitions alone do (still with zero OWL equivalentClass or disjointWith axioms), I wrote two completely different sets of definitions over the same skeleton.
Condition 2A: Everyday Definitions
In 02a_sloppy_defs_no_axioms.ttl, I wrote the sort of loose descriptions people usually type in when they just want to fill empty fields and move on:
:ManufacturerRole: “A supply chain role of an organization that provides, sources, or supplies chemical materials into the supply chain (e.g., factories or wholesale vendors).”:CarrierRole: “Typically a logistics company or shipper handling chemical drums in transit.”:ProductionBatch: “A production batch of chemical items grouped together under one batch ID in manufacturing or laboratory operations (e.g., synthesis lots or assay trays).”:AssayRunTray: “Typically a laboratory run batch of 24 vials processed together in an instrument.”:ShippingManifest: “A document or record stating the chemical identity, purity, and origin of a batch (e.g., customs declaration or test certificate).”
In my custom ontology workbench, I made a tool that flagged 5 out of 12 domain classes straight away on simple rules:
:ProductionBatch:Circular(“A production batch…”) andExamples(“e.g., synthesis lots or assay trays”). Look what sneaked in there: the sentence drags “laboratory operations” and “assay trays” into the scope of a manufacturing lot.:ManufacturerRole:Examples(“e.g., factories or wholesale vendors”), alongside loose verbs (“provides, sources, or supplies”) that bleed straight into:BrokerRole.:ShippingManifest:Examples(“e.g., customs declaration or test certificate”), blurring an unverified broker claim with a lab certificate.:AssayRunTray:Hedge(“Typically…”).:CarrierRole:Hedge(“Typically…”).
There are tons of these in companies’ definitions.

Condition 2B and 3: Strict Aristotelian S = G + D + Translator’s Notes (skos:scopeNote)
Next, I rewrote all 12 definitions using the Aristotelian Species = Genus + Differentia (S = G + D) pattern. Everything contextual (warnings about LIMS faux amis, cautions, distinctions) went out of the definition annotation property and into layer 2, skos:scopeNote, basically functioning like a translator’s note:
:ManufacturerRole
Definition: “A supply chain role borne by an organization that executes a chemical synthesis process producing a production batch.”skos:scopeNote: “Distinguished from BrokerRole by direct execution of ChemicalSynthesis rather than title transfer alone.”:ProductionBatch
Definition: “An inspected material formed as a homogeneous portion of chemical substance produced as the output of a single chemical synthesis process.”skos:scopeNote: “Do not merge with LIMS AssayRunTray (‘analytical batch’): a drum lot exists prior to and independently of lab testing.”:SpectroscopyDatum
Definition: “An inspection record generated as the measurement output of a Raman spectroscopy assay performed on a forensic specimen.”skos:scopeNote: “Empirical instrument output (MASINT/QC assay), authoritative over self-declared manifests during port triage.”
That brought the linter count from 5 flagged classes down to 0 without losing information at the entity level. Then, for condition 3 (full BFO axioms and strict definitions), I mirrored the English differentiae in OWL using owl:equivalentClass plus pairwise owl:disjointWith across every sibling triad and process sibling.

4. Running Three Competency Questions Across Reasoners and LLMs
I tested every variant against three straightforward competency questions (CQ1 to CQ3):
| CQ | Question | Candidates | Ground Truth |
|---|---|---|---|
| CQ1 | Which organisation bears :ManufacturerRole? | :Org_Helios_Supply:Org_Vanguard_Works:Org_Meridian_Freight | :Org_Vanguard_Works |
| CQ2 | Which inspected material fits :ProductionBatch? | :Lot_FX204:Unit_FX204_A:Batch_Lab09 | :Lot_FX204 |
| CQ3 | Which inspection record fits :SpectroscopyDatum? | :Record_88A:Record_44B | :Record_44B |
Part A: Deterministic SPARQL and the OWL Reasoner
On the symbolic side, the behaviour is completely cut and dry:
| Graph Variant | Reasoner Off | Reasoner On (Include Inferred) | Outcome |
|---|---|---|---|
| no defs, no axioms | 0/3 | 0/3 | All candidates sit at parent classes and SPARQL naturally returns empty sets. |
| casual defs, no axioms | 0/3 | 0/3 | Definitions sit in annotations and the query engine can’t read prose. |
S = G + D defs, no axioms | 0/3 | 0/3 | Even spotless human definitions classify nothing symbolically on their own. |
| strict definitions + OWL axioms | 0/3 | 3/3 (100%) | CQ1 → Org_Vanguard_Works, CQ2 → Lot_FX204, CQ3 → Record_44B. A 3-hop cascade classifies Lot_FX204 → ProductionBatch, Unit_FX204_A → ForensicSpecimen, and Batch_Lab09 → AssayRunTray. |

Part B: Local Offline LLMs
What happens when we hand the same graph to a local LLM instead?
I ran all five conditions offline across Qwen3.5-35B-A3B-4bit and a small edge model (Qwen3-0.6B-4bit), doing 5 runs per competency question (1 greedy run at temp 0.0 + 4 sampled runs at temp 0.5, so 15 trials per condition). I also included an ablation condition (1B) where readable camel case names were replaced with opaque IDs like :CLASS_06. Condition 3 was where the prompt included the pre-materialised reasoner types alongside strict definitions and OWL axioms.
Because output formatting noticeably shifts LLM behaviour, I kept the full numbers from both JSON prompt schemas I tested:
| Condition Tested | Qwen3.5-35B Reason-First RAG (reason → matches) | Qwen3.5-35B Conservative Abstain (matches → reason) | Qwen3-0.6B Edge Model (matches → reason) |
|---|---|---|---|
| 1B Bare + Masked IDs (no defs, no axioms) | 0.0% (0/15) | 0.0% (0/15) | 0.0% (0/15) |
| 1A Bare + English labels (no defs, no axioms) | 53.3% (8/15) | 0.0% (0/15) | 0.0% (0/15) |
| 2A Everyday definitions only (no axioms) | 93.3% (14/15) | 0.0% (0/15) | 0.0% (0/15) |
2B Strict S = G + D definitions only (no axioms) | 100.0% (15/15) | 60.0% (9/15) | 0.0% (0/15) |
| 3 Reasoner + Strict definitions + OWL | 100.0% (15/15) | 66.7% (10/15) | 0.0% (0/15) |
A few things stand out here once you look closely at the actual traces.
Without definitions, the LLM is mostly guessing from English class names (1B = 0%, 1A = 53.3%)
Strip out the readable camel case labels (1B, :CLASS_06 instead of :ProductionBatch) and Qwen3.5-35B drops straight to 0.0% (0/15). It has no idea what the graph means. Even with readable English names left in (1A), reason-first RAG barely clears a 50/50 choice at 53.3%: CQ1 passed 3/5 times only because "ChemicalSynthesis" sounds close enough to "Manufacturer", while CQ2 failed 0/5. Under conservative abstention rules, 1A scored 0/15. What becomes apparent is that when people tell you an undocumented ontology “already works fine with an LLM”, the model is usually just leaning on English label tokens rather than understanding the structure.
Casual examples in a definition actively pull the model into false positives (2A, CQ2)
Under conservative abstention rules, 2A_sloppy scored 0/15 (0.0%), which is no better than having no definitions at all. Hedges like “Typically…” and vague phrasing like “provides, sources, or supplies” leave no clean boundary to rely on for the model (and, to be fair, for humans too).
Even more interesting is what happened in reason-first RAG mode on CQ2 run 5 under 2A_sloppy. Remember that :ProductionBatch had both circular phrasing (“A production batch…”) and that casual parenthetical (“(e.g., synthesis lots or assay trays)”), while :Batch_Lab09 carried the ordinary LIMS label "Batch Lab-09". Given those two ingredients together, the model returned both Lot_FX204 and Batch_Lab09 as a :ProductionBatch, explaining:
“The ontology defines :ProductionBatch as a subclass of :InspectedMaterial, and the graph facts explicitly label :Lot_FX204 as ‘Consignment FX-204 Drums’ and :Batch_Lab09 as ‘Batch Lab-09’, aligning with the semantic definition of production batches, whereas :Unit_FX204_A is explicitly labeled as a ‘Vial’ and linked via :sampledFrom.”
In pharma QA or customs triage, lumping a 24-vial analytical tray (Batch Lab-09) into a bulk synthesis drum lot breaks chain-of-custody and batch genealogy completely. And to be honest, you can’t even blame the LLM here because it simply followed the definition I gave it.
Even with reasoner output in the prompt, JSON key order tripped the local model
Look at Condition 3 under the answer-first JSON schema ({"matches": [...], "reason": "..."}). Qwen3.5-35B got 5/5 on CQ1 and 5/5 on CQ3, yet scored 0/5 on CQ2 (66.7% overall), even though :Lot_FX204 a :ProductionBatch was explicitly printed in the prompt. Why? Look at Run 1 verbatim:
{"matches": [], "reason": "Only :Lot_FX204 is explicitly typed as :ProductionBatch in the reasoner output, whereas :Unit_FX204_A is typed as :ForensicSpecimen and :Batch_Lab09 is typed as :AssayRunTray."}
Because "matches" came before "reason" in the schema, the model emitted [] first and then immediately contradicted itself two tokens later inside "reason". Flipping the JSON keys to "reason" before "matches" pushed CQ2 straight to 5/5 (100%). As for the 0.6B edge model, it scored 0/15 across every single condition: even in Condition 3, it returned ["Lot_FX204", "Unit_FX204_A", "Batch_Lab09"] and claimed all three were explicitly defined as :ProductionBatch. It seems small models can’t stand in for symbolic reasoning.
Part C: With a Frontier Model
You could obviously argue here that Qwen3.5-35B and Qwen3-0.6B are local open-weights models, not a state-of-the-art frontier system. So I ran the exact same five conditions and two prompt modes against a frontier Gemini reasoning model, Neon (3 isolated, blind runs per competency question, so 9 trials per condition, with no workspace access):
| Condition Tested | Frontier Model (Reason-First RAG) | Frontier Model (Conservative Abstain) | What Happened |
|---|---|---|---|
| 1B Bare + Masked IDs (no definitions, no axioms) | 0.0% (0/9) | 0.0% (0/9) | Refused to guess on opaque IDs (:CLASS_02, :CLASS_06, :CLASS_11). |
| 1A Bare + English labels (no definitions, no axioms) | 100.0% (9/9) | 0.0% (0/9) | Guessed 100% right from camel case names in RAG; cleanly abstained when told to stay strict. |
| 2A Everyday definitions only (no axioms) | 33.3% (3/9) | 0.0% (0/9) | Worse than no definitions at all: CQ1 (0/3) pulled in broker Org_Helios_Supply, CQ2 (0/3) pulled in Batch_Lab09, and in abstain mode CQ3 (0/3) pulled in Record_88A too. |
2B Strict S = G + D definitions only (no axioms) | 100.0% (9/9) | 100.0% (9/9) | Clean 3/3 across every competency question in both modes. |
| 3 Reasoner + Strict definitions + OWL | 100.0% (9/9) | 100.0% (9/9) | No JSON key-order bug; matched deterministic reasoner output every time. |
To be fair, the frontier model is noticeably sharper than the local models. It did not fall for the JSON key-order bug, it guessed 9/9 from bare English labels in RAG mode (whereas Qwen3.5-35B got 53.3%), and when I also ran 3 blind trials on the contradictory file (where :Record_88A is spoofed as :SpectroscopyDatum and owl:disjointWith is in the Turtle), it read the disjointness axiom and rejected :Record_88A 3/3 times on its own.
The real surprise is Condition 2A. Adding casual everyday definitions actually dropped the frontier model from 100% (9/9) with bare English labels down to 33.3% (3/9) in RAG mode, and 0% (0/9) in strict mode (with false positives on all three questions).
Why did a smarter model do worse on sloppy definitions than Qwen3.5-35B (93.3%)? Because a frontier reasoning model is much better at taking ontologies literally. When :ManufacturerRole casually says “provides, sources, or supplies chemical materials (e.g., factories or wholesale vendors)”, :ProductionBatch says “(e.g., synthesis lots or assay trays)”, and :SpectroscopyDatum just says “technical data describing the chemical composition of an inspected batch”, the model doesn’t shrug and rely on something similar to common sense. It follows the wording strictly, and so classifies the invoice broker as a manufacturer, pulls the 24-vial lab tray into the production batch, and under strict evaluation even accepts the shipper’s manifest as spectroscopy data.
In other words, moving to a frontier model does not rescue sloppy ontology definitions. If anything, it makes loose wording more reliably dangerous, while clean Aristotelian definitions and explicit OWL axioms bring it cleanly back to 100%.
5. Why Strict Definitions Alone Still Aren’t Enough
Now, looking at that reason-first column, there is an obvious question: if strict S = G + D definitions on their own (2B) already hit 100% on both Qwen3.5-35B and the frontier model, why bother writing owl:equivalentClass and owl:disjointWith axioms at all?
To be fair, on a clean little graph where nobody is lying, strict prose definitions perform pretty well. The trouble starts as soon as dirty upstream data (or a deliberately doctored customs form) lands in your graph.
In this test, I added one single triple: :Record_88A a :SpectroscopyDatum. That is the broker’s "99.4% industrial glycol" manifest submitted by :Org_Helios_Supply, now being passed off as lab sensor data.
- With definitions only (
2B) and no reasoner, nothing stops it. A plain SPARQL query onCQ3gives:Record_88Aas empirical spectroscopy evidence (which is wrong). Even withequivalentClasswithoutdisjointWith, an inferred query just returns both:Record_88Aand:Record_44B. - With pairwise
owl:disjointWithaxioms enforced, the reasoner stops immediately:
Ontology inconsistency: Individual 'Record_88A' belongs to mutually disjoint classes 'SpectroscopyDatum' and 'ShippingManifest'.

The way I think about it, definitions tell humans (and LLMs) what a class actually refers to in reality, whereas disjointness and equivalence axioms are what catch a pipeline when it tries to cross a line reality does not allow.