# 💡❓Competency Questions ❓💡

In this module, we will talk about **Competency Questions** or **CQs** for short! **CQs** are an important and often overlooked part of the ontology development process. Mastering CQs will allow you to build consistent, detailed, and reliable ontologies while also saving yourself some headaches along the way.☺️

```
🚨Learning objectives🚨

  - Learn what a CQ is and why they are important 👁️👄👁️
  - How to create a CQ's ✏️
  - Put your knowledge to the test with an Assignment over this module! 🧠

```

![gorl2](../../../images/AlexisE.png)

## What are **CQs** and why are they so important⁉️⁉️

Well **CQs** are important for a number of reasons but lets first start with a definition.

- 💡 <ins>_Formal Definition:_</ins> **Competency Questions (CQs)** are questions formatted in natural language that aid in defining the scope and requirements in knowledge representation.

- 💡<ins>_Simplified Definition:_</ins> **CQs** are questions that the ontology engineer(s) create during the ontology development process to keep things organized and ensure the ontology is equipped with all of the information it needs.

\***\*CQs\*\*** are a helpful tool used in the field of ontology! They provide guidance in the fundamental stages of ontology building. A really detailed breakdown provided by [Keet & Khan, 2024](http://arxiv.org/pdf/2412.13688) gives us **5 different CQs** that when filled out, work together to ensure that your ontology is efficient and detailed. Below is a small summary of each: ⬇️⬇️⬇️

1.  **Scoping **CQs\*\*\*\* 🔬: Defining the boundaries/Scope of the ontology.

    - We use **CQs** to help us define the boundaries of the ontology- what should be included or excluded.

            Example:
                - SCQ: "Can the ontology represent different types of animals 🐕🐂🐖❓❓
                - Explanation: Helps us decide if "animal type" should be represented in the ontology.

2.  **Validating **CQs\*\*\*\* 🖊️: Ensure that the ontology is accurate and complete.

    - We use **VCQs** to check whether the knowledge we are modeling in our ontology works correctly (Does it give us the right answer?)

             Example:
                - VCQ: What is the habitat of a polar bear 🐻‍❄️❓
                - Explanation: testing the ontology to see if the correct answer (Artic) was given.

3.  **Foundational CQs** 🧱: Address fundamental concepts and relationships

    - We use **FCQs** to test out the basic and essential facts that the ontology must be able to support.

             Example:
                - FCQ: What is a mammal 🐈❓
                - Explanation: lets us know if the ontology can define key concepts like "mammal"

4.  **Relationship CQ's** 👫: Focus on the connections between different entities.

    - **RCQ's** check the relationship between entities are modeled properly.

             Example:
                - RCQ: Is a dog 🐕 a type of mammal❓
                - Explanation: we are testing the Is-a relationship and seeing if it is correctly represented.

5.  **Metaproperty CQs** 🟦: Deal with properties of the ontology itself.

    - **MCQ's** help us look at the properties of the model itself. How correct and consistent is it?

          Example:
            - MCQ: Does every animal have exactly one species❓
            - Explanation: looking to see if the ontology enforces rules about how data should behave.

    - **Note**: look at the [Axiom Module](../02-modeling-fundamentals/03-Axioms.md) to get a better idea of what "_enforcing rules_" means.

These are very simplistic representations of the **CQs** defined in [Keet & Khan, 2024](http://arxiv.org/pdf/2412.13688) if you like a more technical explanation of each then we suggest looking into the paper!

- ➡️ [Click here for the article!](http://arxiv.org/pdf/2412.13688) ⬅️

### So what is the benefit of using **CQs** ⁉️

- we use **CQs** to keep us organized and goal oriented when we are developing our ontology! This organization makes it not only easier on ourselves when developing a ontology but also when we are working with other ontology engineers. The more organization and consistency we have the more functional and detailed our ontology will be!

![theboys](../../../images/theboys.png)

            Work smarter not harder!

       Develop the habit of using CQs to ensure that your ontology will be thoroughly developed. You will thank yourself for it later!

## So how do I start making my own **CQs** ⁉️⁉️

Ok now that we know what **CQs** are and **the different types of** **CQs** lets learn how to use them in practice. 😃😃😃

### 1. Define the general topic of your ontology.

- **What** are you trying to construct the ontology for?
- **Who** are you trying to construct the ontology for? stakeholders? research?
  - If you are working with stakeholders or other external partner(s) have a meeting with them to gather specific interest and questions that they want the ontology to be able to answer! 👍

### 2. Create a template of the different **CQs**!

(**NOTE:** excel can be a really good tool for this kind of organization).

     **Note** : It can benefit you if you categorize big topics in this organization. Making sure that the large parameters of interest are identified and there are CQ's for them!

![CQs](../../../images/CQ-HOW-TO.png)

### 3. Once you have your questions you can begin to write them in natural language!

- **The people of the Historic Slave Trade Ontology**: [Competency Questions](https://docs.enslaved.org/competencyQuestions/v2/enslavedcompetencyquestions-v2.pdf) is a good reference for how to write and organize the questions into natural language for the various users of your ontology.

      Example: From the Enslaved Ontology CQs document

        The Public
           1. Who were the relatives of Jack George, an enslaved person who lived in New Orleans between the years 1811 and 1820.

        K-12
           1. Who did Thomas Jefferson enslave at Monticello?

## In summary

**CQ's** are a necessary step in the development process of ontologies. Mastering **CQs** by investing time into the process and paying attention to details can make the development process easier and faster for you in the long run!

# Assignment ✏️🧠💡

Lets test your knowledge in this _Competency Questions Assignment_!

- click here ➡️ <ins>[CQs Assignment](../Supplementary-material/Assignments/CQ-Assignment.md) </ins> to get the instructions on how to complete and submit! 😁

- If you have any questions please ping us in the ✨ **_#kastle-drawbridge_** ✨ slack channel!

<center>Looking Forward to your answers </center>
<center>🍀🍀❗GOOD LUCK❗🍀🍀</center> <br>

![gorl](../../../images/andrea.png)
