# The Ontology Between SQL and LLMs: Palantir Foundry at SQLDay Lite 2026

Grzegorz Brodny and Remigiusz Tunowski at SQLDay Lite 2026 in Gdańsk: how the Palantir Foundry Ontology connects SQL data to LLMs, with two live demos.

What should sit between the tables we already have and the language models we are being asked to connect to them? Many data teams are asking that right now, and one of the Polish-language sessions at SQLDay Lite 2026, organized by Data Community Poland at Gdańsk University of Technology on 24-25 September 2026, offered a concrete answer.

The session, *"Ontologia Palantir Foundry jako brakujące ogniwo między SQL a LLM"* ("The Palantir Foundry Ontology as the Missing Link Between SQL and LLMs"), was presented in Polish by Grzegorz Brodny, Cloud Senior Data Engineer at Future Processing and leader of the Tricity branch of Data Community, and Remigiusz Tunowski, Business Intelligence Consultant at Future Processing. Their talk shows what an ontology does, demonstrates it live twice, and then weighs when it is worth the effort.

## From answering questions to acting on data

Early in the deck, a screenshot sits under a short headline (translated from Polish): "This is not a dashboard." The screen shows a table of patients with a risk band, a risk prediction, a review status and a referral status, plus two buttons: Acknowledge Review and Refer for Follow-up. The caption explains the point: it is an operational application on data, with no custom backend, no custom API and no frontend to maintain.

That framing runs through the whole session. The slide that summarizes the ontology's benefits puts it this way (translated): "The warehouse answers questions. The Ontology also lets you act, and remembers that action." For readers who mostly live in SQL and BI tools, this is the key shift: the ontology is meant for teams whose users make decisions inside the tool, not just read reports.

## Where the Ontology lives in Palantir's platform

Before going deeper, the speakers place the topic on a map of Palantir's products: Gotham, Foundry, AIP and Apollo. Foundry is the end-to-end data platform where the Ontology lives, and AIP is the AI layer above it. The session focuses on the Ontology and steps into AIP Logic from AIP.

The architecture slide then stacks the layers from the bottom up:

- **Sources**: Data Connection, Virtual Tables and Streams.
- **Data**: Datasets, Pipeline Builder and Code Repositories for Spark and SQL transformations, and Lineage and Data Health for provenance and quality.
- **Ontology**: objects, links, actions and functions, modeled in Ontology Manager, indexed in Object Storage V2 and governed per object.
- **Applications and AI**: Workshop, Contour and Quiver, AIP Logic, and the OSDK and APIs.

Two details matter for anyone used to warehouses: objects are indexed in their own storage rather than queried on the fly, and writes from applications go through Actions, so the source system stays untouched.

## What an ontology is made of

The speakers describe the ontology as a "digital twin" of business objects and their logic, modeled much like an ERD diagram and open for the business to complete. Technically it is object-centric rather than relational: each object type is backed by one or more datasets and keeps an indexed copy of the data in a format similar to Delta Lake.

An example object type, Order, shows all four building blocks in one place:

- **Properties**, each with a type and a business description, such as net value "excluding VAT" or the delivery date "promised to the customer".
- **Link types**, such as Order to Customer (many-to-one) and Order to Order line (one-to-many).
- **Actions**, the only way to write: approve the order, change the delivery date, cancel.
- **Functions**, logic attached to the object, such as margin() and isDelayed().

The line under that example explains why the descriptions matter so much (translated): every element has a description in business language, and the same description is read by the analyst in the catalog and by the model in the prompt.

## Links instead of JOINs

One of the clearest slides puts a warehouse query next to its ontology equivalent. On the warehouse side, using the healthcare example from the first demo:

```
SELECT p.*, pr.risk_band, mr.test_auc
FROM patient p
JOIN prediction pr ON pr.patient_uid = p.patient_uid
JOIN model_run mr ON mr.model_run_id = pr.model_run_id
```

```
SELECT p.*, pr.risk_band, mr.test_auc
FROM patient p
JOIN prediction pr ON pr.patient_uid = p.patient_uid
JOIN model_run mr ON mr.model_run_id = pr.model_run_id
```

```
SELECT p.*, pr.risk_band, mr.test_auc
FROM patient p
JOIN prediction pr ON pr.patient_uid = p.patient_uid
JOIN model_run mr ON mr.model_run_id = pr.model_run_id
```

The relationship is rebuilt in every query, and only the person writing it knows the schema. On the ontology side, a patient has predictions (a one-to-many link) and each prediction is scored by a model run (many-to-one). The links are bidirectional and navigated with operations such as searchAround() and pivotTo(). The relationship is defined once, in the ontology, and is the same for the dashboard, the application and the language model. After that, nobody writes the JOIN again: not the analyst, not the app, not the model. The slide promises the same chain of objects clicked through live in the first demo.

## How the ontology feeds an LLM

The second half of the session turns to language models. A comparison slide sets classic RAG against the ontology used as a tool. Classic RAG retrieves document chunks by vector similarity, and if anything needs to be written, the model has to produce SQL itself. With the ontology, the model works with typed objects and selected links, receives their descriptions as metadata in the prompt, and writes only through Actions, which act as a contract. The speakers sum up the difference as "what is similar to the question" versus "what is true and what you are allowed to do with it". They are clear that the two are not competitors: the ontology adds the structure and write rights that classic RAG does not have.

Four benefits follow: grounding on structured data means fewer hallucinations, business context travels into the prompt with the data, writes go through validated and audited Actions rather than model-written SQL, and permissions filter the context so the model never sees what the user may not. A screenshot of native tool calling shows what this looks like in practice: the prompt lists each queryable table with its description, then each table's columns with data type and description.

## AIP Logic: typed in, typed out

AIP Logic is where these ideas become a working function. Inputs are typed parameters (an object, an object set, a string, a struct), so the function is a contract rather than a loose prompt. Inside, a Use LLM block combines a prompt, tools and an output definition, with conditions, loops and variables around it. The tools are Query objects (reading objects and selected links), Apply actions (the only way to write), Call function (TypeScript or Python) and Calculator for deterministic arithmetic. The output is either a typed value or a set of ontology edits. A debugger shows the chain of thought and every tool call, AIP Evals turns test cases into metrics, and the result can be published as an Action, in Workshop, in Automate or through the OSDK.

The slides walk through an example on a housing dataset. The function starts from a house, searches around to its neighborhood, filters neighboring houses by criteria such as zipcode and living area, and passes them to the LLM. The output is a struct with named fields, including an explanation, a score, the list of compared houses, a classification and the house name. In the debugger run shown, a four-bedroom house comes back classified as "UNDERPRICED" with a score of 8.2. Structured output like this, the speakers note, is one of the ways to limit hallucinations.

## Is it worth it? A balanced checklist

The final part asks the question directly, and answers it with care. The speakers list what to weigh before adopting an ontology:

- It prefers 3NF, an enterprise data warehouse or a snowflake model rather than a star schema, and is designed for rare updates, long-lived data and unique, deduplicated rows.
- It takes extra effort to define column descriptions, links and permissions, and gives governance in return.
- It adds a layer over the analytical engine and works best on aggregated, smaller volumes.
- It is an enterprise-class solution with an enterprise-class price, and a significant commitment to one vendor.

They also place Foundry in a wider market, with a comparison slide covering Microsoft Fabric's Digital Twin Builder, Databricks Genie Ontology and the SAP HANA Cloud Knowledge Graph Engine. On that slide, Foundry is where the ontology is the central, mandatory operational layer with write-back through actions.

The "when to use it" slide makes the decision practical. Adopt it if the business should make decisions in the tool rather than in Excel, if data comes from many systems and nobody knows the one definition, if audit and traceability are a requirement rather than a wish, and if an LLM needs to reach company data with permissions. Leave it if you need reports and dashboards, if you have one source and a stable model, if you have large volumes and frequent row updates, or if the LLM work is an experiment with a limited budget.

## Practical takeaways

- Write descriptions for every property and relationship in business language. The same text serves analysts in the catalog and models in the prompt.
- Define relationships once, in the model, so that apps, dashboards and LLMs all navigate the same links.
- Route every write, human or model, through a validated, permissioned and audited contract instead of free-form SQL.
- Give LLM functions typed inputs and structured outputs, and test them with evals built from inputs and expected outputs.
- To try it, the speakers point to Palantir's free developer tier and to public Kaggle datasets for the two domains shown in the slides.

## Trusted definitions need trusted data

The session makes a strong case for one shared definition of every business object, read by people, applications and models alike. That is exactly why the data underneath deserves attention. When the same object feeds a Workshop app, an analytics view and an AIP Logic function, a missing load, a column that suddenly fills with nulls or a drifting distribution in the source datasets reaches all of them at once, including the LLM that answers with the same confidence either way. Fittingly, the architecture slide places Lineage and Data Health in the data layer right beneath the Ontology.

A semantic layer works best on data that is checked before it is indexed: volumes, freshness, value distributions and agreed business rules. That is what [data quality management](/blog/data-quality-management) is about, and what digna focuses on, so that the definitions in an ontology describe data a team can rely on.

## Thank you

Many thanks to Grzegorz Brodny and Remigiusz Tunowski for a session that pairs two live demos with a clear-eyed view of when an ontology fits. Thanks as well to Data Community Poland and Gdańsk University of Technology for hosting [SQLDay Lite](https://sqlday.pl/lite). The slides are available in the [SQLDay Lite 2026 repository](https://github.com/SQLDay/SQLDay-Lite-2026/tree/main/Ontologia%20Palantir%20Foundry%20-%20Grzegorz%20Brodny%2C%20Remigiusz%20Tunowski), and the [Palantir developer page](https://www.palantir.com/developers/) is the starting point the speakers recommend for trying it yourself. Their closing line is worth keeping (translated): the ontology is the link above SQL and below the LLM, "but only when someone actually acts on the data, rather than just looking at it."

## Frequently asked questions

### What is the Palantir Foundry Ontology?

The Palantir Foundry Ontology is an object-centric layer that models business objects as a digital twin, built from properties, links, actions and functions. Each object type is backed by one or more datasets and indexed in Object Storage V2, so applications and LLMs work with typed objects rather than raw tables.

### How does an ontology replace JOINs in SQL queries?

Relationships are defined once as bidirectional links, for example a patient has predictions and each prediction is scored by a model run. Operations such as searchAround() and pivotTo() navigate those links, so the analyst, the application and the language model all follow the same path instead of rebuilding JOINs in every query.

### How is an ontology different from classic RAG for LLMs?

Classic RAG retrieves document chunks by vector similarity, while an ontology gives the model typed objects, selected links and their business descriptions in the prompt, with writes only through Actions. The speakers summed it up as “what is similar to the question” versus “what is true and what you are allowed to do with it”.

### What does AIP Logic do in Palantir Foundry?

AIP Logic turns LLM calls into functions with typed inputs and structured outputs. A Use LLM block combines a prompt, tools and an output definition. In the housing example shown at SQLDay Lite 2026, the function compared neighboring houses and classified a four-bedroom house as UNDERPRICED with a score of 8.2.

### When is it worth adopting a Palantir Foundry Ontology?

It pays off when the business should decide in the tool rather than in Excel, data comes from many systems, audit and traceability are a requirement, and an LLM needs permissioned access to company data. For plain reports, one stable source or frequent row updates on large volumes, a lighter approach fits better.
