Without an ontology, agents read the right table and miscount
Objects, links and actions turn an undocumented data warehouse into something an agent can query, change and be stopped from changing at the right moment.
In brief
- Objects and links tell the agent what each number belongs to, which reduces the risk of double counting and confused concepts.
- Actions should follow the business operation, run in one transaction and check their own conditions before writing.
- Model the domain first, connect the data second, then test with the people who do the work, using new questions.
Sylvan once advertised for a Founding Forward Deployed Engineer to work with an undocumented data warehouse and a chaotic schema, and to find the business concept behind each table. The same posting asked the hire to define the scope of data access.
Put the raw schema straight into a prompt and you may get an agent whose SQL runs without error and returns the wrong number. A schema tells the agent which column lives where. How an order relates to a shipment is usually something only people inside the company know.
An ontology is where that understanding is written down. Build one and you have a map for the agent to consult, and a fence that keeps it from making careless changes to the client’s data.
The client’s nouns, relationships and verbs
In a 1993 paper, Tom Gruber called an ontology a specification of the terms used to describe a domain of shared interest. The word that matters to an FDE is “shared”: the engineer, the warehouse staff and the agent must all understand “late” the same way.
Palantir’s documentation puts the idea into operation. It divides its Ontology into two groups: semantic elements, comprising objects, properties and links; and kinetic elements, comprising actions, functions and dynamic security. Grammar makes it easy to remember: objects are nouns, links are the relationships between them, and actions are verbs.
Engineers used to SQL will find links familiar. Palantir compares them to a join: two objects are connected by the values of their properties. The useful difference is that the relationship is named and defined once, so the agent does not have to guess it again in every query.
One order, two shipments and a wrong number
Take a hypothetical cold-chain distributor that wants an agent to answer questions about late orders and help reschedule them. Its warehouse has three tables, crm_acct, ord_hdr and shp_hdr. Order O-17 is for 40 crates, split into shipment S-1 with 25 crates, already delivered, and S-2 with 15 crates, running late.
If today is March 10, the data for O-17 looks like this:
ord_hdr
ord_no cust_ref ord_qty
O-17 C-5 40
shp_hdr
shp_no ord_ref shp_qty prm_dt pln_dt dlv_ts
S-1 O-17 25 03-08 03-08 03-08 09:40
S-2 O-17 15 03-09 03-09 null
The agent joins orders to shipments, sums ord_qty and gets 80 crates ordered, because the 40 repeats on both rows. If it filters for late shipments only, it reports 40 crates late. The correct answers are 40 and 15 respectively.
The error arises because crates ordered belong to the order, while crates late belong to the shipment. So start with a question for the warehouse manager: “When you say an order is late, what is late: the whole order, or each shipment?”
Then go back to the data and check the answer. O-17 has one row in ord_hdr but two in shp_hdr, so the link is one-to-many. The two shipments add up to 25 + 15 = 40, matching the quantity ordered, which gives grounds to believe that shp_qty and ord_qty both count crates. Try the same sum on many orders before asking the client to confirm.
objects:
Customer:
key: customer_id
source: crm_acct
properties:
customer_id: acct_no
Order:
key: order_id
source: ord_hdr
properties:
order_id: ord_no
customer_id: cust_ref
ordered_crates: ord_qty
needs_callback: app_owned
Shipment:
key: shipment_id
source: shp_hdr
properties:
shipment_id: shp_no
order_id: ord_ref
crates: shp_qty
promised_date: prm_dt
planned_date: pln_dt
delivered_at: dlv_ts
derived:
is_late: delivered_at is null and promised_date < today
links:
customer_places_order:
join: Customer.customer_id = Order.customer_id
cardinality: one_to_many
order_ships_as:
join: Order.order_id = Shipment.order_id
cardinality: one_to_many
The file uses illustrative notation and is not tied to any product. One rule goes with it: sum a property at the object that owns it. Applied to O-17, the two questions become two different queries, replacing a single shared join:
-- Ordered crates: Order owns ordered_crates, so no join
SELECT SUM(ord_qty)
FROM ord_hdr
WHERE ord_no = 'O-17'; -- 40
-- Late crates: follow order_ships_as, keep is_late,
-- then sum Shipment.crates
SELECT SUM(s.shp_qty)
FROM ord_hdr o
JOIN shp_hdr s ON s.ord_ref = o.ord_no
WHERE o.ord_no = 'O-17'
AND s.dlv_ts IS NULL
AND s.prm_dt < :today; -- 15
The second query still joins, but it sums shp_qty, a column that appears once per shipment. Row S-1 drops out because it has a dlv_ts, leaving the 15 from S-2. The model lowers the risk of wrongly summing ordered_crates at shipment level but cannot rule it out, so you still need the test questions described below.
A platform can keep the model separate from where queries run. The ontology in Microsoft Fabric IQ, currently in preview, stores and serves definitions and their data bindings to sources; when an agent works, the queries run on those sources themselves.
Before a demo, therefore, check both the model file and when the source data was last refreshed.
What may the agent change, and who allows it?
Reading correctly is half the job. In Foundry, an action is a single transaction that changes the properties of one or more objects according to user-defined logic. It comes with submission criteria, the conditions that decide whether the action can be submitted.
In the cold-chain example, the verb needed is “reschedule delivery.” The Python below is a skeleton in which to substitute your own database and permission system. The variable user stands for the person the agent is acting for, and log writes through a separate connection.
class Rejected(Exception):
pass
def propose_reschedule(log, user, shipment_id, new_date, reason):
# Called before the user sees anything; returns a proposal id
return log.write("proposed", user.id,
shipment_id, new_date, reason)
def reschedule_delivery(db, log, user, proposal_id, confirmation,
shipment_id, new_date, reason, today):
try:
with db.transaction():
shipment = db.lock("Shipment", shipment_id)
if shipment is None or not user.can("reschedule", shipment):
raise Rejected("Shipment not available to this user")
if shipment.delivered_at is not None:
raise Rejected("Shipment already delivered")
if new_date <= today:
raise Rejected("New date must be in the future")
if not reason.strip():
raise Rejected("Reason is required")
if not confirmation.matches(proposal_id, shipment_id,
new_date, reason):
raise Rejected("User has not confirmed these values")
db.update("Shipment", shipment_id, planned_date=new_date)
db.update("Order", shipment.order_id, needs_callback=True)
db.audit(user.id, "reschedule_delivery", proposal_id,
shipment_id, new_date, reason)
except Exception as err:
# The transaction has rolled back; this log entry survives
log.write("not_applied", user.id, proposal_id, repr(err))
raise
Note which column changes: planned_date, while promised_date stays as it was. If the agent could overwrite the promised date, S-2 would stop being late in the report even though its 15 crates had yet to arrive. Both objects change in one transaction, so a new schedule cannot be saved without the flag to call the customer.
Permissions must follow the person too. Palantir’s architecture documentation requires agents to have a security scope inherited from a user or from a project-based permission structure. In the code above, if an employee may not reschedule a given shipment, an agent acting for that employee cannot either.
The confirmation step is a design choice. The Action tool in AIP Chatbot Studio can run automatically or wait for the user to agree. In the first week with a client, start with confirmation for every write.
Loosening that later takes evidence, which is the job of the two places the code records events. db.audit sits inside the transaction and keeps only successful writes; log sits outside, so proposals and rejections are not lost in a rollback.
Compare the two by proposal_id and you can see which proposals were approved unchanged, edited and then approved, blocked, or abandoned.
Loosen an action only when nearly all its proposals fall into the first group. Judged by successful writes alone, every action looks safe.
To let an agent call all this, you can use MCP. Palantir’s Ontology MCP exposes object types, action types and query functions as tools for agents. If you build your own, open a few narrow tools such as find_late_shipments and propose_reschedule in place of one that runs arbitrary SQL; the write runs only after the user confirms.
Start again from a sheet of paper
Begin with a decision the client must make every day, such as which shipments to reschedule. Write down the nouns and verbs people use when they describe it, then settle the definitions with the person who does that work. On paper, draw three objects, connect them and mark each link one-to-many or many-to-many.
Only then open the warehouse. For each property, find the source column, check for duplicate keys and count the records that fail to join. Leave any column you do not yet understand out of the model and add it to your list of questions for the client.
Finally, add one action and write the test questions before letting the agent run. To exercise the path across both links, give the customer behind O-17 another order, O-18, for 30 crates, shipped as a single shipment S-3 with all 30 crates, also late. The six prompts below expose both counting errors and permission errors.
| Question or request | What it tests | Required result |
|---|---|---|
| How many crates did O-17 order? | Order property | 40 |
| How many O-17 crates are still late? | Link to Shipment | 15 |
| What percentage of the crates ordered by O-17’s customer are late? | Held-out question: two links, two levels of summing | 45/70, about 64.3% |
| Move S-1 to next week | Blocking condition | Rejected because already delivered |
| A user without permission asks to reschedule S-2 | Permissions | Rejected |
| Reschedule S-2 before the user has confirmed | Confirmation step | Nothing written to the order or shipment; the log shows the rejection |
The first two questions were used during design, so they show only whether the model still works. The percentage question must stay hidden until the test, because it forces the agent to sum crates ordered at Order and crates late at Shipment before dividing.
An agent that joins all three tables first will get a denominator of 110, with O-17’s 40 crates counted twice, and report about 40.9%.
Palantir’s validation guidance also uses unseen business questions, and notes that AI-only runs do not replace testing with people.
Sit beside a dispatcher and ask what they would do with the answer.
Where it tends to break
An easy mistake is to turn every table into an object. Palantir advises modeling the domain before connecting data, and warns against copying the shape of the source. One warning sign: if the warehouse manager does not understand your object names, you are probably redrawing the database.
The next mistake concerns the verbs. Palantir uses “Action Sprawl” for the creation of many narrow actions that each change one property, and recommends designing around business operations such as approving a purchase order. Split “change the date” from “set the call-customer flag” and the agent may do one and forget the other.
Nor should you rely on the prompt to keep discipline. “Do not reschedule delivered shipments” in a prompt is a reminder; a condition in the action is what stops the write. Put the rule where every call path must pass through it.
Show employers the skill
When reading job postings, look for phrases about connecting schemas to business concepts, even where the word ontology does not appear. In interviews, ask who on the client side decides definitions, and which systems the agent may write to. The answers tell you how deep the work goes.
On a CV, a line that carries weight should state the scope and how it was verified: the number of objects, the write actions allowed, the test questions used and the errors blocked. Include only numbers you measured. Add a repo with the model file, the action code and the table of test questions, and an interviewer has something concrete to ask about.
This week’s exercise: take three tables with one-to-many relationships, deliberately create a double count like O-17’s, then fix the model before you fix the SQL. If someone who does not know SQL can read your file and point out a wrong definition, the ontology has begun to do its job.
Was this article useful?
Thanks for the feedback!
13 sources
- A Translation Approach to Portable Ontology Specifications · 1993
- Ontology building: Overview (Palantir docs)
- Core concepts (Palantir docs)
- Action types: Overview (Palantir docs)
- Submission criteria (Palantir docs)
- AIP Chatbot Studio: Tools (Palantir docs)
- Ontology MCP (OMCP): Overview (Palantir docs)
- The Ontology system (Palantir docs)
- Ontology design: Best practices (Palantir docs)
- Ontology design: Anti-patterns (Palantir docs)
- Ontology design: Validation (Palantir docs)
- What Is Ontology (Preview)? - Microsoft Fabric | Microsoft Learn · 2026-10-16
- Founding Forward Deployed Engineer (Sylvan Labs, Built In London)