{"id":50793123,"url":"https://github.com/oeg-upm/maseo","last_synced_at":"2026-06-12T12:30:51.789Z","repository":{"id":344190935,"uuid":"1180869422","full_name":"oeg-upm/maseo","owner":"oeg-upm","description":"MASEO: A Multi-Agent System for Explainable Ontology generation","archived":false,"fork":false,"pushed_at":"2026-04-30T15:49:53.000Z","size":19497,"stargazers_count":3,"open_issues_count":8,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-12T13:37:48.334Z","etag":null,"topics":["knowledge-engineering","ontology","ontology-engineering"],"latest_commit_sha":null,"homepage":"https://maseo.readthedocs.io/en/latest/?badge=latest","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oeg-upm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-13T13:55:33.000Z","updated_at":"2026-05-11T04:21:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/oeg-upm/maseo","commit_stats":null,"previous_names":["oeg-upm/multi_agent_explainable_oe","oeg-upm/maseo"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/oeg-upm/maseo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oeg-upm%2Fmaseo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oeg-upm%2Fmaseo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oeg-upm%2Fmaseo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oeg-upm%2Fmaseo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oeg-upm","download_url":"https://codeload.github.com/oeg-upm/maseo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oeg-upm%2Fmaseo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34245217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["knowledge-engineering","ontology","ontology-engineering"],"created_at":"2026-06-12T12:30:51.343Z","updated_at":"2026-06-12T12:30:51.773Z","avatar_url":"https://github.com/oeg-upm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MASEO: A Multi-Agent System for Explainable Ontology Generation\r\n\r\n\r\n[![Documentation Status](https://readthedocs.org/projects/maseo/badge/?version=latest)](https://maseo.readthedocs.io/en/latest/?badge=latest)\r\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.19052003.svg)](https://doi.org/10.5281/zenodo.19052003) \r\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\r\n\r\n\r\nThis 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. \r\n\r\n\r\n## MASOE Structural Overview\r\n\r\nThe pipeline consists of four sequential stages:\r\n\r\n| Agent | Responsibility | External Tools |\r\n|-------|-------|----------------|\r\n| `Ontology Generation Agent` |  Generates the initial OWL ontology from CQs | None |\r\n| `Syntax Repair Agent` | Fixes RDF/XML syntax errors reported by the parser | [rdflib](https://rdflib.readthedocs.io/en/stable/) |\r\n| `Logical Consistency Agent` | Repairs logical inconsistencies reported by HermiT | [HermiT Reasoner](http://www.hermit-reasoner.com/) |\r\n| `Pitfall Resolution Agent` | Resolves ontology modeling pitfalls reported by OOPS! | [OOPS!](https://oops.linkeddata.es/) |\r\n\r\nThe illustration of the MASOE framework:\r\n\r\n\u003cimg src=\"docs/image/maseo_framework.png\" alt=\"maseo overview\" width=\"500\"\u003e\r\n\r\n\r\n### Features\r\n\r\n- **End-to-end automation** — from a list of CQs to a validated ontology\r\n- **Role-based agents** — each stage is handled by a dedicated LLM agent with a specific instruction and responsibility\r\n- **Provenance tracking** — every ontology entity carries an append-only `vaem:rationale` log attributed to the agent that made each change, and a `dc:source` log linking each change back to the CQ, pitfall, or error that motivated it\r\n\r\n### External tools requirements\r\n\r\n| Tool | Purpose | Setup |\r\n|------|---------|-------|\r\n| [HermiT Reasoner](http://www.hermit-reasoner.com/) | Logical consistency checking | Download `HermiT.jar` and update the path in `reason_ontology()` |\r\n| [OOPS! REST API](https://oops.linkeddata.es/) | Ontology pitfall detection | No local setup required — uses the public REST endpoint |\r\n| Java (JRE 8+) | Required to run HermiT | `sudo apt install default-jre` |\r\n\r\n\r\n## Execution\r\n\r\nMASEO support execution over single set of competency questions with sepcific LLM (CLI Execution) as well as batch run over a selection of models and sets of competency questions over various domains (Batch Execution).\r\n\r\n### CLI Execution\r\n\r\n```bash\r\npython -u cli.py \\\r\n    --config       ./config.yaml \\\r\n    --cqs_file     ./dataset/cqs/wine_cqs.json \\\r\n    --save_file    ./wine.owl \\\r\n    --agent_method true\r\n```\r\n\r\n| Argument | Required | Description |\r\n| --- | --- | --- |\r\n| `--config` | Yes | Path to `config.yaml`. Defaults to `./config.yaml`. |\r\n| `--cqs_file` | Yes | JSON file with competency questions: `[{\"id\": \"CQ1\", \"value\": \"...\"}, ...]`. |\r\n| `--save_file` | Yes | Where to write the produced OWL ontology. |\r\n| `--agent_method` | No | `true` (default) runs the full multi-agent pipeline; `false` runs single-pass generation only. |\r\n\r\n### Batch Execution\r\n\r\nTo sweep multiple models and competency-question files in one command, use `run_batch.py`:\r\n\r\n```bash\r\npython -u run_batch.py --batch ./batch.yaml\r\n```\r\n\r\n`batch.yaml` only contains the list of models that you wish to run.\r\n```yaml\r\nmodels:\r\n  - provider: openrouter\r\n    id: qwen/qwen3.6-flash\r\n  - provider: deepseek\r\n    id: deepseek-chat\r\n  - provider: ollama\r\n    id: qwen3:32b\r\n  ...\r\n```\r\n\r\nPlace your competency-question files in `./dataset/cqs/`. For every `(model, cqs_file)` pair the runner invokes MASEO generation (`--agent_method true`) and normal agent generation (`--agent_method false`). All generated ontology and log file will be saved independently.\r\n\r\n\r\n## Documentation\r\n\r\nAdditional documentation of the project is available at [readthedocs](https://maseo.readthedocs.io/en/latest/?badge=latest)\r\n\r\n- The full document for configuration can be found at: [Configuration](https://maseo.readthedocs.io/en/latest/configuration/)\r\n- The full document for Input file structure can be found at [Input](https://maseo.readthedocs.io/en/latest/input/)\r\n- The full document for Output file structure can be found at [Output](https://maseo.readthedocs.io/en/latest/output/)\r\n\r\n\r\n\r\n## Acknowledgements\r\n\r\nThis work was supported by the grant [SOEL: Supporting Ontology Engineering with Large Language Models](https://w3id.org/soel) 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.\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foeg-upm%2Fmaseo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foeg-upm%2Fmaseo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foeg-upm%2Fmaseo/lists"}