All insights
AI + Data7 min read

Your AI Assistant Doesn't Know Which Revenue You Mean

AI reasons over the information it receives. What it does not do is decide which version of the business is the right one.

Definition

A semantic layer is where every business metric gets a written definition — what it includes, what it excludes, how it should be interpreted, and the words people use when they ask for it. Without one, an AI assistant querying your data has no basis for choosing between several equally valid definitions of the same metric, and returns a precise number that may be wrong for the decision at hand.

Revenue is not a number, it is a ladder

Inside most companies, revenue is not a single figure. It is a ladder, and every rung is a legitimate answer to “how much did we sell last week?” Here is one week at a commerce brand running about $60M a year.

MetricWhat it measuresWho runs on itWeek of Mar 3
Booked salesOrder value at checkout, before discountsMarketing, ad platforms$1,240,000
Discounts & promotionsCodes, sitewide promos, employee−$186,000
GMVMerchandise value after discounts, before returnsMerchandising$1,054,000
Returns (RMV)Merchandise returned to inventory−$158,000
Exchanges (EMV)Replacement merchandise shipped against a return+$41,000
NMVWhat survived discounts and returnsCommercial, planning$937,000
DeferredUnshipped orders, unredeemed gift cards−$35,000
Recognized revenueRecognized on fulfillmentFinance$902,000

Every number on that table is correct. They describe the same seven days. They are 27% apart end to end.

Marketing runs on booked sales because that is what the ad platforms report against. Finance runs on recognized revenue because that is what gets reported externally. The commercial team runs on NMV because that is what survives returns and lands against the target. Each definition is valid for its purpose. None of them is interchangeable with the others.

When someone asks an AI assistant how much the company sold last week, the assistant picks a rung. Unless that distinction has been made explicit somewhere it can read, it has no basis for choosing. It returns a precise number — and precision is not the same thing as being right for the decision on the table.

What it costs to pick the wrong rung

Say marketing spent $210K that week. Here is the same campaign, measured three ways.

5.9×
ROAS against booked sales
4.5×
ROAS against NMV
4.3×
ROAS against recognized revenue

If the internal hurdle to scale a channel is 5×, the first number says double down and the other two say hold. Same week, same spend, opposite decision.

That gap compounds in three directions:

  • Budget goes to the wrong channel. A channel that looks efficient at the top of the ladder stops being efficient once discounts and returns are applied. If you never measure it after returns, you keep funding it.
  • The board gets a growth rate that does not survive the close. You report on one definition in the monthly update and finance recognizes on another. The correction arrives a quarter later, and it lands as a credibility problem rather than a definitional one.
  • Campaigns get judged on volume they did not keep. A promotion drives a spike in booked sales with a 30% return rate behind it. For a full quarter it reads as the best campaign of the year, because nobody tied the returns back to the campaign that generated them — and the discount that drove the spike never entered the ROAS calculation at all.

The failure mode is not that you get an obviously wrong answer. It is that you never find out you were wrong. You only find out the number moved, and nobody can explain why.

Attribution is the same problem from another angle

Meta, Google, and TikTok each run their own attribution model. A customer touches more than one channel before buying, and multiple platforms claim credit for the same order. Add up the platform-reported conversions and you will find more revenue than the business actually made. No single platform sees the full journey, and none of them is incentivized to.

An AI assistant plugged into those platforms will summarize what each one reports. Reconciling the overlap, choosing which attribution model the business commits to, and naming a source of truth are decisions the business makes once and then enforces everywhere. An answer about which channel is driving growth can look entirely credible and still be built on triple-counted revenue.

The fix is not to give AI access to more data. It is to give it the right context.

1. Bring the business data together

Start by connecting the systems where the business actually operates: the platform where orders happen, payments, the ERP, ad platforms, CRM, customer events, inventory, support — anything that affects how the business makes or loses money.

That data needs to live somewhere it can be joined and queried consistently. For most companies, that is a warehouse.

At this stage it is still just data. An order in one system does not automatically connect to a payment in another. A refund can mean money returned, store credit issued, an exchange shipped, or an inventory adjustment — four different events arriving under one label. An ad platform reports a conversion that does not map cleanly to any row in your own revenue table.

Bringing everything into one place is necessary. It is not the same as understanding it.

2. Turn raw data into business logic

This is where the business gets represented in the data.

Orders connect to payments. Returns separate from exchanges. Discounts attach to the orders they applied to. Duplicate and test records come out. Marketing spend ties to a specific definition of revenue, chosen deliberately. Customer activity stitches across the systems where it happens.

The output is not a cleaner set of tables. It is a set of metrics the business can use consistently: GMV, NMV, recognized revenue, contribution margin, ROAS, GMROI, retention, fulfillment performance.

None of those come out of a source system by default. Every one of them is a decision about how the business works, written down and enforced. That is the step most AI analytics products skip — they connect to the raw data, generate a query, and treat the result as meaningful.

3. Add a semantic layer

Once the metrics exist, they need to be described in a way that both people and models can use. A semantic layer gives each metric a definition: what it includes, what it excludes, how it should be interpreted, which metrics it relates to, and the words people actually use when they ask for it.

Someone asks for sales. Someone else asks for revenue, or net sales, or what we sold last week. Sometimes those are the same metric and sometimes they are three rungs apart on the ladder above. The semantic layer is where that gets settled once, instead of being re-litigated in every meeting.

This layer can live in the warehouse, in the transformation layer, in the BI tool, or in a dedicated product. Where it lives matters far less than whether it exists. Its job is to give the business a shared language for its data.

4. Connect AI to that context, then keep working on it

Only once that foundation exists does an AI interface start to earn its place. Some platforms ship their own AI layer; otherwise you connect the model you already use through an API, MCP, or a command-line interface. The connection is the least interesting part of this step. The work is in how the model behaves once it is wired in.

  • Defaults by role. A CMO asking about sales and a controller asking about sales want different rungs of the ladder. The model should know which one to reach for, and which follow-up to ask when the role does not settle it.
  • Every answer carries its definition. An answer that says $937K is worse than an answer that says $937K, NMV, net of $158K in returns, week ending March 8. The second one can be challenged. The first one just gets repeated in a deck.
  • Ambiguity gets surfaced, not resolved silently. When a question maps to more than one metric, the model asks. Picking quietly is how a wrong number acquires authority.
  • A verified question set that runs on every change. Fifty to a hundred real questions with answers confirmed by the people who own those metrics. When a definition changes upstream, you find out which answers moved before your CFO does.
  • Declared coverage. The model states what it does not have modeled instead of assembling something plausible out of whatever tables it can reach. Knowing where the boundary sits is worth more than an answer past it.

Then you watch how people actually ask. A finance lead, a growth marketer, and a warehouse manager will ask about the same metric in different words and expect different depth. Those sessions are the most valuable diagnostic you will get: they show where definitions are ambiguous, which synonyms are missing, and which parts of the business were never modeled in the first place. The semantic layer gets better as real people push on it.

What self-service analytics was always reaching for

Dashboards gave people access to predefined answers, which works right up until the question is not one of them. AI lets people ask the question they actually have — but only once the data underneath has been turned into a coherent representation of the business.

Frequently asked questions

Why does an AI assistant give a different revenue number than my dashboard?

Because revenue is not a single number. Booked sales, GMV, NMV, and recognized revenue are all valid answers to "how much did we sell," and they can sit 25–30% apart on the same week. A dashboard has one definition hardcoded into it. An assistant querying raw tables picks whichever one the underlying data suggests, which is rarely the one behind the dashboard.

What is a semantic layer, and do I need one for AI analytics?

A semantic layer is where each metric gets a written definition: what it includes, what it excludes, how to interpret it, and which words people use to ask for it. Without one, an AI assistant is guessing at your business logic on every question. With one, it is retrieving a definition your team already agreed on. It is the difference between an answer you can defend and a number you can only repeat.

Can I just connect ChatGPT or Claude directly to my database?

You can, and it will produce fluent SQL against tables it does not understand. Raw commerce data does not encode the business: an order does not connect itself to its payment, a refund label covers four different events, and discounts live somewhere other than the order line. The model will return something. Whether it matches what finance recognizes is a coin flip.

How many metrics need to be defined before connecting AI?

Fewer than most teams expect. Twenty to thirty well-defined metrics covering revenue, margin, spend efficiency, retention, and fulfillment answer the large majority of questions a commercial team asks. The work is not volume, it is getting agreement on the definitions and enforcing them everywhere.

Does this depend on which e-commerce platform I use?

No. The problem is structural, not platform-specific. Shopify, WooCommerce, Tiendanube, a headless stack, or an ERP all separate orders from payments from returns from ad spend. The definitions you need to write down are the same regardless of where the transactions originate.

Get answers that hold up under scrutiny

We build the layers underneath — warehouse, business logic, and the semantic layer your metrics live in — so the AI on top returns numbers your team can defend.