When engineers attempt to build knowledge graphs or ontologies for complex domains—whether tracking sustainable biosourcing, mapping chemical biology, or organizing electronic health records—they often fall into a trap. They try to model the entire universe of the domain from the top down. The goal is theoretical completeness: capturing every possible entity, attribute, and relationship that might ever exist.
However, this exhaustive approach invariably leads to bloated, overly complex schemas. These massive reference ontologies are expensive to build, difficult to maintain, and introduce unnecessary mapping overhead for data that users will never actually query.
To solve this, a powerful paradigm has emerged: competency-driven engineering. Instead of asking "What exists in this domain?", developers ask "What specific questions must this system be capable of answering?"
Bounding Scope with Competency Questions
These targeted questions, known as Competency Questions (CQs), serve as a strict functional boundary for the data model. By grounding the architecture in real-world expert requirements, engineers can build lean, task-oriented knowledge structures.
For example, in industrial ecology, Agneta Ghose et al. used foundational competency questions in An Open Source Dataset and Ontology for Product Footprinting to define the precise scope and requirements for an environmental footprinting ontology. Similarly, when designing a knowledge base for sustainable biosourcing, Warren J. Read et al. demonstrated in The BioHub Knowledge Base: Ontology and Repository for Sustainable Biosourcing that prioritizing semantic structures based entirely on practical user tasks—such as estimating supply chain yields—ensures the model remains optimized for real-world utility. By focusing only on the relationships required to answer these predefined queries, the resulting models remain highly functional without unnecessary complexity.
The Middle-Out Approach to Data Integration
This query-driven philosophy underpins modern data integration frameworks. Traditional integration forces heterogeneous data sources to conform to a single, massive global schema. In contrast, a "middle-out" strategy uses competence queries to limit the integration scope to what is strictly necessary.
Top-Down Modeling: [Exhaustive Domain Ontology] -> (Massive, Bloated Schema)
vs.
Competency-Driven: [Expert Questions] -> [Targeted Queries] -> (Lean, Functional Graph)
As demonstrated by Simone Bocca et al. in Building Interoperable Electronic Health Records as Purpose Driven Knowledge Graphs, formalizing functional requirements into competence queries produces far leaner and more functional knowledge graphs than traditional top-down or bottom-up methods. Fausto Giunchiglia et al. further showed in Popularity Driven Data Integration that defining these queries at the outset of an integration project prevents the unnecessary mapping of irrelevant data, keeping the system strictly bounded by user needs.
This strategy has been successfully applied across highly diverse fields, from structuring software testing knowledge bases (Shanmuganathan Vasanthapriyan et al. in An Ontology-based Knowledge Management System for Software Testing) to managing complex circular factory operations (Ratan Bahadur Thapa et al. in A Roadmap to Create a Knowledge Graph for the Circular Factory for the Perpetual Product), proving that utility-driven design scales better than theoretical completeness.
Executable Validation: Turning Questions into Tests
Why does this approach work so reliably? Because competency questions do not just serve as a blueprint for construction; they also function as an automated test suite for validation.
Once a knowledge graph or ontology is built, the original natural-language competency questions are translated into formal, executable queries (such as SPARQL). If the query successfully executes and returns the correct data, the schema is validated.
[Natural Language CQ] ---> [SPARQL Query] ---> [Execute against Graph] ---> [Pass/Fail Validation]
The authors of A unified approach to publish semantic annotations of agricultural documents as knowledge graphs (Nadia Yacoubi Ayadi et al.) demonstrated this by deriving CQs from agricultural expert needs and translating them into SPARQL queries to verify the utility of their constructed knowledge graphs. This shifts validation from abstract technical performance to practical scientific utility.
As Md. Rezaul Karim et al. emphasized in Towards a FAIR Sharing of Scientific Experiments: Improving Discoverability and Reusability of Dielectric Measurements of Biological Tissues, competency-based validation ensures that a data model can resolve the complex, multi-variable queries required by domain experts. It provides an engineering guarantee that the system preserves the structural integrity and semantic depth required for the domain (Theis E. Jendal et al. in The Yelp Collaborative Knowledge Graph), directly supporting complex cross-domain questions (Bin Chen et al. in Improving integrative searching of systems chemical biology data using semantic annotation; J. T. Newman et al. in On the need for an international effort to capture, share and use crystallization screening data).
From Static Schemas to Dynamic Runtime Graphs
While competency-driven design has traditionally been used to build static database schemas and ontologies, the core intuition—using a query to bound graph complexity—is now being applied dynamically at runtime.
In modern Retrieval-Augmented Generation (RAG) systems, searching a massive, static knowledge graph can introduce significant noise and computational overhead. To overcome this, Chenyang Bu et al. introduced a dynamic approach in Query-Driven Multimodal GraphRAG: Dynamic Local Knowledge Graph Construction for Online Reasoning. Instead of relying on a rigid, pre-built graph, their system uses the semantic structure of an incoming user query to generate a blueprint on-the-fly. It then dynamically constructs a localized knowledge graph tailored precisely to that question.
This represents the ultimate evolution of the query-driven philosophy: whether engineering a multi-decade industrial data standard or generating a local graph in milliseconds for a large language model, letting the question dictate the structure of the knowledge ensures efficiency, relevance, and clarity.
Key Foundational Work
Improving integrative searching of systems chemical biology data using semantic annotation (2012) — contributed 1 concept elements to this direction.
On the need for an international effort to capture, share and use crystallization screening data (2012) — contributed 1 concept elements to this direction.
The BioHub Knowledge Base: Ontology and Repository for Sustainable Biosourcing (2016) — contributed 1 concept elements to this direction.