Inferensys

Glossary

Competency Question

A competency question is a natural language query that an ontology must be able to answer, used during the design phase to define its scope, requirements, and competency.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
ONTOLOGY ENGINEERING

What is a Competency Question?

A competency question is a natural language query used to define the scope and requirements of an ontology during its design phase.

A competency question is a natural language query that a formal ontology must be capable of answering, serving as a functional specification to define its scope, requirements, and competency. These questions are formulated during the initial design phase to capture the essential knowledge needs of a domain, ensuring the resulting conceptual model aligns with real-world use cases. They act as test cases, guiding the definition of classes, properties, and axioms.

Competency questions bridge stakeholder requirements and technical implementation. By enumerating what the ontology must answer, engineers can systematically identify necessary entities and relationships, avoiding scope creep. The questions are later translated into formal queries, such as SPARQL, to validate the ontology's inference capabilities. This methodology is central to ontology evaluation and ensures the model is fit for purpose in enterprise knowledge graphs.

ONTOLOGY ENGINEERING

Key Characteristics of Competency Questions

Competency questions are natural language queries that define the scope and requirements an ontology must satisfy. They are a foundational tool in the ontology engineering lifecycle.

01

Natural Language Formulation

Competency questions are initially expressed in natural language (e.g., English) by domain experts and stakeholders. This ensures the ontology's requirements are grounded in real-world business needs and are understandable without technical knowledge. Examples include:

  • "Which employees are certified to operate a specific piece of machinery?"
  • "What is the current inventory level for part number X across all warehouses?"
  • "List all projects managed by a department that exceeded its budget last quarter." This formulation precedes their formal translation into logical queries.
02

Scope and Requirement Definition

The primary function of competency questions is to delineate the scope of the ontology. They act as acceptance criteria; an ontology is considered 'competent' if it can provide answers to all defined questions. This process:

  • Identifies key concepts and relationships that must be modeled.
  • Prevents scope creep by providing a concrete, testable benchmark for completion.
  • Aligns stakeholders by making abstract modeling goals tangible and verifiable. They bridge the gap between high-level business objectives and the precise, formal structure of an ontology.
03

Basis for Formalization

Competency questions serve as the direct input for formalizing the ontology's structure. Each question is systematically decomposed and mapped to ontological components:

  • Nouns and noun phrases often become classes (e.g., Employee, Project, Machine).
  • Verbs and relationships become object properties (e.g., manages, isCertifiedToOperate).
  • Attributes and descriptors become data properties (e.g., budgetAmount, inventoryLevel).
  • Quantifiers and conditions inform axioms and constraints (e.g., "exceeded its budget" implies a data property comparison). This mapping ensures the resulting OWL or RDFS ontology is directly fit for purpose.
04

Testable Query Benchmark

Once formalized, competency questions are translated into executable SPARQL queries or DL queries. These translations create a test suite for the ontology and its populated knowledge graph. This enables:

  • Validation: Verifying the ontology's logical structure can support the intended queries.
  • Knowledge Base Testing: Confirming that after data integration (ontology population), the system returns correct, complete answers.
  • Regression Testing: Ensuring ontology modifications or extensions do not break existing query capabilities. This transforms qualitative requirements into quantitative, automated quality checks.
05

Iterative Refinement Driver

The process of formalizing and testing competency questions is inherently iterative. It often reveals gaps, ambiguities, or new requirements, driving ontology refinement. Common cycles include:

  1. Question reveals missing concept: A question about "project risk level" may expose the need for a RiskAssessment class.
  2. Formalization exposes ambiguity: "List senior staff" requires defining the property yearsOfService and a specific threshold.
  3. Query results are incomplete: Missing data or property chains indicate needed inference rules or data cleanup. This iterative loop continues until the ontology reliably answers all questions, ensuring a robust final model.
06

Distinction from User Queries

It is critical to distinguish competency questions from end-user queries. They serve different purposes in the system lifecycle:

  • Competency Questions: Are design-time artifacts. They are comprehensive, used to define the ontology's schema (TBox). They cover edge cases and establish the boundaries of what the system should be able to answer.
  • User Queries: Are run-time operations. They are specific, ad-hoc questions executed against the fully populated knowledge graph (ABox) using the schema defined by the competency questions. In essence, competency questions define the capability of the system, while user queries exercise that capability on specific data instances.
ONTOLOGY ENGINEERING

The Role of Competency Questions in the Ontology Development Process

Competency questions are a foundational tool in ontology engineering, used to define the scope and validate the utility of a formal knowledge model.

A competency question is a natural language query that an ontology must be capable of answering, serving as a formal requirement to define its scope and competency during the design phase. These questions are developed collaboratively with domain experts to capture the essential knowledge needs, ensuring the resulting formal ontology is fit for purpose. They act as acceptance criteria, guiding the definition of classes, properties, and axioms.

The process of formulating and refining competency questions is iterative, directly influencing ontology evaluation and validation. By testing the ontology's ability to answer these questions—often via SPARQL queries—engineers verify logical consistency, completeness, and practical utility. This methodology bridges high-level business requirements with precise technical specifications, preventing scope creep and ensuring the knowledge graph delivers deterministic answers to real-world queries.

ONTOLOGY ENGINEERING

Examples of Competency Questions

Competency questions are natural language queries that define the scope and requirements of an ontology. The following examples illustrate their use across different domains to clarify what knowledge the ontology must capture and be able to answer.

01

Defining Scope in Manufacturing

These questions establish the boundaries of a production ontology.

  • Can a single production line assemble multiple product variants?
  • What are the mandatory quality control checks for a finished component?
  • Which supplier provides the raw material for a specific batch?
  • Is a machine that is undergoing maintenance considered 'available' for scheduling?

Answering these requires defining classes like ProductionLine, ProductVariant, QualityCheck, and properties like hasSupplier, hasMaintenanceStatus.

02

Clarifying Relationships in Finance

These questions force precise definitions of financial entities and their interactions.

  • Does a corporate merger terminate all existing contracts of the acquired entity?
  • Can an individual be both the beneficiary and the trustee of the same financial instrument?
  • What is the chain of ownership for a security that has been re-hypothecated?
  • Is an internal transfer between accounts at the same bank considered a 'transaction'?

Modeling the answers clarifies complex relationships like terminates, hasRole, hasOwnershipChain, and class distinctions like InternalTransfer vs. ExternalTransaction.

03

Establishing Lifecycles in Healthcare

These questions model temporal states and procedural dependencies in patient care.

  • What conditions must be satisfied before a patient can be discharged?
  • Does a 'prescription' expire if the associated 'diagnosis' is later invalidated?
  • Can a 'clinical trial protocol' be amended after patient enrollment has begun?
  • Is a 'lab specimen' considered valid if the patient fasted for fewer than the required hours?

Answering these requires defining states, events, preconditions, and temporal constraints for classes like PatientStay, Prescription, and ProtocolAmendment.

04

Resolving Ambiguity in Supply Chain

These questions identify and disambiguate core logistical concepts.

  • Is a 'shipment' the same entity if its contents are split across multiple trucks?
  • What defines a 'delay': a missed internal milestone or a breach of customer contract?
  • Does a 'warehouse' refer to the physical building, the legal business unit, or the logical inventory pool?
  • If a product is recalled, are all items in transit automatically considered 'non-compliant'?

These questions drive the creation of distinct classes (e.g., PhysicalShipment, LogicalShipment) and precise property definitions (e.g., hasComplianceStatus).

05

Enabling Inference in Legal Domains

These questions test the ontology's ability to derive implicit knowledge through reasoning.

  • If a contract clause is governed by California law, does the entire contract fall under that jurisdiction?
  • Are all signatories to a non-disclosure agreement automatically bound to all its amendments?
  • If a regulation cites another revoked regulation, is the citation still valid?
  • Can a person be held liable for an action performed by an autonomous agent they deployed?

Answering these requires modeling complex axioms, property characteristics (transitivity), and rules that allow a reasoner to make correct inferences.

06

Ensuring Completeness for Compliance

These questions verify the ontology can support regulatory reporting and audits.

  • List all data processing activities where customer biometric data is involved.
  • For a given financial transaction, can all intermediary entities in the payment chain be identified?
  • Which manufacturing processes used a chemical that has since been added to a restricted substances list?
  • What personal data attributes were collected from users under a previous version of our privacy policy?

These questions ensure the ontology captures necessary historical data, lineage properties (e.g., usedSubstance, collectedUnderPolicy), and supports retrospective queries.

COMPETENCY QUESTION

Frequently Asked Questions

A competency question is a foundational tool in ontology engineering, used to define the scope and requirements of a formal knowledge model. These questions ensure the resulting ontology is fit for purpose and can answer the queries essential to its domain.

A competency question is a natural language query that an ontology must be capable of answering, serving as a functional requirement to define its scope, coverage, and competency during the design phase. It is not a query to be executed on a populated knowledge base, but a specification used to test if the ontology's conceptual model—its classes, properties, and constraints—is sufficiently expressive to represent the knowledge needed for an answer. For example, in a manufacturing ontology, a competency question could be: "Which components supplied by Vendor A are used in Product Model Z?" The ontology must include concepts for Component, Product Model, Vendor, and relationships like isSuppliedBy and isUsedIn to even frame this question logically.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.