A semantic layer defines metrics once, such as what net revenue means. An ontology models the business: products, orders, fees, ads, customers, how they connect, and which changes need approval. A context layer is what an AI tool is handed when you ask a question: the right definitions, approved facts, period and caveats. A brand needs all three. Build the ontology's things first, then the metrics, then the context.
A semantic layer is a single place where metrics are defined. It means “net revenue” is calculated the same way in every dashboard and every AI answer. An ontology is a written-down model of the business. It covers the things in it (products, orders, fees, ads, customers), how they connect, and which changes a person must approve. A context layer is what an AI tool is actually handed when you ask it a question. That is the relevant definitions, approved facts, the period, and the caveats.
This post follows a single Amazon order through all three layers. You will see what each one adds and what breaks when it is missing.
The order we will follow
All numbers below are illustrative. A made-up brand sells a travel mug in three colors. Each color is its own Amazon listing with its own ASIN (Amazon’s product code). The brand thinks of all three as one product family: “Travel Mug”.
On August 30 a new customer clicks a Meta ad that points to the Amazon listing. They buy two sage-green mugs.
| Line | Amount | Where it shows up |
|---|---|---|
| Item price, 2 units at $24.99 | $49.98 | Orders report |
| Promotion (seller-funded discount) | -$5.00 | Orders report, settlement |
| Referral fee, 15% of $44.98 | -$6.75 | Settlement, not the orders report |
| FBA fulfillment fee, 2 units at $4.50 | -$9.00 | Settlement, not the orders report |
| Net paid out for this order | $29.23 | Settlement, deposited in September |
| Meta ad spend credited to this order | $15.00 | Meta, plus Amazon’s attribution tag |
| Cost of goods, 2 units at $5.80 | $11.60 | Your own records |
The referral fee is Amazon’s sales commission. Amazon charges it on the price the buyer actually paid, so it is 15% of $44.98, not of $49.98. FBA (Fulfilled by Amazon) is the service where Amazon stores and ships the product for a per-unit fee. The attribution tag is a code on the ad link that tells Amazon which ad sent the shopper.
Already there are three sources and two dates: ordered in August, paid in September. The fees appear in Amazon’s settlement report, its statement of what it paid you. They also appear in its Finances API, the same payment data in a form software can read. They do not appear in the orders report. Now ask an AI tool: “How did Travel Mug do on Amazon in August?” Here is what each layer adds to getting that right.
What a semantic layer gives you
A semantic layer turns loose columns into named, reusable metrics. For our brand it might hold definitions like these:
- Gross sales = item price x units, before promotions and refunds.
- Net revenue (orders basis) = gross sales - promotions - refunds, excluding sales tax.
- Net proceeds (settlement basis) = everything Amazon actually paid out for the order after its fees.
- Contribution margin = net proceeds - cost of goods - ad spend.
- Dimensions, the ways to break a number down: date, channel, ASIN, marketplace.
For the order above, that gives $49.98 gross sales, $44.98 net revenue and $29.23 net proceeds. The contribution is $2.63 after $11.60 of product cost and $15.00 of ads. Every dashboard that reads the semantic layer gets those same numbers. That alone fixes a lot of “why does finance’s number not match marketing’s?”
What it does not do is know what the numbers are about. The semantic layer can slice by ASIN. But it has no idea that three ASINs are one product family. It does not know that the $9.00 fulfillment fee belongs to this order and not the next one. And it does not know that the $15 of Meta spend drove a sale Meta itself could not see.
There is now an open standard for this layer. In September 2025 Snowflake and partners announced the Open Semantic Interchange. The first version of the specification was published in January 2026 under the Apache 2.0 license. It describes datasets, metrics, dimensions, relationships and contexts in a format no single vendor owns. That makes definitions portable between tools. It is a standard for describing metrics, not for deciding who may change a cost figure.
What an ontology adds
An ontology is the model of the business the metrics are calculated over. It has three parts.
Things
These are the object types your business is made of. They include order, settlement line, fee, ad, campaign, product variant, product family, channel and customer. Another is cohort, a group of customers who first bought in the same period. In our example the sage-green mug is a variant, “Travel Mug” is a family, and the August 30 buyer belongs to the August new-customer cohort.
Links
The relationships between those things, written down once:
- The order contains two units of the sage variant.
- The sage variant belongs to the Travel Mug family, along with the black and cream variants.
- The referral fee and fulfillment fee settlement lines settle this order.
- The Meta campaign sends traffic to Amazon, not to the brand’s own store.
- The customer first bought in August, which puts them in the August cohort.
With links in place, “Travel Mug on Amazon in August” stops being a guess. The family is three known ASINs. The fees can be traced to the orders they belong to. The Meta spend is scored against Amazon sales instead of against Shopify, where it would look like it produced nothing.
Governed actions
Some changes to the model are too important to happen silently. An ontology says which actions exist and who must approve them. Two common ones for a consumer brand:
- Approve a cost of goods figure. Someone proposes $6.10 per unit for the sage mug from September 1, up from $5.80 after a new freight quote. Until a person approves it, answers keep using $5.80 and say so.
- Add a new listing to a family. A fourth color launches with a new ASIN. Until it is assigned, family totals would quietly miss it. So assigning it is a clear step that someone reviews.
A semantic layer can define “contribution margin”. Only something with governed actions can tell you which cost figure was the approved one on August 30.
What a context layer adds
The context layer is the briefing an AI tool gets at the moment the question is asked. It is built from the other two layers, plus what is true about the brand right now. For “How did Travel Mug do on Amazon in August?” a good briefing includes:
- The definitions: net revenue on an orders basis and net proceeds on a settlement basis, clearly labeled as different numbers.
- The objects: Travel Mug means these three ASINs, shown with their product names.
- Approved facts: cost of goods was $5.80 per unit for all of August. The $6.10 figure starts in September.
- The period: August 1 to 31, a closed month. If the question were about September, the answer would carry “this month is still in flight”.
- Caveats: some August orders are paid out in a September settlement, so August settlement totals may not be final yet. Meta’s pixel (its tracking code on your website) cannot see Amazon checkouts. So Meta’s own purchase count for this campaign runs low. The August cohort is only weeks old, too young to judge repeat rate.
Without a context layer, the AI might have perfect definitions and a perfect model. It could still pick the wrong revenue number or apply September’s cost to August. Or it could tell you the Meta campaign failed. The facts existed. Nobody handed them over.
Side by side
| Semantic layer | Ontology | Context layer | |
|---|---|---|---|
| Question it answers | How is this number calculated? | What is this thing and what is it connected to? | What does the AI need to know to answer this question? |
| What it holds | Metric formulas, dimensions, joins | Object types, links, governed actions | Definitions, approved facts, period, caveats for one question |
| In our example | Net revenue = gross sales - promotions - refunds | Sage mug belongs to Travel Mug; fees settle this order; a COGS (cost of goods sold) change needs approval | “August is closed, COGS was $5.80, Meta cannot see Amazon checkouts” |
| When it changes | When a definition changes, rarely | When the business changes: launches, new channels, new costs | Every question |
| Who maintains it | Data or finance lead | Operators and finance, with approvals | Built automatically from the other two |
| What breaks without it | Two dashboards, two revenue numbers | Family totals miss listings; ads scored against the wrong channel | AI answers from the right data with the wrong assumptions |
Where it goes wrong
These are the traps we see most often in multi-channel brand data.
- Treating a semantic layer as the whole job. Metrics get defined carefully, but product families live in a spreadsheet nobody links to. Every family-level answer is then a manual lookup or a guess.
- One “revenue” metric for two different things. Orders-basis revenue and settlement-basis proceeds for the same order differ by the fees, here $44.98 against $29.23. If both are called “revenue”, an AI will use whichever it finds first.
- Booking by the wrong date. The order is in August. The payout is in September. A settlement-basis report for August run in early September is incomplete. Nothing in the raw data says so.
- Silent cost changes. Someone edits a COGS cell, and every past month’s margin changes with it. Without an approval step and an effective date, you cannot reproduce last month’s number.
- Ad spend scored against the wrong storefront. A Meta campaign that sends people to Amazon looks like pure waste when it is judged by Shopify purchases or by Meta’s own pixel.
- Caveats that live in someone’s head. “Recent Amazon customer counts run low” is known to the analyst and unknown to the AI. If a caveat is not attached to the number, it does not exist for the model.
Why you need all three, and in what order
Each layer answers a different question, and each depends on the one before it. Build in this order:
- Name the things. List every product family and the listings and SKUs (your own product codes) in it, across Amazon, Shopify and retail. Decide which channel each ad campaign sends people to. This is the core of the ontology, and everything else depends on it.
- Define the metrics over those things. Write down gross sales, net revenue, settlement proceeds and contribution margin, and label each one’s revenue basis. Put them where every tool reads them, not inside one dashboard.
- Add governed facts and actions. Cost of goods per unit with an effective date, launch dates, targets. Decide which of these need a person to approve a change.
- Write the caveats down. For each source, note what it cannot see and when its numbers are final. Examples are settlement delays, unfinished months, young cohorts and pixel blind spots.
- Assemble the context layer last. For each question, pass the AI the definitions, objects, approved facts, period and caveats that apply. Then check a few answers by hand before trusting it. Compare them against the source of record, the system that actually recorded the money, such as the settlement report.
In practice you will loop back. A new launch changes the ontology. That changes what a metric covers, and that changes what the AI should be told. The order above is the order of dependency, not a one-time project plan.
Synthesis builds these layers for consumer product brands. It joins a brand’s sources into one warehouse (a central database) per brand. It keeps an ontology of product families, variants, channels, cohorts and facts. Business facts such as cost of goods per unit are proposed and approved before answers use them. Every number an AI tool gets is labeled with its revenue basis, period and caveats. Access is locked to the signed-in brand. When two figures for the same metric and period disagree by more than 5%, the answer is flagged instead of one being silently picked.
Questions people ask
Is a semantic layer the same thing as an ontology?
No. A semantic layer defines metrics and dimensions over tables, so “net revenue” is calculated one way everywhere. An ontology models the business those tables describe. It says what a product family is and which settlement lines belong to which order. It also says who is allowed to change a cost figure.
What is a context layer in AI?
It is the set of definitions, approved facts, time period and caveats an AI tool is given when a question is asked. With it, the AI answers from your business rules instead of guessing. The term is newer than the other two, and vendors use it loosely. Ask what exactly gets passed to the model.
Which should a consumer brand build first?
Start with the things. Decide which listings and SKUs make up each product family. Then decide which channel each sale and ad belongs to. Metric definitions come next, because “net revenue by product family” needs the family defined first. The context layer comes last, because it is built from the other two.
Do I need a graph database to have an ontology?
No. An ontology is a written-down model of object types, links and allowed actions. It can live in ordinary warehouse tables plus a written list of rules. Keeping it up to date matters far more than where it is stored.
What is the Open Semantic Interchange?
It is an open standard for describing the parts of a semantic layer, such as datasets, metrics, dimensions and relationships. It uses a format no single vendor owns. Snowflake and partners announced it in September 2025, and the first version was published in January 2026. It makes metric definitions portable between tools. But it is not a model of who may approve a change to the business.
Can my BI tool's metric definitions act as a semantic layer?
Partly. If the definitions only live inside one dashboard tool, an AI tool querying the warehouse directly never sees them. A semantic layer is only doing its job when every user and tool, including AI, reads the same definitions.