What is a semantic layer?

Definition

A semantic layer sits between raw data structures and the people or applications that ask business questions. It defines concepts such as revenue, customer, region, or reporting period in a consistent form, including the calculations and relationships behind them.

For AI data agents, the semantic layer can provide reliable domain context without requiring the agent to infer every meaning from table and column names. It still needs governance and updates because an incorrect definition will be reused across many queries and reports.

ELI5

A semantic layer is like a shared dictionary for a company's data. It explains what important business words mean and how to calculate them, so different tools do not silently use different definitions.

For example, a database may contain orders, refunds, and test purchases in separate tables. The semantic layer can define revenue as paid orders minus refunds while excluding tests, letting an agent apply the same rule each time.

Frequently asked questions

Is a semantic layer the same as a database schema?

No. A schema describes technical structures such as tables and columns, while a semantic layer adds governed business meaning and calculations.

Why is a semantic layer useful for an agent?

It gives the agent consistent definitions and relationships, reducing the need to guess what raw data fields mean.

Videos explaining semantic layer

  1. Andrew Qu in a light attention-blue T-shirt on a black background beside the headline “AGENTS NEED CONTEXT”.