Skip to the page
Tecyfy

Semantic layer or business ontology: what AI agents need from your data

A semantic layer tells an AI agent how to compute a metric; a business ontology tells it what the words in a question mean, who owns them and which rules apply. What each one holds on dbt, Snowflake, Databricks and Microsoft Fabric, and which to build first.

Tecyfy · Published · 8 min read

Linocut of an open dictionary marked Meaning resting on top of a stack of red and white database cylinders

A semantic layer tells an AI agent how to compute a number; a business ontology tells it what the words in the question mean. Ask an agent "What was net revenue in EMEA last quarter?" and it needs both: the formula for net revenue and the joins to region (the semantic layer), and which definition of net revenue the business approved, which accounts count and what EMEA covers (the ontology).

Most data teams already have the first in some form, and the 3 big platforms now offer the second in preview: Snowflake Business Ontology, Microsoft Fabric IQ's ontology and Databricks Genie Ontology. This guide says what each layer holds, where it lives on each platform, and which one to build first.

The 2 layers side by side

Semantic layerBusiness ontology
AnswersHow is this metric calculated?What does this term mean, and who says so?
HoldsMetrics, dimensions, facts, joins between entitiesDefinitions, owners, synonyms, relationships between concepts, policies and rules
Runs queriesYes: it generates or is the SQLNo: it points to the objects that compute
Examplesdbt Semantic Layer, Snowflake semantic views, Databricks metric views, Power BI semantic modelsSnowflake Business Ontology, Fabric IQ ontology, Databricks Genie Ontology

Snowflake's own description draws the line most clearly: the ontology defines what a term means, who owns it and how it relates to other terms, while semantic views define how each metric is calculated, and the ontology does not change the calculation. Microsoft says the same of Fabric: the ontology is "a business context layer, not a general-purpose query engine", and the semantic model keeps the DAX behind each metric.

Press through the 3 settings below to see which mistakes each layer removes.

Try itWhat an agent needs to answer one question
The agent reads
  • Which column is revenueWrongGuesses between amt_ttl_pre_dsc and net_amt
  • How to add it upWrongSUM(amt_ttl_pre_dsc), before discounts
  • How orders join to regionsWrongJoins on a name column, drops 3% of rows
  • What “net revenue” means hereWrongUnknown
  • Which accounts countWrongAll of them, test accounts included
  • What “EMEA” coversWrongFilters region = 'EMEA', a value that doesn't exist

With only table and column names, every step is a guess. The SQL runs and returns a number, which is the danger: nothing says it is wrong.

A made-up schema and question. Which layer holds what follows Snowflake's and Microsoft's descriptions: semantic views and semantic models compute metrics, the ontology holds meaning, owners, relationships and rules.

Why agents need more than table names

An agent writing Text-to-SQLText-to-SQLA model turning a question in plain words into a database query, so people can ask the data directly. It is only as right as its knowledge of the tables and their meaning. against raw tables reads column names and guesses. Snowflake's example is a revenue figure stored in a column called amt_ttl_pre_dsc: nothing in that name says it is gross revenue before discounts. Without a shared definition, it notes, a company can end up with dozens of inconsistent calculations of net revenue in different reports, many with the wrong aggregation. An agent adds one more on every question it answers.

The worst part is that a wrong query still returns a number. A missed discount or a bad join gives a plausible figure, not an error. Snowflake and dbt both pitch their semantic layers at this problem: Snowflake says semantic views improve accuracy by combining the model's reasoning with rule-based definitions, and dbt connects Claude, ChatGPT and other AI tools to its Semantic Layer through the dbt MCP server so their answers use governed metrics "instead of guessing at raw tables".

The semantic layer: one formula for each metric

A Semantic LayerSemantic LayerOne shared definition of business terms and metrics, such as revenue or active customer, that reports, dashboards and AI assistants all read instead of writing their own. declares the business entities, how they join, and each metric's formula and aggregation, once. Every tool that queries through it gets the same SQL.

dbt Semantic Layer. Metrics are defined in the dbt project with MetricFlow, on top of the models you already have, and dbt works out the joins. BI tools query it through its APIs, AI tools through the dbt MCP server. It needs a dbt platform Starter, Enterprise or Enterprise+ plan.

Snowflake semantic views. A schema-level object with logical tables, relationships, facts, dimensions and metrics, plus synonyms and comments that help an agent match words to columns. A trimmed version of Snowflake's own example:

CREATE SEMANTIC VIEW tpch_rev_analysis
  TABLES (
    orders AS SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.ORDERS
      PRIMARY KEY (o_orderkey)
      WITH SYNONYMS ('sales orders'),
    customers AS SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.CUSTOMER
      PRIMARY KEY (c_custkey)
  )
  RELATIONSHIPS (
    orders_to_customers AS orders (o_custkey) REFERENCES customers
  )
  DIMENSIONS (
    customers.customer_name AS customers.c_name
      WITH SYNONYMS = ('customer name'),
    orders.order_year AS YEAR(o_orderdate)
  )
  METRICS (
    orders.order_average_value AS AVG(orders.o_totalprice)
      COMMENT = 'Average order value across all orders'
  );

Cortex Agents read that definition and generate SQL against the physical tables.

Databricks metric views. A metric is defined once, apart from the fields it is grouped and filtered by, and the engine writes the right computation for whatever grouping a user or Genie asks for. Our Databricks metric views guide has a full example and the limits.

Power BI semantic models. On Microsoft Fabric, the semantic model and its DAX measures play this role, and Fabric IQ can generate its ontology from them.

The ontology: what the words mean

An ontology sits above the semantic layer and links to it. It is where the business, not the data team, records what a term means.

Snowflake Business Ontology (private preview) is a governed layer in Horizon Catalog with 5 kinds of node: Term, Metric, Entity, Dimension and Policy, grouped by domain such as Finance. Each node has one approved meaning, relationships such as "Order has part Line Item", and representations that bind it to tables, columns or semantic views. Only approved nodes reach Cortex. Snowflake's example is net revenue: defined once, scoped to Finance, given an owner, approved, and linked to the semantic view metric that calculates it. Our Snowflake Business Ontology guide shows how an agent queries it.

Fabric IQ ontology (preview) holds entity types, properties, relationships, rules and metrics bound to live data in OneLake. You can generate it from a semantic model, whose tables become entity types and whose DAX measures become metrics, or import it from RDF or OWL. Business rules are written in plain language and linked to entities so agents can ground their answers in them. Our Fabric IQ explainer covers the agents that read it.

Databricks Genie Ontology (public preview) mixes what you define in Unity Catalog, such as metric views, domains and Pages, with snippets Genie extracts from dashboards, SQL queries and Genie agents. Each snippet gets an authority score, and Genie ranks them and resolves conflicts.

Which to build first

Start with the semantic layer for the metrics people ask about most. It fixes the arithmetic, and both Snowflake's and Fabric's ontologies bind their metrics to a semantic view or semantic model that does the computing. An ontology with nothing to point at has no numbers to give.

Then add ontology definitions where the questions go wrong on words, not formulas:

  • Terms with more than one meaning. "Customer" for sales and for billing, "revenue" before and after refunds. The ontology records which one is approved and who owns it.
  • Rules a formula cannot hold. Exclude test and internal accounts, count a churned customer after 90 days of no orders. Snowflake models these as Policy nodes, Fabric as business rules.
  • The words people use. Region names, product nicknames and abbreviations like EMEA, as synonyms on the concept.

Whichever layer an agent reads, check what it answers. Ask it the questions your finance team already knows the answers to, and compare. The agents that read these layers, such as Genie, Cortex Agents and Fabric data agents, are where those questions get asked.

Questions

What is a semantic layer?
A semantic layer is one shared definition of business metrics and the entities they are measured over, such as net revenue by customer and region, stored on top of the physical tables. Reports, dashboards and AI agents query the definition instead of writing their own SQL, so they all compute the metric the same way. Examples are the dbt Semantic Layer, Snowflake semantic views and Databricks metric views.
What is the difference between a semantic layer and an ontology?
The semantic layer says how to calculate a metric: the formula, the aggregation, the joins. A business ontology says what a business term means, who owns it, how it relates to other concepts and which rules apply, and links each concept to the tables, views or metrics that hold it. Snowflake puts it plainly: the ontology does not change the calculation, the semantic view does.
Do AI agents need a semantic layer?
An agent that writes SQL against raw tables has to guess which column is revenue and how to add it up, and the query can run and still be wrong. A semantic layer gives it governed definitions instead. Snowflake says semantic views improve accuracy by combining LLM reasoning with rule-based definitions, and dbt connects AI tools to its Semantic Layer through its MCP server for the same reason.
What is a business ontology in data?
It is a governed model of an organization's business concepts (terms, entities, metrics, dimensions and policies) with their definitions, owners and relationships, linked to the data that represents them. Snowflake Business Ontology, Microsoft Fabric IQ's ontology and Databricks Genie Ontology are the 2026 examples, all in preview.
Should I build a semantic layer or an ontology first?
The semantic layer, in most cases. The ontologies on Snowflake and Fabric bind their metrics to a semantic view or semantic model that computes them, so the calculations have to exist first. Add ontology definitions where the words in users' questions are ambiguous or carry rules, such as which accounts count as customers.