Skip to main content

Advent of Data Products24 ideas for better data products  

One Ontology for Data and APIs

How can an AI agent navigate the data and the API world?

By Dr. Simon Harrer · · 2:48 video · 9 slides

In short

Data contracts describe data, and OpenAPI specifications describe services. An AI agent must know that a column and an API field mean the same thing. One ontology defines each business concept once. Data contracts and API contracts link to it, and the agent follows the links.

Watch on YouTube
Slide 1 of Entropy Explains episode 20, A voucher for every late shipment: A storm delayed many shipments last week.

A voucher for every late shipment

A storm delayed many shipments last week. Customer service wants to give a voucher to each affected customer. Today, a developer writes a script that reads the late shipments and calls the voucher service. An AI agent can do this task from one sentence, if it understands the two sides.

Slide 2 of Entropy Explains episode 20, Two worlds: The late shipments are in the data world: tables that data contracts describe.

Two worlds

The late shipments are in the data world: tables that data contracts describe. The vouchers are in the API world: services that OpenAPI describes. The table calls the customer customer_id. The API calls it customerNumber. Without more information, the agent must guess that the two names mean the same customer.

Slide 3 of Entropy Explains episode 20, One ontology: The answer is one ontology for the two worlds, written in Apache Ossie.

One ontology

The answer is one ontology for the two worlds, written in Apache Ossie. It defines each business concept one time: Customer and its Customer ID, Shipment, and Voucher. Data contracts and API contracts link to these concepts. Thus the meaning is in one place, not in each contract.

Slide 4 of Entropy Explains episode 20, The data contract links to the concept: In the data contract, the column customer_id has an authoritative definition of the type semantics.

In the data contract, the column customer_id has an authoritative definition of the type semantics. Its URL points to the concept Customer ID in the ontology. Thus a person or an agent that reads the data contract knows what the column means.

Slide 5 of Entropy Explains episode 20, The OpenAPI field links to the same concept: An OpenAPI specification says that customerNumber is a required string.

An OpenAPI specification says that customerNumber is a required string. It does not say what the field means. OpenAPI has no standard field for the meaning. Thus the field uses an extension, x-authoritativeDefinitions, that points to the same concept Customer ID.

Slide 6 of Entropy Explains episode 20, The agent navigates: The agent starts with the concepts in its task: Customer, Shipment, and Voucher.

The agent navigates

The agent starts with the concepts in its task: Customer, Shipment, and Voucher. The ontology leads it to the shipments, and it queries the late shipments. Then the ontology leads it to the voucher API. The two fields link to Customer ID, so the agent passes each customer_id as customerNumber.

Slide 7 of Entropy Explains episode 20, The same pattern, other tasks: The same pattern works for other tasks.

The same pattern, other tasks

The same pattern works for other tasks. The agent reads a data product, joins on a concept, and acts through an API. Examples are to pause the newsletter for customers with an open complaint, or to order products again when the stock is low. Nobody writes glue code by hand.

Slide 8 of Entropy Explains episode 20, Actions in the ontology: Today, the ontology has the nouns: the concepts.

Actions in the ontology

Today, the ontology has the nouns: the concepts. The Apache Ossie community discusses the verbs: actions. An action names a business operation, the concept that it acts on, and how to call it, for example through an API. It is a proposal. It only describes the operation. It does not run or authorize it.

Slide 9 of Entropy Explains episode 20, One ontology for data and APIs: The data world has data contracts.

One ontology for data and APIs

The data world has data contracts. You read data there. The API world has OpenAPI specifications. You do actions there. One ontology links the two worlds. Define each concept one time, and link each contract to it. Then an agent can read data and act through APIs.