MASEO: A Multi-Agent System for Explainable Ontology Generation¶
This repository provides the artifact for MASEO, a research-oriented multi-agent system that automated generate ontologies from competency questions, with a built-in focus on explainability. It aims to make the process of ontology generation more transparent, modular, and intelligent by distributing tasks among specialized agents. Each specialized agent is designed to keep track the logic behind each entity in generated ontology.
MASOE Structural Overview¶
The pipeline consists of four sequential stages:
| Agent | Responsibility | External Tools |
|---|---|---|
Ontology Generation Agent |
Generates the initial OWL ontology from CQs | None |
Syntax Repair Agent |
Fixes RDF/XML syntax errors reported by the parser | rdflib |
Logical Consistency Agent |
Repairs logical inconsistencies reported by HermiT | HermiT Reasoner |
Pitfall Resolution Agent |
Resolves ontology modeling pitfalls reported by OOPS! | OOPS! |
The illustration of the MASOE framework:

Features¶
- End-to-end automation — from a list of CQs to a validated ontology
- Role-based agents — each stage is handled by a dedicated LLM agent with a specific instruction and responsibility
- Provenance tracking — every ontology entity carries an append-only
vaem:rationalelog attributed to the agent that made each change, and adc:sourcelog linking each change back to the CQ, pitfall, or error that motivated it
External tools requirements¶
| Tool | Purpose | Setup |
|---|---|---|
| HermiT Reasoner | Logical consistency checking | Download HermiT.jar and update the path in reason_ontology() |
| OOPS! REST API | Ontology pitfall detection | No local setup required — uses the public REST endpoint |
| Java (JRE 8+) | Required to run HermiT | sudo apt install default-jre |
Acknowledgements¶
This work was supported by the grant SOEL: Supporting Ontology Engineering with Large Language Models PID2023-152703NA-I00 funded by MCIN/AEI/10.13039/501100011033 and by ERDF/UE. The authors would also like to thank the EDINT (Espacios de Datos para las Infraestructuras Urbanas Inteligentes) ontology development team for sharing the project resources for evaluation purposes.