Every organisation has a number that means three different things. Revenue recognised, revenue booked, revenue net of refunds: each correct somewhere, each wrong in someone else's dashboard.
For years the cost of this was a slow meeting in which two people discovered they had been reading different charts. With language models answering questions over company data, the cost is higher: a fluent answer built on the wrong definition, delivered with confidence to someone who will not check.
Definitions as code
A semantic layer moves metric definitions out of dashboard formulas and into versioned, reviewed code. Every consumer, whether a BI tool, an internal application or a retrieval system, asks the semantic layer for "net revenue" rather than recomputing it.
metric: net_revenue
owner: finance
grain: [day, region, product_line]
expression: sum(gross_amount) - sum(refund_amount)
filters: [order_status = 'settled']The syntax matters less than the fact that it has an owner, a grain and a review process.
What changes for AI systems
When a model answers "how did net revenue move last quarter?", it should call the semantic layer, not write SQL against raw tables. That one decision removes most of the hallucination risk in analytical assistants: the model chooses which question to ask, and the platform decides how to compute the answer.
The organisational part
The hard part is agreeing on definitions, not writing them. We run definition sessions with metric owners before building anything, and we treat disagreements as findings rather than delays. A platform that encodes an unresolved disagreement just makes it run faster.