Skip to content
mentoor

Topic 2 of 4 · 4 min read

Metric definitions behind the answer

Goal: Trace an AI answer back to its metric definition and spot when it used the wrong field or an uncertified dataset.

Every number an assistant gives you rests on a metric definition, so find that definition before you trust the number.

Check yourself · 1 of 3

What is a semantic layer in a BI setting?

Choose one answer

Why it matters

"Revenue" sounds like one thing. In a real company it can be gross revenue, net revenue after refunds, booked revenue, invoiced revenue or recognised revenue. "Active user" can mean someone who logged in this month, who did something this week, or who paid. A person who reads a dashboard usually knows which one the team agreed on. An AI assistant does not know. It picks the field whose name best matches your words.

The semantic layer

A semantic layer is a shared place where metrics are defined once: the measure, the filters, the time grain and the joins. In Looker this is the LookML model. In dbt it is the Semantic Layer, built on MetricFlow. In Power BI it is the semantic model (once called a dataset), and a model can be certified or promoted so people know an owner has approved it.

When an assistant answers from the semantic layer, it uses the agreed definition. When it answers from a raw table or an uncertified dataset, it builds its own calculation, and two people asking the same question can get different numbers.

How to trace an answer

  1. Ask for the definition. "Which field did you use for revenue, and how is it calculated?"
  2. Find the source. Which dataset or explore did the answer come from? Is it certified, or is it someone's personal copy?
  3. Compare with the agreed metric. Look in your metrics catalogue, data dictionary or a trusted report. Do the name, filters and period match?
  4. Check the grain. Revenue per order, per customer and per month are different numbers.
  5. Reproduce one number. Pick one visual you trust and ask the assistant the same thing. The two should match.

You can also make the assistant's job easier. Clear field names, short descriptions and a hidden list of fields nobody should use all help. Microsoft's guidance on preparing data for Copilot says the same.

Before and after

Before: The assistant answers "revenue was 2.4 million" from a table called orders_raw, using order_total.

After: The assistant answers "net revenue was 2.1 million, from the certified Finance model, field net_revenue (order total minus refunds and discounts)". The 0.3 million gap is now explained.

What goes wrong

  • Wrong field, right name. Two fields both say "revenue" and the assistant picks the older one.
  • Uncertified copy. An analyst's test dataset has the same columns as the official one, with stale data.
  • Hidden definition change. A filter such as "exclude test accounts" lives in the official metric but not in the raw table.
  • Mixed grain. An average of averages gives a number nobody defined.

Examples

Two revenues, one gap

Source Field Result
Certified Finance model net_revenue 2.1 million
Raw orders table order_total 2.4 million

Both answers say "revenue". The difference is refunds and discounts. Only the first matches the number in the board report.

Active user, three ways

Product defines active as "used a feature in the last 7 days". Marketing counts anyone who opened an email. Finance counts paying accounts. Ask the assistant to state the definition before you quote a figure to any of them.

Key points

  • The same word, such as revenue or active user, can map to several fields with different results.
  • A semantic layer defines each metric once so every tool, including an AI assistant, uses the same logic.
  • Certified or promoted datasets tell you an owner approved the data; uncertified copies carry no such promise.
  • Ask the assistant which field and dataset it used, then compare with your metrics catalogue.
  • Clear field names and descriptions help the assistant choose the right field.

Common mistakes

  • Taking a field name at face value without reading its definition or description.
  • Answering from an uncertified or personal dataset because it was the first match.
  • Comparing numbers from two assistants without checking that they used the same definition.
  • Forgetting hidden filters, such as excluded test accounts, that exist only in the official metric.

Check yourself · 2 of 3

An assistant reports revenue of 2.4 million, but the board report says 2.1 million. What is the most useful first question?

Choose one answer

Check yourself · 3 of 3

Which source should a BI assistant answer from when you need a figure for the finance team?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic