ITADN

P1: onto_cq_run — competency-question runner with VSPO pitfall validation

#29Openfabio-rovai 创建于 2026-05-28
F
fabio-rovaicommented
## Why Pairs with #onto_extract_scaffold. The same scaffolding primitive serves both extraction (filling a shape from text) and ontology-quality auditing (answering a competency question against the loaded ontology). Synthesises: - **OntoGPT template library** — hundreds of templated competency questions per domain (`gocam`, `mendelian_disease`, etc.). Open Ontologies has IES4 + JC3IEDM but no first-class CQ catalogue. - **Characterising LLM-Generated CQs** ([arXiv:2604.16258](https://arxiv.org/abs/2604.16258), Apr 2026) — ensemble + human review wins. - **VSPO** ([arXiv:2511.07991](https://arxiv.org/abs/2511.07991), Nov 2025) — fine-tuned model spotting `allValuesFrom` misuse etc.; 26%+ precision, 28%+ recall over GPT-4.1. Could become an `onto_pitfall_check` companion primitive. ## Scope New MCP tool `onto_cq_run`: 1. Input: a competency question in natural language OR SPARQL 2. Validates the CQ against the loaded ontology's schema (no missing classes/properties) 3. Returns: the SPARQL (parsed/synthesised), the result set, and a grounding-pass report (which result rows ground to known entities vs are LLM-generated/ungrounded) Plus a companion `onto_pitfall_check` (or option flag on `onto_cq_run`) that runs VSPO-style pitfall-targeted CQs against the schema: detect misuse of `owl:allValuesFrom`, missing domain/range, equivalentClass loops, etc. Server returns the pitfall report + suggested CQs; Claude reviews + acts. MCP-native: the server provides the CQ scaffold, SPARQL execution, and validation. Claude composes the CQs, reviews pitfall reports, and decides remediation. ## Reference - OntoGPT templates: https://github.com/monarch-initiative/ontogpt - Characterising LLM-Generated CQs: https://arxiv.org/abs/2604.16258 - VSPO: https://arxiv.org/abs/2511.07991 ## Priority **P1** — pairs naturally with #onto_extract_scaffold; both build on the v0.2 SHACL + alignment + HNSW foundation without new architecture.
0 条评论