Solution Architecture2 January 20278 min read

Ontology Before Autonomy — Part 8 of 10

Build the smallest ontology that can be tested

An ontology that tries to describe every entity in a public service cannot be validated, owned or kept true. Part 8 of Ontology Before Autonomy shows how to scope a first version to one service journey, what it must contain, and how every entity, state, relationship and permission earns a test before the agent relies on it.

#Ontology#AI Agents#AI Evaluation#Solution Architecture#Data Governance

Ask a room of service owners what an agent needs to understand about a public service, and the list grows quickly. Applicants, dependants, guardians, addresses, documents of a dozen kinds, offices, appointments, fees, exemptions, appeals, officials, delegations, systems, forms, deadlines. By the end of a workshop the model has eighty entities, nobody can say which relationships matter, and nothing has been tested. Six months later it is a diagram on a wiki that the agent has never read.

The large model fails for a simple reason. Every entity, state and relationship is a claim about the service, and every claim needs someone to confirm it, a test to check it and an owner to keep it true. Eighty entities with no tests is eighty untested claims.

Start with the smallest ontology that one approved service journey needs, and give every entity, state, relationship and permission in it a test before the agent relies on it.

Choose one journey and its decisions

Scope comes from the journey, not from the domain. Pick one bounded service journey that an agent will support first. For an illustrative civil-registration counter, a good first journey is narrow: a person asks about an existing application, learns its status and what is still needed, and books or moves an appointment. It excludes new applications, eligibility, fees and appeals.

Then list the decisions inside that journey: the points where the next step depends on what the system understands. Is this about an existing application or a new one? Which status is the application in? Is a supporting document missing? Is the appointment for this application? Does the person need a human interpreter? Each decision tells you which entities and relationships the ontology must hold. Anything that does not affect a decision waits.

This is the same discipline as starting from competency questions, which Ontologies without the academic fog explains in detail. The difference here is the target. That article sizes an ontology to the questions an assistant must answer. An agent also acts, so the first version must also be sized to the actions it may propose and the points where it must stop.

What the first version contains

The decision tool for this part is the first-version checklist below. Each row has a target size and the test that shows it is ready.

ElementFirst-version targetReady when
Core entitiesFive to fifteen, each with a one-line definitionEvery entity appears in at least one journey decision
StatusesOnly the states the first journey uses, with valid transitionsEvery transition has an owner and a test for one valid and one invalid move
RelationshipsThe ones that change the next actionEvery relationship has a positive and a negative test case
Approved terminologyPreferred and alternative terms for each entity, in each language in scopeA language specialist has approved the entries
Critical fieldsNames, dates, reference numbers and document types the journey depends onEach has a confirmation rule and a test with a wrong value
Permitted actionsPer entity type, state and role, including the agent's roleEach action has an allowed test and a refused test
Escalation statesNamed states for clarification, human handoff and "cannot represent"Each trigger has a test that reaches the state
OwnershipA named owner for each entity, state set and ruleEvery owner has seen and accepted their rows

For the illustrative journey above, twelve entities are enough: applicant, service case, application, application status, supporting document, appointment, office, language session, official, interpreter, consent record and escalation. Four application statuses, three appointment states and three escalation states cover the decisions. The whole first version fits on two pages.

The smallest ontology that can be tested. A first version for one service journey has eight elements, each with a readiness test: five to fifteen core entities, each used by a journey decision; the statuses for this journey, with each transition tested; the relationships that steer the next action, with a positive and a negative case; approved terminology, approved by a language specialist; critical fields, with a wrong-value test; permitted actions, with an allowed and a refused test; escalation states, each reached by its trigger; and ownership, with each owner accepting their rows. Out of scope for the first version, and kept on a backlog with the reason: new applications, eligibility decisions, fees and exemptions, appeals, lost documents and large imported models. An element that fails a test or has no owner is not in the release.ELEMENT AND FIRST-VERSION TARGETREADY WHENCore entities: 5 to 15Used by a journey decisionStatuses for this journeyEach transition testedRelationships that steerPositive and negative caseApproved terminologySpecialist approvedCritical fieldsWrong-value testPermitted actionsAllowed and refused testEscalation statesEach trigger reaches itOwnershipOwner accepted rowsLEFT OUT FOR NOWNew applicationsEligibility decisionsFees and exemptionsAppealsLost documentsLarge imported modelsBacklog, with the reasonNo test, or no owner: the element is not in the release
Scope comes from one journey's decisions, and readiness comes from tests. What is left out goes on a backlog with the reason. CloudNala analysis; illustrative journey.

Every element earns a test

An untested ontology is a confident description of a service that may not exist. Write the tests as you write the model, in five kinds.

  • Relationship tests. Given a service case, the system finds the right application and appointment. Given an appointment for a different case, it does not link them.
  • Transition tests. An application in "awaiting documents" can move to "in review" when the document is received. It cannot move from "closed" back to "in review" without an owner's action.
  • Permission tests. The agent may propose a new appointment slot. It may not change an application status. Each refusal records its reason.
  • Mapping fixtures. Real-looking statements, in each language in scope, with the entities they should map to. "My application is still pending" maps to an existing application. "I need to apply" maps to a new application. The full service map in Part 1 shows where that leads, but this first version does not model it, so it must route to a person. Fixtures are approved by a language specialist, because they test meaning rather than words, as Part 2 explained.
  • Boundary tests. Statements the first version cannot represent: a question about a lost document (which follows its own path, as Part 3 shows), an appeal, a fee. Each must reach the "cannot represent" escalation state rather than the nearest matching entity.

If the ontology is held in RDF, constraint languages such as the W3C's SHACL (Recommendation of 20 July 2017, accessed 24 November 2026) can run many structural tests automatically. A first version does not need RDF. A small table of entities, states, transitions and permissions, with tests in the team's normal test framework, is easier to review and just as testable. When you need a knowledge graph sets out the signals that justify moving up from there.

The tests are also the evaluation suite for the agent. Entity extraction accuracy and relationship accuracy should be measured separately, because an agent can find the right application and still attach it to the wrong appointment. The mapping fixtures are how you do that: run the agent against them and count which entities and relationships it got right, per language. Build the evaluation system before the agent covers the wider design.

What to leave out

The harder skill is deciding what not to model yet. Use three questions for each candidate element.

  1. Does a decision in the first journey depend on it? If not, it waits.
  2. Can we name an owner who will confirm it? If not, it is not ready, however useful it looks.
  3. Can we write a test that would fail if it were wrong? If not, it is a description, not a rule.

An element that fails any of the three goes on a backlog with the reason. That backlog is useful: it shows the next journey's likely scope, and it records the questions the first version deliberately did not answer.

Leave out general-purpose upper ontologies and imported models with hundreds of classes. They are hard to test against one journey, and their terms rarely match how officials and applicants talk. Reuse a small, well-known vocabulary where one fits and someone on the team understands it.

When to grow it

Grow the ontology when a new journey is approved, not when someone thinks of a new entity. Each new journey goes through the same steps: list its decisions, add only the elements they need, write the tests, name the owners, and release it as a new version under the change process in Part 9. The existing tests must still pass. If a new journey forces a change to an existing definition, that is a breaking change with its own review, not a quiet edit.

This is the same pattern as Build the smallest valuable workflow: prove one bounded path end to end, then extend it with evidence.

What this means for NalaTolika

NalaTolika is a CloudNala concept and reference architecture for governed language interpretation. It has no customers, deployments, pilots, data or results. Its ontology starter map lists about fifteen entities, from applicant and service case to consent record and escalation. A first version would not use all of them. It would take the subset that one illustrative journey needs, add the states and permissions for that journey, and ship with mapping fixtures in each language the route has been released for.

How CloudNala can help

CloudNala scopes first-version ontologies to one service journey. We list the journey's decisions with your officials and service owners, cut the model to the entities those decisions need, write the five kinds of test alongside it, name an owner per element, and keep a backlog of what was left out and why.

Next in the series: Ontologies need version control. Previous: Part 7, The ontology must include humans. All parts are on the series page.

Sources and limits: this article is CloudNala analysis. The journey, entity count and statuses are illustrative and do not describe any real service. The SHACL description comes from the W3C Recommendation of 20 July 2017, accessed on 24 November 2026. The five-to-fifteen entity range is a CloudNala planning guide, not a standard. NalaTolika is a concept with no deployments.


Work with CloudNala

CloudNala helps organisations move from technology ambition to practical execution across cloud, AI, data, platform engineering and digital services.

Whether you are exploring AI, modernising your cloud environment, building a public-sector digital service, or turning an idea into a working MVP, we can help you shape the roadmap and deliver the next step.

Book an Ontology and Agent Governance Assessment or write to us at consult@cloudnala.co.za

Found this useful?

Share