Ontologies
Generate an ontology with AI
The ontology generator gives you a running start on a new ontology. You choose the context an AI agent should learn from and tell it what you want. The agent drafts classes, relationships, and attributes in the background, and you tick the parts to keep. Nothing is saved until you accept.
In the app: Data Context › Ontologies › Add Ontology › Generate with an agent
Before you start¶
- You need write access to the organization.
- Generation uses your organization’s AI allowance. A large run can use a lot of it. See AI token allowance and usage.
- Sources must exist before you can pick them: a database connection, process documents, a glossary, or an enabled standard.
Open the generator¶
Start the Add Ontology wizard, enter a name, choose Generate with an agent, set the Base IRI, and click Open generator. See Create or import an ontology.
The page is headed Generate with an agent. The New ontology identity panel at the top holds the Name and Base IRI (both required), Namespace, and Description you entered in the wizard. You can change them here.
Choose the sources¶
Each source is a panel with a switch. Turn on the ones you want and pick what’s in them. You can combine several.
| Source | What you pick |
|---|---|
Kenseme schema |
One of your schemas, then its tables and views, or Include all tables and views. Include stored procedures & functions adds those too. |
Fabric Lakehouse |
A lakehouse (Select lakehouse), then its tables, or Include all tables. |
Database |
A Connection from your organization’s database connections, then its tables, or Include all tables. Refresh re-reads the connection’s tables. |
Process documents |
Documents the agent should read. For each, choose Access: Full text (the agent reads the whole document) or Vector search (the agent searches it for relevant passages). Small documents default to Full text. |
Glossary terms |
Glossaries whose terms should shape the model, or Include all glossaries. Glossary terms are treated as the preferred names. |
Industry standards |
Your organization’s enabled standards. This panel appears only when the Industry Standards feature is on. |
Note:
Fabric LakehouseandDatabasecan’t be used together. An ontology is bound to a lakehouse or to a database, not both, so turning on the lakehouse source blocks the database panel.
Sources are optional. A run needs at least one source or some instructions.
Write the instructions¶
Use Instructions to tell the agent what to build: which part of the domain to cover, naming preferences, what to leave out.
- As you pick sources, the generator writes a starter instruction for you. Once you type your own text, it stops changing it.
Draft with AIwrites a fuller instruction from the sources you selected. Edit it to taste.
If the run can’t start yet, a Still needed: line lists what’s missing.
Start the run¶
Click Start generation. The page switches to a live view: Generating {name}…, a progress bar, the elapsed time, and a feed of what the agent is doing step by step.
You can leave the page. Generation continues in the background, and you can follow the job on the background jobs page. The generator page’s address identifies the run; keep it (or your browser history) to come back to the live view or the review.
If the run fails, the view says Generation failed with the reason and two options: Edit configuration returns to the form with your choices restored, and Re-run starts again with the same configuration.
Review the proposal¶
When the agent finishes, the page shows Review proposed changes with the reminder Nothing has been applied yet.
Agent reportexpands to the agent’s own summary of what it did.- Summary cards, one per kind (classes, relationships, attributes, and so on), count what was added (
+), changed (~), and removed (−). - Filter buttons
All,Added,Changed, andRemoved, and a tab for each kind listing the individual changes. Expand a row to see its details.
Every proposed addition and removal has a checkbox. The checkbox in a tab’s header selects or clears everything in that tab, across all pages of the list.
Selections keep the ontology consistent:
- Clearing an item also clears the items that depend on it. Clear a class and its attributes and relationships are cleared too; a message tells you how many.
- Ticking an item also keeps the items it needs, such as the class an attribute belongs to.
Some rows can’t be cleared:
- Rows marked
always appliedare changes to things that already exist. They come along when you accept. - Only the first 500 changes of each kind are listed. Any beyond that are always applied, and the page says so.
Accept, discard, or re-run¶
Accept N of M changesapplies exactly what you ticked and opens the new ontology. If the agent proposed nothing, the button readsAccept and close.Discard changesthrows the proposal away. Your source choices and instructions are kept.Re-run generatordiscards the proposal and starts a new run with the same configuration.
If the ontology was changed by someone else after the run started, Kenseme warns you (Target changed since run started) before overwriting those changes. Choose Apply anyway or Cancel.
Automatic bindings¶
When the run used a Fabric Lakehouse or Database source, accepting also binds the new ontology to that data where the names match. Classes are bound to tables and attributes to columns, in a binding environment named Default. On the lakehouse path, relationships backed by a real foreign key between two bound tables are bound too; on the database path, relationships are left for you to bind. Review and complete the bindings in the binding workspace:
If auto-binding hits a problem, the ontology is still created and a message tells you what was skipped.
Agent sources for an existing ontology¶
For an ontology that already exists, More › Agent Sources opens the same page headed Agent Sources. Here you choose the sources and instructions that the assistant’s Tool Assisted mode draws on. Nothing is generated.
- Turn on and fill in the sources you want.
- Edit the instructions.
- Click
Save configuration.
An ontology that came from the generator starts with the sources and instructions of the run you accepted. Saving a configuration on any other ontology turns on Tool Assisted mode for it. See Chat with the ontology assistant.
Note: The generator doesn’t start a new run against an existing ontology. To add to one with AI, use the assistant in Tool Assisted mode.