How do I build an ontology?

Connecting up your domain’s knowledge to a reliable AI service usually requires the design and implementation of an ontology. An ontology is a way of mapping and organising knowledge in a domain so that it becomes machine-readable by AI. It sets out what key concepts mean and how they relate to one another, enabling AI to reason within constraints that prevent it from hallucinating.

While ontology platforms now automate most of the technical development work, human domain experts are still needed to agree on the definitions, rules and boundaries that structure the data and govern what the AI does.

Building consensus for an ontology, which has been the subject of a recent study, can be kickstarted by clarifying what an ontology actually is, what it’s going to be used for, and then asking your domain experts three key questions.

1) What are the important things in your domain?

The first question seeks to identify the categories that experts deal with on a regular basis to make the domain run, which might be for example ‘diseases’ or ‘treatments’ in a healthcare domain. In the technical language of ontologies, these are called classes or data-sets.

The words that your experts choose for each class should be nouns that everyone in the domain can understand. For example, in the hydro-electric industry, nouns might be ‘turbine’ or ‘maintenance crew’. In the wine trade, a class might be ‘wineries’.

Defining these classes will largely be guided by what the ontology is used for. Depending on the domain’s scope, a wider class such as alcoholic beverages might be preferred to a narrower sub-category such as Bordeaux wine.

2) Which facts go in your spreadsheet column?

The second key question is about facts rather than things. In other words, the expert panel needs to agree on the key characteristics of each class. In ontology-speak these facts are called data properties or attributes.

Using the hydro-electric domain as an example, facts that relate to a turbine might be that it needs maintenance, and that it makes electricity. In a spreadsheet relating to turbines, these would be the column headers.

Choosing the headers then enables the rows to be filled in, using individual examples from the domain, such as a specific turbine located in a particular dam. In ontological language, these examples are called instances. So, the ‘needs maintenance’ column might indicate how often the turbine needs a checkup, while the ‘makes electricity’ column might specify the dam’s output in MW.

3) What verbs link everything together?

This last question seeks to identify how all these classes and sub-categories relate to one another in the ontology. These so-called links are also known as object properties, and usually take the form of a simple verb. For example, a supplier ‘ships to’ customers, a winery ‘grows’ grapes, and so on.

Conclusion

Building an ontology might sound daunting and technically complex. But getting answers to these three simple questions can cut through the jargon and help involve your domain experts in the creative process of developing a working structure for your organisation’s knowledge. As a practical shortcut, you should also consider customising an existing ontology standard, which can improve interoperability with other systems.

Ontology building can be made easier and faster by using our ontology-as-a-service platform. For enterprise level jobs however, a dedicated ontology engineer may be needed.