Modeling legal ontologies with a validation based LLM pipeline

Large language models (LLMs) can help translate legal norms into machine-readable ontologies, but their outputs require validation to ensure structural and semantic consistency. We present a modular pipeline that encodes natural-language norms as OWL class restrictions distinguishing compliant from non-compliant behavior, and iteratively validates generated ontologies using syntax checks, SHACL structural checks, competency-question tests, and ontology-pitfall analysis. We assess the pipeline across six LLM configurations using three exemplar rules from the UK Highway Code's Road Junctions section. The results show that the validation layers detect distinct errors, feedback can help correct structural issues, and competency questions can reveal semantic differences. These findings demonstrate the pipeline's feasibility, and the possibility for future development and broader quantitative evaluation.

Authors

Institutions

Publication Details

Journal
Frontiers in Artificial Intelligence
Published
2026-11-25
DOI
https://doi.org/10.3389/frai.2026.1931148
Primary Topic
Semantic Web and Ontologies
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Modeling legal ontologies with a validation based LLM pipeline

Galileo Sartor, Enrico Francesconi, Adam Wyner
3 links
Frontiers in Artificial Intelligence
Semantic Web and Ontologies
article

Modeling legal ontologies with a validation based LLM pipeline

Galileo Sartor, Enrico Francesconi, Adam Wyner
article en

Abstract

Large language models (LLMs) can help translate legal norms into machine-readable ontologies, but their outputs require validation to ensure structural and semantic consistency. We present a modular pipeline that encodes natural-language norms as OWL class restrictions distinguishing compliant from non-compliant behavior, and iteratively validates generated ontologies using syntax checks, SHACL structural checks, competency-question tests, and ontology-pitfall analysis. We assess the pipeline across six LLM configurations using three exemplar rules from the UK Highway Code's Road Junctions section. The results show that the validation layers detect distinct errors, feedback can help correct structural issues, and competency questions can reveal semantic differences. These findings demonstrate the pipeline's feasibility, and the possibility for future development and broader quantitative evaluation.

Frontiers in Artificial IntelligenceVol. 9
Swansea University (GB), Institute of Legal Information Theory and Techniques (IT), National Research Council (IT), Istituto di Informatica Giuridica e Sistemi Giudiziari (IT)
Peace, justice, and strong institutions
Semantic Web and Ontologies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon