Manuscript Offprint
arXiv:2611.12095From Fluent Text to Ontology-Compatible Definitions: A Quality-Control Agentic Workflow
ARTICLE INFO
Keywords:
Large language models
Biomedical ontologies
Structured knowledge systems
Knowledge compatibility
Quality control
Ontology engineering
ABSTRACT
Biomedical ontologies are structured knowledge systems that must evolve continuously to represent newly emerging knowledge, but their manual maintenance remains time-consuming and labor-intensive. Textual definitions are especially costly because they must be readable to humans and compatible with controlled entities, relations, and logical constraints. Large language models (LLMs) offer a promising way to assist ontology engineering tasks, including definition generation. However, textual plausibility does not guarantee knowledge-system compatibility. A generated definition may be fluent and close to a reference definition, yet still fail to ground its implied entities or violate ontology-level constraints. Directly inserting such definitions into ontology libraries may therefore introduce entity-level hallucinations and logical inconsistencies. To address this problem, we propose two structured-knowledge incompatibility metrics, Entity Error Rate (EER) and Logical Inconsistency Rate (LIR), to quantify entity grounding and logical consistency for LLM-generated ontology definitions. We further develop an agentic quality-control (QC) workflow that treats definition generation as an iterative process rather than a direct decoding step: it generates definitions, extracts axioms, checks entity existence and logical consistency, and uses the resulting diagnostics to drive repair loops. Comprehensive experiments on Disease Ontology, Uberon Ontology, and Uberon-Constraint-Stress demonstrate that EER and LIR complement conventional reference-based metrics by evaluating whether generated content can be grounded and checked inside the target ontology. The workflow effectively decreases EER while maintaining strong conventional text-generation performance. LIR further exposes sparse ontology-level logical failures that are invisible to text similarity metrics, although their repair remains limited.
Large language models (LLMs) are a natural candidate for reducing this burden because they can turn sparse ontology context, such as class names and parent terms, into fluent draft definitions at scale (Brown et al., 2020; Babaei Giglou
et al., 2023; Val-Calvo et al., 2025). These drafts can reduce the amount of manual writing curators must perform from scratch. Recent biomedical LLM studies further show that domain-adapted language models can support specialized scientific text tasks (Labrak et al., 2024). Given a term name and its parent context, an LLM can often produce fluent biomedical definitions that resemble curated ontology text. This makes LLM-assisted definition generation a plausible way to support ontology maintenance.
However, LLM-generated drafts still require ontology-aware validation, and the main challenge is evaluation. Standard generation metrics quantify whether a generated definition is lexically or semantically close to a reference. These metrics include token overlap, Recall-Oriented Understudy for Gisting Evaluation (ROUGE), Bilingual Evaluation Understudy (BLEU), BERTScore, a metric based on Bidirectional Encoder Representations from Transformers (BERT), and sentence-embedding similarity (Papineni et al., 2002; Lin, 2004; Zhang et al., 2019; Reimers and Gurevych, 2019). These metrics are useful, but they measure text similarity rather than compatibility with the target knowledge system. A definition can be fluent and reference-like while still mentioning a nonexistent entity, using an unresolved relation, or
Corresponding authors
sxiao20@jh.edu (S. Xiao); hejianping@bfsu.edu.cn (J. He); lizhao.informatics@gmail.com (Z. Li)
Feng et al.: Preprint submitted to Elsevier
Page 1

Figure 1: Evaluation framework for LLM-generated ontology definitions. Text-generation metrics measure similarity to reference definitions. Knowledge-compatible evaluation, instantiated here for ontologies, also checks entity grounding and logical consistency.
adding a relationship that makes the class unsatisfiable after it is merged into the ontology.
Figure 1 illustrates this gap with a concrete definition example. The generated definition is fluent and closely resembles the reference definition, but it changes the anatomical entity from “sphenoid bone” to “pterygoid bone.” A text-similarity metric may still assign a high score because most words and sentence structure are shared. For ontology use, however, this is not enough. The mentioned entity must be grounded to an identifier in the target ontology, the implied relation must be resolved, and the resulting axiom must be compatible with existing ontology constraints. If the entity cannot be grounded or an axiom conflicts with disjointness or other strong constraints, it can make the generated class unsatisfiable (Ji et al., 2023).
We therefore study ontology definition generation as a quality-controlled knowledge-compatible generation problem. Instead of treating the generated definition as the final artifact, we place generation inside an agentic quality-control (QC) workflow. The workflow uses ontology tools to inspect intermediate outputs, receive diagnostic feedback, and repair candidates when needed. This design follows a broader line of LLM agent and tool-use work in which models call external tools, use feedback, and refine outputs over multiple steps (Yao et al., 2022; Schick et al., 2023; Madaan et al., 2023; Shinn et al., 2023).
We also introduce two metrics that separate structured-knowledge failures from ordinary text quality. Entity Error Rate (EER) measures unresolved or ungrounded extracted axioms. Logical Inconsistency Rate (LIR) measures reasoner-detected incompatibility among entity-grounded candidates. These metrics are instantiated here for biomedical ontologies, but they reflect a broader principle: generated content for a structured knowledge system should be checked against the entities, relations, and constraints of that system.
Our evaluation covers both realistic release-based ontology maintenance settings and a targeted stress setting. For DO and Uberon, we evaluate on incremental release data that reflect newly added or newly defined classes. To better assess
logical consistency, we also construct Uberon-Constraint-Stress, a subset enriched for classes involved in strong constraints such as disjointness. Together, these settings test whether the QC workflow can detect entity-grounding and logical failures that ordinary text metrics cannot.
This paper makes four contributions:
- We frame LLM-assisted ontology definition generation as a knowledge-compatibility problem, instantiated in biomedical ontologies, rather than only as a text-generation problem.
- We propose two structured-knowledge incompatibility metrics: Entity Error Rate (EER), which measures entity-grounding failures, and Logical Inconsistency Rate (LIR), which measures reasoner-detected incompatibility among entity-grounded candidates.
- We introduce an axiom-based agentic QC workflow that combines definition generation, axiom extraction, entity existence checking, ROBOT-based reasoning, and iterative repair.
- We evaluate the workflow on DO, Uberon, and Uberon-Constraint-Stress, report both conventional text-generation metrics and structured-knowledge incompatibility metrics, and release the constructed evaluation datasets for reuse.
Overall, the results show that fluent, reference-like definitions are not necessarily ready for integration into a target knowledge system. The QC modules expose two failure modes that text metrics miss: extracted entities or relations may fail to ground, and grounded candidates may still conflict with ontology-level constraints. The repair loops reduce many entity-grounding failures before curator review, while the remaining logical failures show why symbolic validation is still needed even when generated text appears strong. More broadly, these findings support a layered view of LLM-assisted structured-knowledge generation: language models can draft useful content, but external knowledge-system
Feng et al.: Preprint submitted to Elsevier
Page 2 checks should decide whether that content can be grounded, repaired, or safely accepted.
2. Related Work
2.1. Biomedical Ontologies and Definition Curation
Biomedical ontologies provide shared class identifiers, labels, definitions, relations, and logical axioms for data integration. This follows the broader view of an ontology as an explicit specification of a conceptualization (Gruber, 1993). The OBO Foundry established principles for coordinated ontology development, including openness, common formats, orthogonality, textual definitions, and formal relations (Smith et al., 2007; Jackson et al., 2021). The Web Ontology Language (OWL) provides a formal language for representing classes, relations, and logical axioms in machine-interpretable ontologies (W3C OWL Working Group, 2012). DO provides a structured disease vocabulary for integrating disease knowledge across biomedical resources (Schriml et al., 2012, 2019). Uberon provides a cross-species anatomy ontology that integrates anatomical entities and supports reasoning through rich logical relationships (Mungall et al., 2012).
Definition authoring in these resources is labor-intensive because a useful definition must be readable to domain users while remaining compatible with the ontology's formal structure. Missing definitions limit interpretability, and weak or inconsistent definitions reduce the utility of ontology-mediated search, annotation, and reasoning. Our work focuses on this curation bottleneck, but treats definition generation as one step in a broader validation workflow rather than as standalone text production. This focus is consistent with ontology engineering practices that emphasize reuse, cross-resource lookup, and automated release workflows (Courtot et al., 2011; Whetzel et al., 2011; Matentzoglu et al., 2022).
2.2. LLMs for Ontology Engineering
Recent work has explored LLMs for ontology learning and ontology engineering, including term typing, taxonomy discovery, non-taxonomic relation extraction, ontology population, and ontology generation (Brown et al., 2020; Babaei Giglou et al., 2023; Zhang et al., 2024; Kommineni et al., 2024; Fathallah et al., 2024; Li et al., 2025; Val-Calvo et al., 2025). These studies show that LLMs can provide useful candidate structures and reduce manual modeling effort, while also observing that complex modeling decisions remain difficult and require validation. Parameter-efficient adaptation methods such as Low-Rank Adaptation (LoRA) make it practical to specialize open LLMs for domain-specific generation tasks (Hu et al., 2022; Team, 2024). Definition generation is closely related: the model must synthesize fluent domain text from ontology context, and the generated text may contain implicit ontological commitments that affect the formal model.
Biomedical representation learning has also used definitions as an important source of semantic grounding. For example, definition-based biomedical concept representations
can better capture concept meaning than names alone (Remy et al., 2022). Our goal is complementary. Rather than using definitions only as training signal for representations, we generate candidate definitions and then test whether they can be grounded back into ontology entities and axioms. This is also related to schema-guided extraction work such as SPIRES/OntoGPT, where LLM outputs are normalized against existing ontologies and vocabularies (Caufield et al., 2024).
2.3. Text- and Knowledge-Level Evaluation of Generated Content
Automatic text-generation metrics such as BLEU, ROUGE, BERTScore, and embedding cosine similarity are useful for measuring lexical overlap, sequence-level similarity, and contextual semantic similarity (Papineni et al., 2002; Lin, 2004; Zhang et al., 2019; Reimers and Gurevych, 2019). For generated ontology definitions, these metrics are useful baselines because a candidate definition should generally resemble curated text for the same class. However, text-level similarity does not show whether the content can be grounded in, checked by, and integrated into the target knowledge system.
Recent work on factuality and hallucination evaluation has moved in this direction. Instead of judging only whether generated text sounds plausible or matches a reference, these approaches decompose text into checkable claims or compare generated content with external knowledge resources (Ji et al., 2023; Min et al., 2023). Related work on LLMs and knowledge graphs also emphasizes that structured knowledge can be used to ground model outputs and identify unsupported claims (Pan et al., 2024; Lavrinovics et al., 2025). This line of work is closer to the needs of ontology generation than surface text metrics alone, because ontology definitions are connected to controlled entities, relations, and formal constraints. The remaining gap is system-level compatibility: even a plausible statement must use entities and relations that the target knowledge system can resolve and validate.
Ontology definition generation adds a further requirement because ontology libraries are structured knowledge systems. A new term should be explained using existing ontology terms, rather than free text alone. Terms are connected through subclass, partonomy, disjointness, and other relations, and each ontology term is associated with at least one axiom. Thus, generated definitions may imply relationship axioms that must be usable inside the ontology. A valid-looking definition can still mention an entity that does not exist, use a relation that cannot be resolved, or produce an axiom that makes a class unsatisfiable. Therefore, knowledge-compatible evaluation needs signals beyond reference similarity. In our workflow, text metrics remain part of the evaluation, but they are complemented by axiom parse rate, predicate-object matching, entity grounding checks, EER, and LIR. This combination exposes cases where two definitions are textually similar but ontologically different,
Feng et al.: Preprint submitted to Elsevier
Page 3

Figure 2: Axiom-based quality-control workflow. The existence loop retries definition generation and axiom extraction for records with unresolved predicates or objects. The logic loop keeps the generated definition fixed and revises only the extracted axioms for records that become unsatisfiable after ROBOT reasoning; it does not trigger definition regeneration, because allowing both definition-level and axiom-level repair in the logic loop could create many additional iterations even with per-loop retry limits.
or where a fluent definition cannot be safely merged into the ontology.
2.4. Ontology Quality Control and Reasoning
Ontology engineering workflows commonly use automated tools to enforce format, merge, and reasoning checks. ROBOT is a standard command-line tool for automating ontology workflows, including template conversion, merging, module extraction, and reasoning (Jackson et al., 2019). Reasoners such as ELK, an OWL 2 EL reasoner, are widely used for scalable OWL EL classification and satisfiability checking (Kazakov et al., 2014). These tools are typically applied to curated ontology releases or manually edited ontology modules.
Our work brings these QC tools into the LLM generation loop. Generated text is not accepted solely because it is fluent or close to a reference. Instead, it is converted into candidate axioms, checked for resolvable entities, merged into a replacement ontology, and tested with ROBOT reasoning. This turns knowledge-compatible generation into an operational workflow for ontologies: LLMs propose, symbolic checks diagnose, and repair loops revise the outputs before they reach human curation.
3. Methodology
We formulate ontology definition generation as a constrained knowledge-compatible generation problem. Biomedical ontologies provide a concrete setting in which generated text can be checked against the entities, relations, and constraints of a structured knowledge system.
Figure 2 gives an overview of the proposed agentic QC workflow. For each ontology class, the input contains the class name and parent context. The workflow first generates a candidate textual definition. It then extracts predicate–object relationship axioms from that definition, so the generated text can be tested as structured ontology content. The extracted predicates and objects are resolved against the target ontology. If they can be grounded, the workflow converts the candidate into a ROBOT template and validates it with
an ontology reasoner (Jackson et al., 2019; Kazakov et al., 2014).
The workflow uses these tool outputs as feedback for targeted repair. Candidates with unresolved predicates or objects enter an existence loop, which regenerates the definition and re-extracts axioms. Candidates that are grounded but make the ontology unsatisfiable enter a logic loop, which keeps the generated definition fixed and requests axiom-only correction. A candidate is accepted only after it passes the relevant grounding and reasoning checks. The same workflow structure is used for DO and Uberon, with ontology-specific configuration for prefixes, relation labels, release files, and local lookup indices.
3.1. Task Formulation
Each input record contains a class name and its parent classes. Parent context is represented by parent names and parent textual definitions. For supervised training and evaluation, each record also contains a reference definition and a set of relationship axioms. We use two generation stages. The first stage produces a draft textual definition from the class name and parent context. The second stage reads that draft and extracts explicit predicate–object relationship axioms, which provide the structured content used by the downstream grounding and reasoning checks.
Let denote the -th input record, consisting of the target class name and its parent context. The definition generator maps to a candidate textual definition . The axiom extractor then reads , together with the same class name and parent context, and returns a set of extracted relationship axioms for that record:
Here is the number of extracted axioms for record , indexes one extracted axiom within that record, is the relation predicate, and is the object entity. For example, an extracted axiom may state that the target class part of some anatomical structure, where part of is the predicate and the anatomical structure is the object. The extractor emits axioms in a controlled textual format:
Feng et al.: Preprint submitted to Elsevier
Page 4 relationship: predicate: [PREDICATE_NAME], object: [OBJECT_NAME];
This intermediate format allows the workflow to parse model output, resolve predicate and object names into ontology identifiers, and test whether the generated definition can be safely integrated into the ontology.
3.2. Dataset Construction
The datasets are built from ontology GitHub release files. For each release, we collect active, non-obsolete ontology classes, their names, textual definitions, parent classes, and relationship axioms. Definition-generation records use the class name and parent context as input and the curated definition as the target. Axiom-extraction records use the class name, definition, and parent context as input and the ontology-provided relationship axioms as the target.
We first use DO as an initial testbed for evaluating whether generated relationship axioms remain valid after being merged into a complete ontology. For DO, we construct a 2023 training set and two release-based test sets: 2024 and 2025. A DO test record is included when a class is newly added or newly receives a definition in the later release, and when it has relationship axioms for downstream validation. However, strong logical constraints are sparse in DO: in the 2023 release, only 26 of 11,454 active DO terms are involved in strong constraint axioms such as DisjointFrom. This makes DO useful for entity-grounding evaluation but less suitable for stress-testing logical inconsistency after ontology merging.
We therefore add Uberon as a second evaluation ontology. In addition to release-based Uberon test records from newly added or newly defined terms in the 2024 and 2025 releases, we construct Uberon-Constraint-Stress from the 2023 release. This stress set contains all 973 terms involved in strong constraint axioms, and the remaining 9,557 terms are used as the main Uberon training pool. This separation keeps constraint-focused terms out of the main fine-tuning data, so Uberon-Constraint-Stress provides a targeted test of knowledge-compatibility failures inside an ontology.
3.3. Definition Generation
The definition generation stage uses a chat-style LLM prompt. The system prompt instructs the model to act as a biomedical ontology expert and produce concise ontology-style definitions. The user prompt contains only the target term name and parent context. In the initial pass, the model is asked to return only the generated definition. In existence-repair passes, the prompt also includes feedback from the previous failed attempt, including the previous generated definition and unresolved predicate or object diagnostics.
The implementation uses two model families, Qwen2.5-14B-Instruct (Team, 2024) and Llama-3.1-8B-Instruct (Dubey et al., 2024), each evaluated in a base setting and a LoRA-adapted setting fine-tuned on ontology definition records (Hu et al., 2022). The fine-tuning and random-sampling repair settings are reported in Table A.1. Generated text is
stored with the original ontology metadata for downstream axiom extraction.
3.4. Relationship Axiom Extraction
The axiom extraction stage converts a generated definition into explicit relationship axioms. Its prompt contains the term name, generated definition, and parent context, and asks the model to return one or more axiom lines in the controlled predicate-object format. The model uses predicate names and object names rather than Compact Uniform Resource Identifiers (CURIEs) or Internationalized Resource Identifiers (IRIs), because the next stage resolves these names against the target ontology. For each model family, the base setting uses a five-shot prompting setup for axiom extraction. The five examples are fixed training-set records selected to cover terms with different numbers of relationship axioms, so that the prompt includes both simple and axiom-rich cases. The fine-tuned setting replaces this few-shot prompting setup with the corresponding LoRA-adapted axiom extractor trained on ontology axiom records.
For evaluation, reference axioms are attached to definition records by matching ontology identifiers against the axiom dataset. This enables standard axiom-extraction metrics such as parse rate, exact match, predicate-object pair precision/recall/F1, predicate accuracy, object accuracy, and top-1 accuracy. These metrics evaluate whether the generated axiom text matches ontology-provided axioms, but they do not guarantee that the generated output is valid in the target ontology.
3.5. Entity Existence Checking and EER
The first QC module checks whether each extracted axiom can be grounded in the target knowledge system. In the ontology setting, this means that the workflow parses the controlled axiom text into predicate-object pairs, resolves each predicate to a relationship property, and resolves each object to an ontology entity. Resolution first uses a local ontology index built from the target OBO file; Ontology Lookup Service 4 (OLS4) lookup can be enabled for external label resolution (Côté et al., 2006). The check records several failure types, including unparsed axiom text, unresolved predicates, and unresolved objects.
A record passes the existence check only if at least one axiom is parsed and all parsed predicate-object pairs can be resolved. Resolved axioms are serialized into CURIE-based form and passed to ROBOT. We define EER as
where N is the number of generated definition records and is an indicator function. EER therefore measures the proportion of generated records whose extracted axioms cannot be grounded into the target knowledge system, instantiated here as the target ontology.
Feng et al.: Preprint submitted to Elsevier
Page 5
3.6. Logical Consistency Checking and LIR
Records that pass entity existence checking are then tested against the constraints of the target knowledge system. In our ontology instantiation, this validation is performed with ROBOT (Jackson et al., 2019). The workflow creates a dynamic ROBOT template comma-separated values (CSV) file whose rows contain the class identifier (ID), label, generated definition, class type, and one existential restriction column for each extracted predicate. A predicate-object axiom is rendered as a subclass restriction of the form SC P some %. Before merging, the workflow writes the generated class IDs to a replacement-term file and removes their existing records from the base ontology. This replacement step prevents candidate axioms from being combined with older axioms for the same classes. The template ontology is then merged with the pruned base ontology and checked with a reasoner through ROBOT. HermiT provides more complete reasoning support than ELK, but its memory requirements were prohibitive in our setting: even with 400 GB of allocated memory and a ROBOT-extract strategy that reasons over local modules, HermiT did not complete successfully. Therefore, the final workflow uses ELK for reasoning (Kazakov et al., 2014; Glimm et al., 2014).
ROBOT reports classes that become unsatisfiable after reasoning. We count only unsatisfiable classes from the generated candidate set and ignore unrelated unsatisfiable classes already present in the ontology. If a candidate causes a ROBOT Manchester syntax parse error, the workflow removes that record, records it as a template parse skip, and reruns reasoning on the remaining candidates.
We define LIR as
where is the set of workflow candidate classes reported as unsatisfiable by ROBOT reasoning, and is the number of candidates that passed entity existence checking and entered the logic check. The term is the same indicator function defined above. LIR measures ontology-level incompatibility among candidates that are already entity-grounded.
3.7. Iterative Repair Loops
The repair procedure gives the workflow its agentic character: each repair step conditions generation on tool-produced diagnostics, keeps the failed candidate and retry history as context, and chooses the next action according to the type of failure. This agentic repair is implemented through two loops with different scopes. The existence loop handles unresolved predicates, unresolved objects, ambiguous labels, and unparsed axiom text. For each failed record, the retry prompt keeps the original term metadata, the previous generated definition, and the existence-failure diagnostics. The definition generator then produces a new definition, the axiom extractor extracts new axioms, and the existence
checker is rerun. Passing records are accepted into the candidate set. Records that remain unresolved are retried until the loop budget is exhausted.
The logic loop handles candidates that pass entity existence checking but become unsatisfiable after ROBOT reasoning. In this loop, the textual definition is kept fixed. Only the relationship axioms are revised. The logic-failed record is enriched with feedback stating that the class was reported unsatisfiable, the current extracted axioms, and a compact history of previous failed axiom sets. The axiom correction prompt instructs the model to correct unsupported axioms, especially those that may contradict taxon, disjointness, partonomy, or domain/range constraints. Corrected axioms must pass the existence check before they replace the previous candidate axioms. The logic loop then reruns ROBOT reasoning until no workflow candidates are unsatisfiable or the loop budget is exhausted.
3.8. Evaluation Metrics
We report both conventional text-generation metrics and structured-knowledge QC metrics. For generated definitions, the code computes token F1, ROUGE-L, BLEU-2, BERTScore F1 (reported as BERT-F1 in tables), and sentence-embedding cosine similarity against curated reference definitions (Papineni et al., 2002; Lin, 2004; Zhang et al., 2019; Reimers and Gurevych, 2019). BLEU-2 is computed as the average of 1–2-gram BLEU scores. We use BLEU-2 rather than 3–4-gram BLEU because most DO definitions are relatively short, making longer n-gram overlap sparse and less stable. For axiom extraction, it computes parse rate, exact match, predicate-object pair precision/recall/F1, predicate accuracy, object accuracy, and top-1 accuracy against ontology-provided relationship axioms.
The two primary QC metrics are EER and LIR. EER measures failures of entity grounding, while LIR measures reasoner-detected inconsistency among entity-grounded candidates. Together, these metrics capture ontology compatibility errors that may not be reflected by reference-based text similarity metrics.
4. Experimental Results
4.1. Experimental Setup
We evaluate the proposed workflow on release-based ontology maintenance tasks and on a constraint-focused stress test. The release-based tasks simulate a curation scenario in which a model is trained on an older ontology release and evaluated on terms that are newly added or newly defined in a later release. We use this setup for both Disease Ontology (DO) and Uberon. DO provides an initial testbed for release-based definition generation, but it contains too few strong constraints for stress-testing logical inconsistency: in the 2023 release, only 26 of 11,454 active DO terms are involved in strong constraint axioms such as DisjointFrom. We therefore include Uberon and Uberon-Constraint-Stress, a targeted subset of Uberon classes involved in strong constraints.
Feng et al.: Preprint submitted to Elsevier
Page 6

Figure 3: Definition coverage and remaining definition gaps in DO and Uberon. The 2024 and 2025 segments combine newly added active terms with definitions and previously active terms that first received definitions in the newer release.
Table 1
Training and evaluation settings used in the main experiments.
| Ontology | Test setting | Definition train+val | Axiom train+val | Test size |
|---|---|---|---|---|
| DO | 2024 | 9,093 | 4,810 | 188 |
| DO | 2025 | 9,093 | 4,810 | 236 |
| Uberon | 2024 | 9,557 | 9,557 | 96 |
| Uberon | 2025 | 9,557 | 9,557 | 112 |
| Uberon | Constraint-Stress | 9,557 | 9,557 | 973 |
All release-based splits are constructed from GitHub release snapshots. This choice reflects the practical maintenance setting shown in Figure 3: both DO and Uberon still contain many active terms without definitions in 2025, while each annual release adds definitions for only a relatively small number of terms. The DO training set uses the December 2023 release. DO 2024 contains terms newly added or newly defined between the December 2023 and December 2024 releases, and DO 2025 uses the same criterion between the December 2024 and December 2025 releases. For Uberon, the training set uses the 2023-12-08 release. Uberon 2024 compares the 2023-12-08 and 2024-11-25 releases, and Uberon 2025 compares the 2024-11-25 and 2025-12-05 releases. The stress subset is held out from the main Uberon training pool and is used to make ontology-level failures easier to observe. For both ontologies, the training pool is split into training and validation subsets with an 8:2 ratio. Table 1 summarizes the resulting train/validation sizes and evaluation sets.
We compare Qwen2.5-14B and Llama-3.1-8B under base and LoRA fine-tuned settings. All reasoning-based checks use ELK, and entity-existence validation uses the local ontology together with OLS4 lookup. When a repair loop is enabled, the workflow allows at most five retry iterations; no-loop baselines run direct generation once. Retry generations use random sampling so that each repair iteration can explore an alternative candidate rather than simply repeat the previous output. For each setting, we report conventional reference-based text metrics and two structured-knowledge incompatibility metrics: EER and LIR.
4.2. Entity Error Rate Results
Table 2 places EER next to conventional text-generation metrics for the same no-loop and existence-loop pairs. It shows that models can achieve reasonable conventional text-generation scores while still having high EER, especially in base-model settings. After the existence loop, the conventional metric columns usually retain similar shading within each pair, indicating that the repair loop maintains strong surface-similarity performance. In contrast, the EER column often becomes darker, because lower EER is better. This pattern supports the interpretation that the main benefit of the loop is improved ontology compatibility while preserving reference-based text quality.
Figure 4 highlights the EER reductions across the five test settings. Base models often produce many unresolved ontology entities, especially on DO. For Qwen2.5-14B, the loop reduces EER from 67.0% to 37.8% on DO 2024, from 55.1% to 31.8% on DO 2025, and from 52.3% to 2.5% on Uberon-Constraint-Stress. Llama-3.1-8B shows similar reductions, including 69.7% to 45.7% on DO 2024 and 31.0% to 2.3% on Uberon-Constraint-Stress. These results support the central motivation of the workflow: direct generation often produces entity-grounding failures, and a targeted QC loop can remove many invalid outputs before curator review.
LoRA fine-tuning generally improves conventional text metrics, but it does not always remove entity errors. The clearest improvement appears on DO, where fine-tuned models achieve higher lexical and semantic similarity while keeping EER near zero. On Uberon, fine-tuning improves
Feng et al.: Preprint submitted to Elsevier
Page 7
Table 2
Conventional text-generation scores and Entity Error Rate (EER) for the same model-loop settings shown in Figure 4. Darker cells indicate better values: higher conventional scores and lower EER. Arrows in column headers indicate the preferred metric direction.
| Test setting | Model | Loop setting | Token F1 | ROUGE-L | BLEU-2 | BERT-F1 | Cosine | EER |
|---|---|---|---|---|---|---|---|---|
| DO 2024 | Qwen2.5-14B | Base, no loop | 0.283 | 0.222 | 0.107 | 0.608 | 0.664 | 0.670 |
| DO 2024 | Qwen2.5-14B | Base, existence loop | 0.293 | 0.236 | 0.118 | 0.619 | 0.676 | 0.378 |
| DO 2024 | Qwen2.5-14B | LoRA, no loop | 0.588 | 0.579 | 0.380 | 0.731 | 0.766 | 0.016 |
| DO 2024 | Qwen2.5-14B | LoRA, existence loop | 0.588 | 0.579 | 0.381 | 0.731 | 0.766 | 0.000 |
| DO 2024 | Llama-3.1-8B | Base, no loop | 0.310 | 0.240 | 0.115 | 0.593 | 0.642 | 0.697 |
| DO 2024 | Llama-3.1-8B | Base, existence loop | 0.320 | 0.244 | 0.123 | 0.608 | 0.656 | 0.457 |
| DO 2024 | Llama-3.1-8B | LoRA, no loop | 0.580 | 0.562 | 0.372 | 0.725 | 0.764 | 0.005 |
| DO 2024 | Llama-3.1-8B | LoRA, existence loop | 0.580 | 0.562 | 0.372 | 0.725 | 0.764 | 0.005 |
| DO 2025 | Qwen2.5-14B | Base, no loop | 0.327 | 0.253 | 0.143 | 0.636 | 0.688 | 0.551 |
| DO 2025 | Qwen2.5-14B | Base, existence loop | 0.331 | 0.260 | 0.148 | 0.636 | 0.687 | 0.318 |
| DO 2025 | Qwen2.5-14B | LoRA, no loop | 0.606 | 0.602 | 0.399 | 0.739 | 0.771 | 0.000 |
| DO 2025 | Qwen2.5-14B | LoRA, existence loop | 0.606 | 0.602 | 0.399 | 0.739 | 0.771 | 0.000 |
| DO 2025 | Llama-3.1-8B | Base, no loop | 0.345 | 0.257 | 0.139 | 0.611 | 0.658 | 0.708 |
| DO 2025 | Llama-3.1-8B | Base, existence loop | 0.348 | 0.260 | 0.144 | 0.615 | 0.659 | 0.449 |
| DO 2025 | Llama-3.1-8B | LoRA, no loop | 0.608 | 0.605 | 0.396 | 0.727 | 0.759 | 0.017 |
| DO 2025 | Llama-3.1-8B | LoRA, existence loop | 0.608 | 0.605 | 0.396 | 0.727 | 0.759 | 0.000 |
| Uberon 2024 | Qwen2.5-14B | Base, no loop | 0.428 | 0.353 | 0.203 | 0.663 | 0.717 | 0.229 |
| Uberon 2024 | Qwen2.5-14B | Base, existence loop | 0.425 | 0.351 | 0.200 | 0.664 | 0.717 | 0.010 |
| Uberon 2024 | Qwen2.5-14B | LoRA, no loop | 0.428 | 0.374 | 0.228 | 0.699 | 0.742 | 0.052 |
| Uberon 2024 | Qwen2.5-14B | LoRA, existence loop | 0.431 | 0.378 | 0.230 | 0.699 | 0.742 | 0.000 |
| Uberon 2024 | Llama-3.1-8B | Base, no loop | 0.409 | 0.332 | 0.175 | 0.649 | 0.698 | 0.177 |
| Uberon 2024 | Llama-3.1-8B | Base, existence loop | 0.409 | 0.331 | 0.176 | 0.650 | 0.698 | 0.042 |
| Uberon 2024 | Llama-3.1-8B | LoRA, no loop | 0.478 | 0.421 | 0.249 | 0.695 | 0.735 | 0.219 |
| Uberon 2024 | Llama-3.1-8B | LoRA, existence loop | 0.484 | 0.424 | 0.257 | 0.701 | 0.743 | 0.052 |
| Uberon 2025 | Qwen2.5-14B | Base, no loop | 0.408 | 0.346 | 0.190 | 0.659 | 0.702 | 0.420 |
| Uberon 2025 | Qwen2.5-14B | Base, existence loop | 0.401 | 0.335 | 0.178 | 0.645 | 0.685 | 0.027 |
| Uberon 2025 | Qwen2.5-14B | LoRA, no loop | 0.420 | 0.366 | 0.201 | 0.670 | 0.703 | 0.080 |
| Uberon 2025 | Qwen2.5-14B | LoRA, existence loop | 0.421 | 0.367 | 0.202 | 0.670 | 0.703 | 0.009 |
| Uberon 2025 | Llama-3.1-8B | Base, no loop | 0.393 | 0.319 | 0.173 | 0.653 | 0.691 | 0.330 |
| Uberon 2025 | Llama-3.1-8B | Base, existence loop | 0.404 | 0.322 | 0.178 | 0.654 | 0.693 | 0.036 |
| Uberon 2025 | Llama-3.1-8B | LoRA, no loop | 0.436 | 0.344 | 0.192 | 0.678 | 0.712 | 0.304 |
| Uberon 2025 | Llama-3.1-8B | LoRA, existence loop | 0.435 | 0.346 | 0.195 | 0.675 | 0.709 | 0.089 |
| Uberon-Constraint-Stress | Qwen2.5-14B | Base, no loop | 0.307 | 0.246 | 0.115 | 0.602 | 0.644 | 0.523 |
| Uberon-Constraint-Stress | Qwen2.5-14B | Base, existence loop | 0.307 | 0.247 | 0.116 | 0.602 | 0.644 | 0.025 |
| Uberon-Constraint-Stress | Qwen2.5-14B | LoRA, no loop | 0.416 | 0.379 | 0.242 | 0.674 | 0.712 | 0.403 |
| Uberon-Constraint-Stress | Qwen2.5-14B | LoRA, existence loop | 0.410 | 0.373 | 0.237 | 0.669 | 0.707 | 0.024 |
| Uberon-Constraint-Stress | Llama-3.1-8B | Base, no loop | 0.320 | 0.257 | 0.117 | 0.603 | 0.644 | 0.310 |
| Uberon-Constraint-Stress | Llama-3.1-8B | Base, existence loop | 0.319 | 0.255 | 0.116 | 0.603 | 0.644 | 0.023 |
| Uberon-Constraint-Stress | Llama-3.1-8B | LoRA, no loop | 0.409 | 0.368 | 0.226 | 0.664 | 0.702 | 0.285 |
| Uberon-Constraint-Stress | Llama-3.1-8B | LoRA, existence loop | 0.404 | 0.363 | 0.220 | 0.657 | 0.695 | 0.061 |

Figure 4: Entity Error Rate (EER) before and after entity-existence repair. Lower is better. The repair loop substantially reduces unresolved-entity failures for base models and for difficult Uberon settings.
Feng et al.: Preprint submitted to Elsevier
Page 8
Table 3
Logical Inconsistency Rate (LIR) after entity-existence repair. The comparison is between existence-loop and all-loop settings; all-loop adds the logical repair loop on top of the existence-loop setting, so both share the same entity-grounded candidate pool. Real count reports the number of inconsistent candidates over the number of entity-grounded candidates. Bold all-loop values indicate a lower LIR than the paired existence-loop setting.
| Test setting | Model | Loop setting | LIR ↓ | Real count |
|---|---|---|---|---|
| Uberon 2024 | Qwen2.5-14B | Base, existence loop | 1.05% | 1/95 |
| Uberon 2024 | Qwen2.5-14B | Base, all loops | 1.05% | 1/95 |
| Uberon 2024 | Qwen2.5-14B | LoRA, existence loop | 2.08% | 2/96 |
| Uberon 2024 | Qwen2.5-14B | LoRA, all loops | 2.08% | 2/96 |
| Uberon 2024 | Llama-3.1-8B | Base, existence loop | 0.00% | 0/92 |
| Uberon 2024 | Llama-3.1-8B | Base, all loops | 0.00% | 0/92 |
| Uberon 2024 | Llama-3.1-8B | LoRA, existence loop | 0.00% | 0/91 |
| Uberon 2024 | Llama-3.1-8B | LoRA, all loops | 0.00% | 0/91 |
| Uberon 2025 | Qwen2.5-14B | Base, existence loop | 0.92% | 1/109 |
| Uberon 2025 | Qwen2.5-14B | Base, all loops | 0.92% | 1/109 |
| Uberon 2025 | Qwen2.5-14B | LoRA, existence loop | 1.80% | 2/111 |
| Uberon 2025 | Qwen2.5-14B | LoRA, all loops | 0.00% | 0/111 |
| Uberon 2025 | Llama-3.1-8B | Base, existence loop | 0.93% | 1/108 |
| Uberon 2025 | Llama-3.1-8B | Base, all loops | 0.00% | 0/108 |
| Uberon 2025 | Llama-3.1-8B | LoRA, existence loop | 0.98% | 1/102 |
| Uberon 2025 | Llama-3.1-8B | LoRA, all loops | 0.98% | 1/102 |
| Uberon-Constraint-Stress | Qwen2.5-14B | Base, existence loop | 0.42% | 4/949 |
| Uberon-Constraint-Stress | Qwen2.5-14B | Base, all loops | 0.32% | 3/949 |
| Uberon-Constraint-Stress | Qwen2.5-14B | LoRA, existence loop | 2.95% | 28/950 |
| Uberon-Constraint-Stress | Qwen2.5-14B | LoRA, all loops | 0.42% | 4/950 |
| Uberon-Constraint-Stress | Llama-3.1-8B | Base, existence loop | 1.26% | 12/951 |
| Uberon-Constraint-Stress | Llama-3.1-8B | Base, all loops | 0.21% | 2/951 |
| Uberon-Constraint-Stress | Llama-3.1-8B | LoRA, existence loop | 1.20% | 11/914 |
| Uberon-Constraint-Stress | Llama-3.1-8B | LoRA, all loops | 1.09% | 10/914 |
textual similarity but can still leave substantial knowledge-compatibility failures. For example, Llama-3.1-8B with LoRA still has EER values of 5.2%, 8.9%, and 6.1% after entity-existence repair on Uberon 2024, Uberon 2025, and Uberon-Constraint-Stress, respectively. This result motivates separate QC checks beyond text metrics.
For completeness, Table A.2 reports the corresponding conventional text-generation scores when direct generation is compared with the full all-loop workflow.
4.3. Logical Inconsistency Results
Logical reasoning is applied after entity existence has been checked. This ordering is natural for ontology QC: generated axioms should first be grounded to existing predicates and object entities before testing whether they are logically compatible with the ontology. Therefore, the LIR experiments are performed on candidates that have passed the entity-existence check after the EER repair loop.
Table 3 summarizes LIR after the entity-existence loop has been applied for the Uberon settings. We compare the existence-loop setting with the all-loop setting, where all loops means that the logical repair loop is added after the existence loop. These two settings share the same entity-grounded candidate pool, whereas no-loop runs can have a different LIR denominator. DO shows no reasoner-detected logical inconsistencies in these runs, consistent with the
earlier observation that the 2023 DO release contains very few terms involved in strong constraint axioms. We therefore omit the all-zero DO rows from the table. Uberon, in contrast, has non-zero LIR values in both incremental and stress settings. Adding the logic loop reduces LIR in some settings, such as Qwen2.5-14B with LoRA on Uberon 2025 and Uberon-Constraint-Stress, but the reductions are smaller and less consistent than the EER reductions. This shows why LIR is needed: text metrics and entity-resolution checks do not tell us whether generated axioms are logically compatible with the ontology. Because different test settings and models produce different numbers of candidates that pass entity-existence checking, the LIR denominator also differs across rows. We therefore report LIR in a table rather than using a grouped bar chart.
4.4. Definition Generator Model Selection
Before running the full QC workflow, we evaluated candidate definition generators on the DO 2024 and DO 2025 test sets using conventional text-generation metrics. This preliminary experiment was used to select the model families for the main experiments. We first screened candidate models under direct inference and then fine-tuned stronger direct-inference candidates for further evaluation. The model-selection and input-field ablation experiments use greedy decoding to make the comparisons deterministic;
Feng et al.: Preprint submitted to Elsevier
Page 9
Table 4
Definition-generation model selection on DO release-based test sets. FT-prefixed models are evaluated after fine-tuning; other models are evaluated by direct base-model inference. The knowledge-cutoff column is included as a data-leakage reference; bold marks the best score within each test set.
| Test set | Model | Knowledge cutoff | Token F1 | ROUGE-L | BLEU-2 | BERT-F1 | Cosine |
|---|---|---|---|---|---|---|---|
| DO 2024 | Qwen2.5-7B-Instruct | not reported; card Jan. 2025 | 0.280 | 0.184 | 0.084 | 0.587 | 0.705 |
| DO 2024 | Llama-3.1-8B | 2023.12 | 0.325 | 0.238 | 0.124 | 0.603 | 0.663 |
| DO 2024 | Llama-3.1-8B-Instruct | 2023.12 | 0.297 | 0.180 | 0.085 | 0.565 | 0.696 |
| DO 2024 | Qwen2.5-14B-Instruct | not reported; card Jan. 2025 | 0.281 | 0.192 | 0.089 | 0.597 | 0.704 |
| DO 2024 | gpt-oss-20b | not reported; card Aug. 2025 | 0.239 | 0.144 | 0.063 | 0.525 | 0.536 |
| DO 2024 | DeepSeek-R1-Distill-Llama-70B | not reported; card Jan. 2025 | 0.267 | 0.163 | 0.077 | 0.569 | 0.626 |
| DO 2024 | FT-Llama-3.1-8B-Instruct | 2023.12 | 0.606 | 0.585 | 0.390 | 0.807 | 0.782 |
| DO 2024 | FT-Qwen2.5-14B-Instruct | not reported; card Jan. 2025 | 0.602 | 0.586 | 0.386 | 0.808 | 0.786 |
| DO 2024 | FT-gpt-oss-20b | not reported; card Aug. 2025 | 0.499 | 0.470 | 0.290 | 0.749 | 0.761 |
| DO 2025 | Qwen2.5-7B-Instruct | not reported; card Jan. 2025 | 0.279 | 0.181 | 0.085 | 0.579 | 0.676 |
| DO 2025 | Llama-3.1-8B | 2023.12 | 0.332 | 0.246 | 0.132 | 0.600 | 0.670 |
| DO 2025 | Llama-3.1-8B-Instruct | 2023.12 | 0.291 | 0.180 | 0.087 | 0.557 | 0.673 |
| DO 2025 | Qwen2.5-14B-Instruct | not reported; card Jan. 2025 | 0.277 | 0.189 | 0.090 | 0.587 | 0.670 |
| DO 2025 | gpt-oss-20b | not reported; card Aug. 2025 | 0.234 | 0.141 | 0.065 | 0.516 | 0.533 |
| DO 2025 | DeepSeek-R1-Distill-Llama-70B | not reported; card Jan. 2025 | 0.266 | 0.166 | 0.081 | 0.562 | 0.607 |
| DO 2025 | FT-Llama-3.1-8B-Instruct | 2023.12 | 0.599 | 0.588 | 0.378 | 0.805 | 0.755 |
| DO 2025 | FT-Qwen2.5-14B-Instruct | not reported; card Jan. 2025 | 0.597 | 0.589 | 0.373 | 0.808 | 0.758 |
| DO 2025 | FT-gpt-oss-20b | not reported; card Aug. 2025 | 0.515 | 0.501 | 0.310 | 0.760 | 0.730 |
the decoding setting is reported in Table A.1. They are also evaluated on definition-only DO test sets, which contain all terms with reference definitions: 326 records for DO 2024 and 305 records for DO 2025. These sets are larger than the main workflow test sets because the full QC workflow additionally requires relationship axioms. Table 4 reports both direct base-model inference and fine-tuned inference. Model names prefixed with FT denote fine-tuned models; other rows use direct inference from the base model. We include the knowledge-cutoff information as a reference for possible data leakage.
The model-selection results show a large gap between direct base-model inference and fine-tuned inference. On both DO test sets, the fine-tuned Qwen2.5-14B and Llama-3.1-8B models obtain the strongest lexical and semantic scores, whereas the other fine-tuned candidate, gpt-oss-20b, remains lower. We therefore use Qwen2.5-14B and Llama-3.1-8B as the two model families for the main workflow experiments.
4.5. Definition Input-Field Ablation
We also test which ontology fields should be included in the definition generator input. This ablation uses the fine-tuned Qwen2.5-14B-Instruct model on the same definition-only DO 2024 and DO 2025 test sets used for model selection. Table 5 compares full-field input with variants that remove selected fields. Full fields include the term id, name, synonyms, parents, and subsets.
The ablation shows that parent context is the most important auxiliary field. Removing parents produces the largest drop on both DO test sets, reducing Token F1 from 0.602 to 0.576 in 2024 and from 0.597 to 0.575 in 2025. Removing synonyms changes performance only slightly, whereas removing subsets often improves performance; the
no-id/subsets setting gives the best Token F1, ROUGE-L, BLEU-2, and BERT-F1 scores in both years. Based on these results, the main workflow uses the class name together with parent names and parent definitions as the core input fields. To check whether this input design is practical, we further inspected the official DO and Uberon release files used in this study. Terms without textual definitions or relationship axioms still retain asserted parent classes in these releases, so parent context is available even for the target records that require definition generation.
4.6. Axiom Extractor Performance
We next evaluate the axiom extractor itself on the no-loop workflow outputs. This isolates extraction quality before entity-existence and logic repair are applied. Table 6 compares five-shot base prompting with the LoRA fine-tuned axiom extractor on the DO, Uberon, and Uberon-Constraint-Stress test sets. All predicate and object strings are normalized by lowering, replacing underscores with spaces, and collapsing whitespace before comparison.
The metrics measure different levels of extraction quality. Parse rate is the proportion of outputs that can be parsed into axiom records. Exact match requires the whole predicted axiom set for a term to match the reference set. Pair precision, recall, and F1 compare complete predicate-object pairs. Predicate accuracy and object accuracy evaluate each component separately. Hit rate is a term-level metric: it counts whether at least one predicted axiom matches any reference axiom. The validation-split performance used to check whether the LoRA extractor learned the axiom-extraction task is reported in Table A.3.
The test-set results show that LoRA fine-tuning substantially improves axiom extraction over five-shot prompting. The improvement is especially large for DO, where LoRA
Feng et al.: Preprint submitted to Elsevier
Page 10
Table 5
Input-field ablation for DO definition generation using the fine-tuned Qwen2.5-14B-Instruct model. Full fields include id, name, synonyms, parents, and subsets; each ablation removes the listed field or fields from the input. Bold marks the best score within each test set.
| Test set | Input setting | Input fields | Token F1 | ROUGE-L | BLEU-2 | BERT-F1 | Cosine |
|---|---|---|---|---|---|---|---|
| DO 2024 | Full fields | id, name, synonyms, parents, subsets | 0.602 | 0.586 | 0.386 | 0.808 | 0.786 |
| DO 2024 | No ID | name, synonyms, parents, subsets | 0.601 | 0.585 | 0.381 | 0.807 | 0.791 |
| DO 2024 | No ID/synonyms | name, parents, subsets | 0.596 | 0.579 | 0.379 | 0.803 | 0.776 |
| DO 2024 | No ID/parents | name, synonyms, subsets | 0.576 | 0.555 | 0.348 | 0.795 | 0.756 |
| DO 2024 | No ID/subsets | name, synonyms, parents | 0.613 | 0.597 | 0.396 | 0.813 | 0.790 |
| DO 2025 | Full fields | id, name, synonyms, parents, subsets | 0.597 | 0.589 | 0.373 | 0.808 | 0.758 |
| DO 2025 | No ID | name, synonyms, parents, subsets | 0.601 | 0.593 | 0.382 | 0.808 | 0.762 |
| DO 2025 | No ID/synonyms | name, parents, subsets | 0.594 | 0.588 | 0.376 | 0.806 | 0.755 |
| DO 2025 | No ID/parents | name, synonyms, subsets | 0.575 | 0.568 | 0.346 | 0.799 | 0.731 |
| DO 2025 | No ID/subsets | name, synonyms, parents | 0.607 | 0.600 | 0.391 | 0.812 | 0.769 |
Table 6
Axiom-extractor performance on test-set no-loop workflow outputs. Base rows use five-shot prompting, whereas LoRA rows use the fine-tuned axiom extractor. Predicate and object strings are normalized before comparison; bold marks the higher score within each Base/LoRA pair.
| Ontology | Setting | Model | Extractor | n | Parse | Exact | Pair P | Pair R | Pair F1 | Pred. Acc. | Obj. Acc. | Hit |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DO | 2024 | Qwen2.5-14B | Base + few-shot | 188 | 1.000 | 0.074 | 0.103 | 0.164 | 0.127 | 0.137 | 0.350 | 0.170 |
| DO | 2024 | Qwen2.5-14B | LoRA | 188 | 1.000 | 0.777 | 0.630 | 0.831 | 0.717 | 0.628 | 0.604 | 0.894 |
| DO | 2024 | Llama-3.1-8B | Base + few-shot | 188 | 1.000 | 0.005 | 0.021 | 0.075 | 0.033 | 0.044 | 0.156 | 0.080 |
| DO | 2024 | Llama-3.1-8B | LoRA | 188 | 1.000 | 0.777 | 0.679 | 0.845 | 0.753 | 0.686 | 0.664 | 0.894 |
| DO | 2025 | Qwen2.5-14B | Base + few-shot | 236 | 1.000 | 0.199 | 0.186 | 0.305 | 0.231 | 0.202 | 0.347 | 0.369 |
| DO | 2025 | Qwen2.5-14B | LoRA | 236 | 1.000 | 0.669 | 0.691 | 0.761 | 0.725 | 0.637 | 0.620 | 0.877 |
| DO | 2025 | Llama-3.1-8B | Base + few-shot | 236 | 1.000 | 0.030 | 0.065 | 0.182 | 0.095 | 0.072 | 0.208 | 0.220 |
| DO | 2025 | Llama-3.1-8B | LoRA | 236 | 1.000 | 0.682 | 0.712 | 0.779 | 0.744 | 0.648 | 0.640 | 0.903 |
| Uberon | 2024 | Qwen2.5-14B | Base + few-shot | 96 | 1.000 | 0.010 | 0.132 | 0.090 | 0.107 | 0.320 | 0.118 | 0.333 |
| Uberon | 2024 | Qwen2.5-14B | LoRA | 96 | 1.000 | 0.031 | 0.455 | 0.410 | 0.431 | 0.567 | 0.405 | 0.823 |
| Uberon | 2024 | Llama-3.1-8B | Base + few-shot | 96 | 1.000 | 0.000 | 0.096 | 0.087 | 0.091 | 0.323 | 0.098 | 0.312 |
| Uberon | 2024 | Llama-3.1-8B | LoRA | 96 | 1.000 | 0.021 | 0.326 | 0.351 | 0.338 | 0.453 | 0.286 | 0.781 |
| Uberon | 2025 | Qwen2.5-14B | Base + few-shot | 112 | 1.000 | 0.036 | 0.175 | 0.158 | 0.166 | 0.334 | 0.214 | 0.446 |
| Uberon | 2025 | Qwen2.5-14B | LoRA | 112 | 1.000 | 0.071 | 0.251 | 0.278 | 0.264 | 0.449 | 0.305 | 0.527 |
| Uberon | 2025 | Llama-3.1-8B | Base + few-shot | 112 | 1.000 | 0.000 | 0.114 | 0.142 | 0.127 | 0.307 | 0.175 | 0.402 |
| Uberon | 2025 | Llama-3.1-8B | LoRA | 112 | 1.000 | 0.062 | 0.155 | 0.212 | 0.179 | 0.370 | 0.200 | 0.509 |
| Uberon | Constraint-Stress | Qwen2.5-14B | Base + few-shot | 973 | 1.000 | 0.011 | 0.113 | 0.063 | 0.081 | 0.225 | 0.084 | 0.222 |
| Uberon | Constraint-Stress | Qwen2.5-14B | LoRA | 973 | 1.000 | 0.046 | 0.210 | 0.178 | 0.193 | 0.298 | 0.164 | 0.470 |
| Uberon | Constraint-Stress | Llama-3.1-8B | Base + few-shot | 973 | 0.975 | 0.003 | 0.075 | 0.057 | 0.065 | 0.216 | 0.070 | 0.201 |
| Uberon | Constraint-Stress | Llama-3.1-8B | LoRA | 973 | 1.000 | 0.046 | 0.166 | 0.179 | 0.172 | 0.275 | 0.147 | 0.485 |
raises hit rate from 0.170 to 0.894 for Qwen2.5-14B on 2024 and from 0.220 to 0.903 for Llama-3.1-8B on 2025. Fine-tuned LLM extractors achieve high hit rates on most test settings, with the best setting exceeding 0.90, suggesting that LLM-based axiom extraction has substantial potential. Uberon remains harder, especially the constraint-stress subset, but LoRA still improves pair-level F1 and hit rate for both model families. These results justify using a fine-tuned axiom extractor in the workflow while keeping five-shot base extraction as the no-finetuning comparison.
5. Discussion
The main finding of this study is that LLM-assisted ontology definition generation should not be evaluated only as a text-generation task. The definition text may be fluent and similar to a reference definition, while the relations implied by that text may still fail entity grounding or violate ontology-level constraints. This distinction is visible throughout the experiments. Conventional metrics remain useful for measuring lexical and semantic similarity, especially when comparing base and fine-tuned definition generators, but they do not expose whether the generated content can be accepted by an ontology engineering workflow. EER and LIR therefore provide a complementary view of generation quality: they measure whether generated definitions can be connected to existing ontology entities and whether the resulting structured claims are logically compatible with the ontology.
Feng et al.: Preprint submitted to Elsevier
Page 11
The results also show that different quality-control modules address different kinds of failures. The entity-existence loop produces clear EER reductions in many settings, particularly for base models and for the constraint-focused Uberon subset. This is expected because unresolved predicates or object entities provide direct local feedback to the next generation attempt. The model can be told which relation or object could not be grounded, and a new candidate can often avoid that specific error. In contrast, logical inconsistency is harder to repair. A candidate may become unsatisfiable because of global ontology constraints, disjointness axioms, domain or range restrictions, or interactions among multiple generated relations. These failures are sparse and less locally diagnostic, which helps explain why the logic loop yields only limited reductions in LIR even when EER repair is effective.
The experiments further suggest that fine-tuning and QC loops play different roles. Fine-tuning improves definition-generation quality under conventional metrics and substantially improves axiom extraction compared with five-shot prompting. However, fine-tuning alone does not guarantee ontology compatibility. In several Uberon settings, LoRA models retain non-zero EER after repair, and LIR remains observable even when text scores are strong. This supports a layered workflow: use fine-tuned models to improve generation and extraction quality, but keep explicit symbolic checks before any generated candidate is considered suitable for curator review.
The stress-test results also clarify why the choice of ontology affects what can be learned from an evaluation. The DO splits reflect a realistic incremental maintenance setting, where new or newly defined terms are added across releases. However, because only a small number of DO terms are involved in strong constraint axioms, this setting provides limited evidence about reasoner-detected logical inconsistency. Uberon complements DO in this respect: its regular incremental splits evaluate the same maintenance scenario in a more axiom-rich ontology, and the Uberon-Constraint-Stress subset intentionally concentrates terms that are more likely to exercise disjointness and other strong constraints. The three datasets therefore serve different purposes.
Although this paper instantiated EER and LIR for biomedical ontologies, the underlying idea is broader. Many structured-knowledge generation tasks require generated text or claims to align with a controlled vocabulary, schema, knowledge graph, database, or rule system. In such settings, the central question is not only whether the output sounds plausible, but whether it can be grounded and checked against the target knowledge system. The workflow studied here provides one concrete implementation of this principle: LLMs propose content, while external knowledge-system checks decide whether the content can be accepted, repaired, or flagged. Future work should test the same incompatibility metrics in other structured domains. More broadly, similar checks could be applied to general LLM text-generation tasks by measuring whether generated entities can be grounded in existing knowledge resources and whether the generated
claims remain logically consistent with established knowledge.
6. Conclusion
This paper studied LLM-assisted ontology definition generation as an knowledge-compatibility problem instantiated in biomedical ontologies, rather than only as a text-generation problem. The results show that LLMs can produce useful ontology-definition candidates, but they also demonstrate that fluent, reference-like definitions are not necessarily compatible with the target knowledge system. A generated definition may still contain unresolved entities or introduce logical inconsistencies that are invisible to conventional text-similarity metrics.
To address this gap, we introduced EER and LIR as structured-knowledge incompatibility metrics for evaluating entity grounding and logical consistency, and developed an agentic QC framework that combines generation, grounding verification, reasoning, and iterative repair. Experiments on DO, Uberon, and Uberon-Constraint-Stress show that the workflow substantially reduces entity-grounding failures while preserving strong conventional text-generation performance. More broadly, this work suggests that LLM generation in knowledge-intensive domains should be evaluated not only by linguistic quality, but also by whether generated content can be grounded, checked, and integrated into the target knowledge system.
Acknowledgments
This work was supported by the Department of Education of Guangdong Province (2025ZDZX2065) and the Shenzhen Science and Technology Program (JCYJ20241202130212016). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Data and Code Availability
The source code and constructed evaluation datasets supporting this study are publicly available at https://github.com/iwcyou/DO-DefinitionGeneration.
Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
References
Babaei Giglou, H., D'Souza, J., Auer, S., 2023. Lims4ol: Large language models for ontology learning, in: International semantic web conference, Springer. pp. 408–427.
Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J.D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al., 2020. Language models are few-shot learners. Advances in neural information processing systems 33, 1877–1901.
Feng et al.: Preprint submitted to Elsevier
Page 12
Caufield, J.H., Hegde, H., Emonet, V., Harris, N.L., Joachimiak, M.P., Matentzoglu, N., Kim, H., Moxon, S., Reese, J.T., Haendel, M.A., et al., 2024. Structured prompt interrogation and recursive extraction of semantics (spires): A method for populating knowledge bases using zero-shot learning. Bioinformatics 40, btae104.
Côté, R.G., Jones, P., Apweiler, R., Hermjakob, H., 2006. The ontology lookup service, a lightweight cross-platform tool for controlled vocabulary queries. BMC bioinformatics 7, 97.
Courtot, M., Gibson, F., Lister, A.L., Malone, J., Schober, D., Brinkman, R.R., Ruttenberg, A., 2011. Mireot: The minimum information to reference an external ontology term. Applied Ontology 6, 23–33.
Dubey, A., Jauhri, A., Pandey, A., Kadian, A., Al-Dahle, A., Letman, A., Mathur, A., Schelten, A., Yang, A., Fan, A., et al., 2024. The llama 3 herd of models. arXiv e-prints, arXiv-2407.
Fathallah, N., Das, A., Giorgis, S.D., Poltronieri, A., Haase, P., Kovriguina, L., 2024. Neon-gpt: a large language model-powered pipeline for ontology learning, in: European Semantic Web Conference, Springer. pp. 36–50.
Glimm, B., Horrocks, I., Motik, B., Stoilos, G., Wang, Z., 2014. Hermit: an owl 2 reasoner. Journal of automated reasoning 53, 245–269.
Gruber, T.R., 1993. A translation approach to portable ontology specifications. Knowledge acquisition 5, 199–220.
Hu, E.J., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., Wang, L., Chen, W., et al., 2022. Lora: Low-rank adaptation of large language models. ICLR 1, 3.
Jackson, R., Matentzoglu, N., Overton, J.A., Vita, R., Balhoff, J.P., Buttigieg, P.L., Carbon, S., Courtot, M., Diehl, A.D., Dooley, D.M., et al., 2021. Obo foundry in 2021: operationalizing open data principles to evaluate ontologies. Database 2021, baab069.
Jackson, R.C., Balhoff, J.P., Douglass, E., Harris, N.L., Mungall, C.J., Overton, J.A., 2019. Robot: a tool for automating ontology workflows. BMC bioinformatics 20, 407.
Ji, Z., Lee, N., Frieske, R., Yu, T., Su, D., Xu, Y., Ishii, E., Bang, Y.J., Madotto, A., Fung, P., 2023. Survey of hallucination in natural language generation. ACM computing surveys 55, 1–38.
Kazakov, Y., Krötzsch, M., Simančik, F., 2014. The incredible ELK: From polynomial procedures to efficient reasoning with ontologies. Journal of automated reasoning 53, 1–61.
Kommineni, V.K., König-Ries, B., Samuel, S., 2024. From human experts to machines: An llm supported approach to ontology and knowledge graph construction. arXiv preprint arXiv:2403.08345.
Labrak, Y., Bazoge, A., Morin, E., Gourraud, P.A., Rouvier, M., Dufour, R., 2024. Biomistral: A collection of open-source pretrained large language models for medical domains, in: Findings of the association for computational linguistics: ac1 2024, pp. 5848–5864.
Lavrinovics, E., Biswas, R., Bjerva, J., Hose, K., 2025. Knowledge graphs, large language models, and hallucinations: An nlp perspective. Journal of Web Semantics 85, 100844.
Li, J., Garijo, D., Poveda-Villalón, M., 2025. Large language models for ontology engineering: a systematic literature review. Semantic Web Journal 20, 1–45.
Lin, C.Y., 2004. Rouge: A package for automatic evaluation of summaries, in: Text summarization branches out, pp. 74–81.
Madaan, A., Tandon, N., Gupta, P., Hallinan, S., Gao, L., Wiegreffe, S., Alon, U., Dziri, N., Prabhumoye, S., Yang, Y., et al., 2023. Self-refine: Iterative refinement with self-feedback. Advances in neural information processing systems 36, 46534–46594.
Matentzoglu, N., Goutte-Gattat, D., Tan, S.Z.K., Balhoff, J.P., Carbon, S., Caron, A.R., Duncan, W.D., Flack, J.E., Haendel, M., Harris, N.L., et al., 2022. Ontology development kit: a toolkit for building, maintaining and standardizing biomedical ontologies. Database 2022, baae087.
Min, S., Krishna, K., Lyu, X., Lewis, M., Yih, W.T., Koh, P., Iyyer, M., Zettlemoyer, L., Hajishirzi, H., 2023. Factscore: Fine-grained atomic evaluation of factual precision in long form text generation, in: Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 12076–12100.
Mungall, C.J., Torniai, C., Gkoutos, G.V., Lewis, S.E., Haendel, M.A., 2012. Uberon, an integrative multi-species anatomy ontology. Genome
biology 13, R5.
Pan, S., Luo, L., Wang, Y., Chen, C., Wang, J., Wu, X., 2024. Unifying large language models and knowledge graphs: A roadmap. IEEE Transactions on Knowledge and Data Engineering 36, 3580–3599.
Papineni, K., Roukos, S., Ward, T., Zhu, W.J., 2002. Bleu: a method for automatic evaluation of machine translation, in: Proceedings of the 40th annual meeting of the Association for Computational Linguistics, pp. 311–318.
Reimers, N., Gurevych, I., 2019. Sentence-bert: Sentence embeddings using siamese bert-networks, in: Proceedings of the 2019 conference on empirical methods in natural language processing and the 9th international joint conference on natural language processing (EMNLP-IJCNLP), pp. 3982–3992.
Remy, F., Demuynck, K., Demeester, T., 2022. Biolord: Learning ontological representations from definitions for biomedical concepts and their textual descriptions, in: Findings of the Association for Computational Linguistics: EMNLP 2022, pp. 1454–1465.
Schick, T., Dwivedi-Yu, J., Dessí, R., Raileam, R., Lomeli, M., Hambro, E., Zettlemoyer, L., Cancedda, N., Scialom, T., 2023. Toolformer: Language models can teach themselves to use tools. Advances in neural information processing systems 36, 68539–68551.
Schriml, L.M., Arze, C., Nadendla, S., Chang, Y.W.W., Mazaitis, M., Felix, V., Feng, G., Kibbe, W.A., 2012. Disease ontology: a backbone for disease semantic integration. Nucleic acids research 40, D940–D946.
Schriml, L.M., Mitraka, E., Munro, J., Tauber, B., Schor, M., Nickle, L., Felix, V., Jeng, L., Bearer, C., Lichenstein, R., et al., 2019. Human disease ontology 2018 update: classification, content and workflow expansion. Nucleic acids research 47, D955–D962.
Schriml, L.M., Munro, J.B., Schor, M., Olley, D., McCracken, C., Felix, V., Baron, J.A., Jackson, R., Bello, S.M., Bearer, C., et al., 2022. The human disease ontology 2022 update. Nucleic acids research 50, D1255–D1261.
Shinn, N., Cassano, F., Gopinath, A., Narasimhan, K., Yao, S., 2023. Reflexion: Language agents with verbal reinforcement learning. Advances in neural information processing systems 36, 8634–8652.
Smith, B., Ashburner, M., Rosse, C., Bard, J., Bug, W., Ceusters, W., Goldberg, L.J., Eilbeck, K., Ireland, A., Mungall, C.J., et al., 2007. The obo foundry: coordinated evolution of ontologies to support biomedical data integration. Nature biotechnology 25, 1251–1255.
Team, Q., 2024. Qwen2.5: A party of foundation models. URL: https://qwenlm.github.io/blog/qwen2.5/. accessed 4 Jun 2026.
Val-Calvo, M., Aranguren, M.E., Mulero-Hernández, J., Almagro-Hernández, G., Deshmukh, P., Bernabé-Díaz, J.A., Espinoza-Arias, P., Sánchez-Fernández, J.L., Mueller, J., Fernández-Breis, J.T., 2025. Ontogenix: Leveraging large language models for enhanced ontology engineering from datasets. Information Processing & Management 62, 104042.
W3C OWL Working Group, 2012. OWL 2 Web Ontology Language Document Overview (Second Edition). W3C Recommendation. World Wide Web Consortium. URL: https://www.w3.org/TR/2012/REC-owl2-oerview-20121211/. accessed 10 Jul 2026.
Whetzel, P.L., Noy, N.F., Shah, N.H., Alexander, P.R., Nyulas, C., Tudorache, T., Musen, M.A., 2011. Bioportal: enhanced functionality via new web services from the national center for biomedical ontology to access and use ontologies in software applications. Nucleic acids research 39, W541–W545.
Yao, S., Zhao, J., Yu, D., Du, N., Shafran, I., Narasimhan, K., Cao, Y., 2022. React: Synergizing reasoning and acting in language models. arXiv preprint arXiv:2210.03629.
Zhang, B., Carriero, V.A., Schreiberhuber, K., Tsaneva, S., González, L.S., Kim, J., de Berardinis, J., 2024. Ontochat: a framework for conversational ontology engineering using language models, in: European semantic web conference, Springer. pp. 102–121.
Zhang, T., Kishore, V., Wu, F., Weinberger, K.Q., Artzi, Y., 2019. Bertscore: Evaluating text generation with bert. arXiv preprint arXiv:1904.09675.
Feng et al.: Preprint submitted to Elsevier
Page 13
Table A.1
Fine-tuning, greedy definition-generation comparison, and random-sampling repair settings used in the experiments. The Low-Rank Adaptation (LoRA) and supervised fine-tuning (SFT) settings are shared by the definition generator and axiom extractor unless otherwise noted.
| Setting | Parameter | Value |
|---|---|---|
| LoRA/SFT | Base models | Qwen2.5-14B-Instruct; Llama-3.1-8B-Instruct |
| LoRA/SFT | LoRA rank | 64 |
| LoRA/SFT | LoRA alpha | 128 |
| LoRA/SFT | LoRA dropout | 0.05 |
| LoRA/SFT | Target modules | q, k, v, o, gate, up, down projections |
| LoRA/SFT | Rank-stabilized LoRA (RS-LoRA) | enabled |
| LoRA/SFT | Training epochs | 5 |
| LoRA/SFT | Train / evaluation batch size | 4 / 4 per device |
| LoRA/SFT | Gradient accumulation | 4 steps |
| LoRA/SFT | Learning rate | |
| LoRA/SFT | Scheduler / warmup | cosine / 0.05 |
| LoRA/SFT | Optimizer | adamw_torch_fused |
| LoRA/SFT | Weight decay / max grad norm | 0.01 / 1.0 |
| LoRA/SFT | Precision | bfloat16 (BF16) training and evaluation |
| LoRA/SFT | Max sequence length | 2048 tokens |
| LoRA/SFT | Save / evaluation / logging steps | 100 / 100 / 10 |
| LoRA/SFT | Random seed | 42 |
| Greedy definition-generation comparison | do_sample | False |
| Greedy definition-generation comparison | Temperature | not used |
| Greedy definition-generation comparison | top- / top- | not used / not used |
| Greedy definition-generation comparison | Max new tokens | 128 |
| Random-sampling repair | do_sample | True |
| Random-sampling repair | Temperature | 0.6 |
| Random-sampling repair | top- | 0.9 |
| Random-sampling repair | top- | 40 |
| Random-sampling repair | Existence-loop budget | 5 retries per failed record |
| Random-sampling repair | Logic-loop budget | 5 axiom-correction attempts |
| Random-sampling repair | Few-shot axiom examples | 5 |
A. Additional Experimental Results
A.1. Fine-Tuning and Decoding Hyperparameters
Table A.1 summarizes the LoRA and supervised fine-tuning (SFT) settings, the greedy decoding setting used for definition-generator model selection and input-field ablation, and the random-sampling parameters used in the repair-loop experiments. The same LoRA configuration is used for definition generation and axiom extraction. Greedy decoding is used for the definition-generation comparison experiments to make model and field comparisons deterministic. In the random-sampling repair experiments, the sampling parameters are applied to regenerated definitions and corrected axioms inside the repair loops.
A.2. Full-Workflow Text-Generation Scores
Table A.2 compares direct generation with the full all-loop workflow using both conventional text-generation metrics and EER. The all-loop workflow usually preserves the lexical and semantic scores of direct generation, while reducing EER in many settings. This supports the interpretation that the QC loops mainly filter or repair knowledge-compatibility failures rather than trading away conventional text quality.
A.3. Axiom Extractor Validation Performance
Table A.3 reports validation-split performance for the LoRA axiom extractor. This experiment checks whether the extractor learned to produce parseable predicate-object records before it is used in the end-to-end workflow. All validation outputs are parseable, and the DO validation split shows stronger exact-match and hit-rate performance than the Uberon validation split. This difference is consistent with the test-set results in Table 6, where Uberon remains the harder extraction setting because its relationship axioms are more diverse and constraint-rich.
Feng et al.: Preprint submitted to Elsevier
Page 1
Table A.2
Conventional text-generation scores and Entity Error Rate (EER) comparing direct generation with the full QC workflow. Darker cells indicate better values: higher conventional scores and lower EER. Arrows in column headers indicate the preferred metric direction.
| Test setting | Model | Loop setting | Token F1 ↑ | ROUGE-L ↑ | BLEU-2 ↑ | BERT-F1 ↑ | Cosine ↑ | EER ↓ |
|---|---|---|---|---|---|---|---|---|
| DO 2024 | Qwen2.5-14B | Base, no loop | 0.283 | 0.222 | 0.107 | 0.608 | 0.664 | 0.670 |
| DO 2024 | Qwen2.5-14B | Base, all loops | 0.293 | 0.236 | 0.118 | 0.619 | 0.676 | 0.378 |
| DO 2024 | Qwen2.5-14B | LoRA, no loop | 0.588 | 0.579 | 0.380 | 0.731 | 0.766 | 0.016 |
| DO 2024 | Qwen2.5-14B | LoRA, all loops | 0.588 | 0.579 | 0.381 | 0.731 | 0.766 | 0.000 |
| DO 2024 | Llama-3.1-8B | Base, no loop | 0.310 | 0.240 | 0.115 | 0.593 | 0.642 | 0.697 |
| DO 2024 | Llama-3.1-8B | Base, all loops | 0.320 | 0.244 | 0.123 | 0.608 | 0.656 | 0.457 |
| DO 2024 | Llama-3.1-8B | LoRA, no loop | 0.580 | 0.562 | 0.372 | 0.725 | 0.764 | 0.005 |
| DO 2024 | Llama-3.1-8B | LoRA, all loops | 0.580 | 0.562 | 0.372 | 0.725 | 0.764 | 0.005 |
| DO 2025 | Qwen2.5-14B | Base, no loop | 0.327 | 0.253 | 0.143 | 0.636 | 0.688 | 0.551 |
| DO 2025 | Qwen2.5-14B | Base, all loops | 0.331 | 0.260 | 0.148 | 0.636 | 0.687 | 0.318 |
| DO 2025 | Qwen2.5-14B | LoRA, no loop | 0.606 | 0.602 | 0.399 | 0.739 | 0.771 | 0.000 |
| DO 2025 | Qwen2.5-14B | LoRA, all loops | 0.606 | 0.602 | 0.399 | 0.739 | 0.771 | 0.000 |
| DO 2025 | Llama-3.1-8B | Base, no loop | 0.345 | 0.257 | 0.139 | 0.611 | 0.658 | 0.708 |
| DO 2025 | Llama-3.1-8B | Base, all loops | 0.348 | 0.260 | 0.144 | 0.615 | 0.659 | 0.449 |
| DO 2025 | Llama-3.1-8B | LoRA, no loop | 0.608 | 0.605 | 0.396 | 0.727 | 0.759 | 0.017 |
| DO 2025 | Llama-3.1-8B | LoRA, all loops | 0.608 | 0.605 | 0.396 | 0.727 | 0.759 | 0.000 |
| Uberon 2024 | Qwen2.5-14B | Base, no loop | 0.428 | 0.353 | 0.203 | 0.663 | 0.717 | 0.229 |
| Uberon 2024 | Qwen2.5-14B | Base, all loops | 0.425 | 0.351 | 0.200 | 0.664 | 0.717 | 0.010 |
| Uberon 2024 | Qwen2.5-14B | LoRA, no loop | 0.428 | 0.374 | 0.228 | 0.699 | 0.742 | 0.052 |
| Uberon 2024 | Qwen2.5-14B | LoRA, all loops | 0.431 | 0.378 | 0.230 | 0.699 | 0.742 | 0.000 |
| Uberon 2024 | Llama-3.1-8B | Base, no loop | 0.409 | 0.332 | 0.175 | 0.649 | 0.698 | 0.177 |
| Uberon 2024 | Llama-3.1-8B | Base, all loops | 0.409 | 0.331 | 0.176 | 0.650 | 0.698 | 0.042 |
| Uberon 2024 | Llama-3.1-8B | LoRA, no loop | 0.478 | 0.421 | 0.249 | 0.695 | 0.735 | 0.219 |
| Uberon 2024 | Llama-3.1-8B | LoRA, all loops | 0.484 | 0.424 | 0.257 | 0.701 | 0.743 | 0.052 |
| Uberon 2025 | Qwen2.5-14B | Base, no loop | 0.408 | 0.346 | 0.190 | 0.659 | 0.702 | 0.420 |
| Uberon 2025 | Qwen2.5-14B | Base, all loops | 0.401 | 0.335 | 0.178 | 0.645 | 0.685 | 0.027 |
| Uberon 2025 | Qwen2.5-14B | LoRA, no loop | 0.420 | 0.366 | 0.201 | 0.670 | 0.703 | 0.080 |
| Uberon 2025 | Qwen2.5-14B | LoRA, all loops | 0.421 | 0.367 | 0.202 | 0.670 | 0.703 | 0.009 |
| Uberon 2025 | Llama-3.1-8B | Base, no loop | 0.393 | 0.319 | 0.173 | 0.653 | 0.691 | 0.330 |
| Uberon 2025 | Llama-3.1-8B | Base, all loops | 0.404 | 0.322 | 0.178 | 0.654 | 0.693 | 0.036 |
| Uberon 2025 | Llama-3.1-8B | LoRA, no loop | 0.436 | 0.344 | 0.192 | 0.678 | 0.712 | 0.304 |
| Uberon 2025 | Llama-3.1-8B | LoRA, all loops | 0.435 | 0.346 | 0.195 | 0.675 | 0.709 | 0.089 |
| Uberon-Constraint-Stress | Qwen2.5-14B | Base, no loop | 0.307 | 0.246 | 0.115 | 0.602 | 0.644 | 0.523 |
| Uberon-Constraint-Stress | Qwen2.5-14B | Base, all loops | 0.307 | 0.247 | 0.116 | 0.602 | 0.644 | 0.025 |
| Uberon-Constraint-Stress | Qwen2.5-14B | LoRA, no loop | 0.416 | 0.379 | 0.242 | 0.674 | 0.712 | 0.403 |
| Uberon-Constraint-Stress | Qwen2.5-14B | LoRA, all loops | 0.410 | 0.373 | 0.237 | 0.669 | 0.707 | 0.024 |
| Uberon-Constraint-Stress | Llama-3.1-8B | Base, no loop | 0.320 | 0.257 | 0.117 | 0.603 | 0.644 | 0.310 |
| Uberon-Constraint-Stress | Llama-3.1-8B | Base, all loops | 0.319 | 0.255 | 0.116 | 0.603 | 0.644 | 0.023 |
| Uberon-Constraint-Stress | Llama-3.1-8B | LoRA, no loop | 0.409 | 0.368 | 0.226 | 0.664 | 0.702 | 0.285 |
| Uberon-Constraint-Stress | Llama-3.1-8B | LoRA, all loops | 0.404 | 0.363 | 0.220 | 0.657 | 0.695 | 0.061 |
Table A.3
Axiom-extractor performance on validation splits used during LoRA training. The table evaluates whether the fine-tuned extractor learned to produce parseable and reference-compatible relationship axioms before being used in the workflow.
| Ontology | Setting | Model | Extractor | n | Parse | Exact | Pair P | Pair R | Pair F1 | Pred. | Acc. | Obj. | Acc. | Hit |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Uberon | Uberon eval | Qwen2.5-14B | LoRA | 1912 | 1.000 | 0.348 | 0.423 | 0.490 | 0.454 | 0.520 | 0.394 | 0.745 | ||
| Uberon | Uberon eval | Llama-3.1-8B | LoRA | 1912 | 1.000 | 0.300 | 0.306 | 0.487 | 0.375 | 0.413 | 0.302 | 0.745 | ||
| DO | DO eval | Qwen2.5-14B | LoRA | 962 | 1.000 | 0.686 | 0.518 | 0.810 | 0.632 | 0.536 | 0.505 | 0.923 | ||
| DO | DO eval | Llama-3.1-8B | LoRA | 962 | 1.000 | 0.682 | 0.606 | 0.797 | 0.689 | 0.635 | 0.588 | 0.915 |
Feng et al.: Preprint submitted to Elsevier
Page 2