Grams per square foot is one of the numbers a cannabis grower lives by. It tells you how much a room yields for the space it takes up, and it sounds like a number with one answer.
It has at least two. Ask what counts as grams and some people include all dried flower, while others count only grade A and B flower. Both are reasonable. Both get called grams per square foot, and they are not the same number.
Revenue is no better. Some reports account for promotional credits and some don't. In sales, there's a big difference between booked and invoiced, and plenty of salespeople run their reporting off booked, because that's how they track progress toward their goals. None of these people are wrong. They're answering slightly different questions under the same name.
I've run into all three of these in my own work, and the list goes on. Definitions drifting like this is an old problem. What's new is how fast the drift can spread, because writing the query is no longer the hard part.
The query used to be the gate
For most of the history of analytics, getting a number out of a warehouse meant knowing SQL, knowing which tables to trust and knowing which join would quietly double your totals. A handful of people could do that, so a handful of people wrote nearly every query.
That was a bottleneck, and everyone complained about it. It was also, by accident, quality control. When four analysts write all the revenue queries, there are at most four definitions of revenue, and the four of them can sit down and argue it out.
AI assistants removed the bottleneck. Someone who has never written a join can type a question in plain English and get back a query, a result and a confident paragraph explaining it. That's a real improvement, and I build these tools for a living, so I'm not here to talk anyone out of them.
But the gate went with the bottleneck. Now anyone can produce a number, in whatever tool they happen to have open, and every answer arrives looking equally sure of itself.
What self-serve analytics gets right
The upside is large, and it's worth being specific about it.
- Speed. A question that used to be a ticket and a wait is now a minute of typing.
- Follow-up questions. This is the one I think people underrate. The first question was always worth a ticket. The second, third and fourth ("what about just flower?", "what about last quarter?") never were, so nobody asked them. Self-serve analytics is where those finally get answered.
- The right person asking. A cultivation manager or a sales lead knows what a strange number means in a way that an analyst two steps removed does not.
- Time back for the data team. Fewer one-off pulls means more time for modeling, testing and the pipeline work that makes every later answer better.
Where it goes wrong
The risks are harder to see, mostly because every failure looks like a success.
Definitions drift faster. This is the grams per square foot problem at scale. Ask an assistant for revenue and it will pick a revenue. Ask again from another tool, or with slightly different wording, and it may pick a different one.
Wrong SQL reads as well as right SQL. A join that fans out and double counts, a missing filter for canceled orders, a date boundary in the wrong time zone: none of these throws an error. Each returns a clean table and a tidy explanation.
The assistant can see more than the person asking. If the assistant connects through one powerful service account, everyone who can chat with it has that account's reach. So does anyone who manages to get instructions into a text field the assistant later reads.
Queries cost money. An assistant will happily scan a year of raw events to answer a question that a summary table could have handled, and it will do it again for the next person who asks.
People stop checking. A number that arrives in a full sentence, with an explanation attached, gets less scrutiny than one you pulled yourself.
Why the semantic layer matters more now
A semantic layer is where the definitions live: what a metric is, which tables it comes from, how those tables join, at what grain, and which filters always apply. You write that down once, in code, under version control. There are good tools for this off the shelf, such as dbt's semantic layer, Cube and LookML. I ended up building a custom one, and I'll walk through it in a future post. Which one you use matters less than having one place that answers "what do we mean by revenue?"
The idea isn't new. For years it was a nice thing to have, mostly because the people writing queries could carry the definitions around in their heads. That stopped working once the people and programs writing queries outnumbered the people who know the definitions.
With a semantic layer in place, the assistant's job changes shape. Instead of "write SQL against two hundred tables," it becomes "pick the metric, the dimensions and the filters from this list." That's a much smaller space to be wrong in, and it's one you can check. The join logic and the grade filter aren't regenerated for every question. Someone who knew the business wrote them once, and someone else reviewed them.
It also moves the argument to the right place. Yield on all dried flower and yield on grade A and B flower are both useful, so define both and give them different names. Do the same for booked sales and invoiced sales. The trouble was never having two numbers. It was having two numbers and one name.
Letting an assistant in safely
Shared definitions fix consistency. The rest takes guardrails. I put the assistant behind an MCP server (MCP, the Model Context Protocol, is a standard way for an AI assistant to call tools you define), and I treat that server as the only door to the data. These are the rules I'd hold any setup to:
- The assistant gets the asker's permissions, never its own. If you aren't allowed to see payroll in the BI tool, you shouldn't be able to see it by asking an assistant nicely.
- Read-only. No question an analyst asks needs write access.
- Metrics first, tables second. The tools the server offers are along the lines of "list the metrics" and "query this metric by these dimensions." Free-form SQL can exist for the analysts who need it, against curated views, and labeled as exploratory.
- Limits on everything. Timeouts, row caps and a ceiling on how much data one query can scan.
- Log every question. Record who asked and the query that ran. When a number is challenged, you want to replay how it was made. The log also shows you which metrics people keep asking for that you haven't defined yet.
- Show the work. Every answer names the definition it used and makes the query available. "Invoiced revenue, net of promotional credits, for March" is an answer someone can disagree with. "Revenue was up" isn't.
- Test it like software. Keep a set of questions with known answers, and run them whenever the definitions, the prompts or the model change.
What's still hard
A few things I don't have a clean answer for.
- Questions nobody has defined yet. The most valuable questions are often new ones, and those aren't in the semantic layer. You need a path for exploratory work that is clearly marked as exploratory, and a habit of promoting whatever sticks.
- "Why" questions. An assistant is good at "what was yield by room last quarter?" It is much shakier at "why did it drop?", and it will give you a plausible story either way.
- Ownership. Somebody has to decide what counts as grams. That's a business decision, and the semantic layer can only record it once it has been made.
- The new bottleneck. If every new metric waits weeks on the data team, people will route around the semantic layer, and you're back where you started.
Where to start
Don't model the whole business first. Find the ten numbers people already argue about in meetings. You know which ones they are. Get the people who argue into a room, write down the definitions (plural, if it comes to that), give each one its own name and put them in code. Point the assistant at those and nothing else. Log what people ask, and let the questions it can't answer tell you what to define next.
The query got easy. We spent years working on that part, and it turned out not to be the hard one. Agreeing on what a number means still is, and it's worth getting right before you hand everyone a faster way to ask.