KWEAVE: ontologies from scientific literature
A staged, multi-agent LLM pipeline that reads a curated set of papers and produces a finished OWL 2 ontology aligned to BFO and CCO, with the evidence for every claim kept alongside it.
The problem
Ontology engineering is usually manual: experts read papers, agree on terms and place them in a hierarchy by hand. It is slow, and the link between a class in the ontology and the sentence that justified it is often lost.
KWEAVE was built in a university photovoltaics research lab to do this from curated literature collections, starting with PV reliability, techno-economics and cell technologies, and to keep each claim tied to its source.
My role
I lead the design and development of the pipeline, its evaluation and its dashboard. A paper describing KWEAVE is in preparation.
Described here from the public repository. Views are my own.
How it works
- Fixed stage order. Ordinary Python decides what runs next, not a model. Each agent has its own prompt and JSON schema and writes its artifact before the next stage reads it.
- Candidates, not free answers. External terms reach the model only as candidates retrieved from a local ontology store (BFO, CCO, RO, QUDT and others); answers outside them are dropped.
- Provider-agnostic. Runs on local open-weights models through Ollama or on a Slurm cluster with larger models, with every run recording its model, revision and compute.
Evaluation methods
- Evidence checks. Every relation, causal claim and measurement carries a short quote, checked against the parsed paper and marked verified, unverified or unevidenced. Unevidenced items never become axioms.
- Schema checks. Every model call must return JSON for a fixed schema; missing rows are re-asked once and coverage is reported.
- Deterministic guards. Placement checks BFO categories, cycles and lexical heads; mappings that claim identity need matching names and categories.
- Structural validation and quality metrics on each domain ontology and on the cross-domain master ontology.
- Expert review. Domain experts review a sampled set of placements, definitions and mappings.
Sample deliverables
ontology.ttl— the OWL 2 domain ontologydomain_layer.ttl— the literature layer: every claim with its source and quoteontology_report.mdanduncertain.json— what was placed, mapped, dropped or left uncertain, item by item- Cross-domain integration ontology and report
- A dashboard for exploring the ontology, evidence links and lineage
Generated ontologies and run data are released under CC BY 4.0.
Limitations
- A matching quote shows the text exists in the paper, not that it supports the claim.
- Structural validation shows the files are well formed, not that definitions, parents and mappings are correct.
- Extraction completeness and agreement with experts need the separate review protocol; model calls are not deterministic, so reruns can differ.