Level 2: AI layer

Prove it twice

Evals and receipts: test the questions, keep proof of every answer.

Before people rely on AI answers, test the questions they'll ask against answers you worked out by hand. After, keep a receipt for every answer so anyone can check where a number came from.

Updated November 2026Example data, not from a client.
On this page
  1. Two kinds of proof
  2. Build the eval set
  3. Score the route, status and value
  4. Run it more than once
  5. Keep a receipt
  6. What I check

Parts 1 to 6 build the model, the contracts, the catalog, the routing order and the tools. None of that proves the answers are right. Two kinds of proof do: evals, which you run before people rely on the answers, and receipts, which you keep for every answer afterward.

Two kinds of proof

An eval is a test: a set of real questions with answers you worked out by hand, run against the whole system. A receipt is a record: for one answer, the route, the request, the definition, the status and the query, kept where someone can check it later. Evals catch problems before launch. Receipts let you trace one number back when someone questions it.

Diagram · Evals and receipts: test the AI route like you test the model

Evals and receipts: test the AI route like you test the model A loop of steps: an eval set of reference questions, traps and paraphrases; ask through the real consumer route, N runs each; compare to the expected value and expected status; a scorecard of correct, refused correctly, wrong and inconsistent. Step 5: on a miss, fix the model, catalog or router, never the test, then ask again through the real route. Run each question more than once. Example data, not from a client. 1 · Eval set reference · traps · paraphrases 2 · Ask through the real route same tool users use, N runs each 3 · Compare to expected value + expected status 4 · Scorecard correct · refused correctly · wrong · inconsistent 5 · On a miss, fix the model, catalog or router. Never the test. Run each question more than once. Example data, not from a client.
Ask the reference questions and the traps through the tool people actually use, more than once. On a miss, fix the model, never the test. Example data, not from a client. Open full size

Build the eval set

Start from the question list in part 5. For each question, write down the expected route and the expected result, worked out by hand, not by the system you're testing. Include the traps on purpose: a question with no period, a question about term amounts, a customer that doesn't exist, a period with no data. A good eval set has as many “should refuse” rows as “should answer” rows.

Eval set (template)
QuestionExpected routeExpected result
April 2025 net revenue, C-001, P-01Tier 1COMPLETE, 100.00
Same, by accounting dateTier 1COMPLETE, -20.00
July 2025 net revenue, C-001, P-01Tier 1NO_RECORDS_IN_PERIOD, no value
Net revenue for C-999Tier 1NO_MATCHED_RECORDS, no value
Revenue for all timeTier 1 toolRejected: period required
Add up the contract terms as revenueDeclineRejected or declined, no number

Expected answers worked out by hand on the example. A template for your own set, not a scorecard. Example data, not from a client.

I work the expected numbers out in SQL, outside the tool being tested:

-- Expected answers for the eval set,
-- worked out by hand in SQL.
SELECT
  SUM(CASE
    WHEN reporting_date >= '2025-04-01'
     AND reporting_date < '2025-05-01'
    THEN amount END) AS april_reporting,
  SUM(CASE
    WHEN accounting_date >= '2025-04-01'
     AND accounting_date < '2025-05-01'
    THEN amount END) AS april_accounting,
  COUNT(CASE
    WHEN reporting_date >= '2025-07-01'
     AND reporting_date < '2025-08-01'
    THEN 1 END) AS july_rows
FROM revenue
WHERE customer = 'C-001'
  AND product = 'P-01';
Result
april_reportingapril_accountingjuly_rows
100.00-20.000

Result on the example. Example data, not from a client.

The same checks belong in your build, as tests that run every time the model changes. Guide 7 covers reconciliation tests like these. Here they double as the expected answers.

Score the route, status and value

Score each run on three things, not on wording. Did it take the expected route? Did it return the expected status? If it returned a value, is it the expected value? An answer that says 100.00 by way of free-form SQL fails, even though the number is right, because next month the same route can return 200.00.

A refusal scores as a pass when refusal was expected. A confident number on the “all time” question is the worst result in the set.

Diagram · Eval set and receipt: the template and the record

Eval set and receipt: the template and the record An eval set template, marked no runs yet, lists each question with its expected result and blank runs, correct and wrong counts: April 2025 revenue, 100.00 COMPLETE; April by accounting date, -20.00 COMPLETE; revenue for all time, refused for no period; term amounts as revenue, refused as not revenue. A receipt per run records the question, tier used, request, value, status, model version and time. Counts stay blank until you run the set yourself. Example data, not from a client. Eval set template NO RUNS YET QUESTION · EXPECTED April 2025 revenue 100.00 · COMPLETE runs ___ correct ___ wrong ___ April, by accounting date -20.00 · COMPLETE runs ___ correct ___ wrong ___ Revenue for all time refused: no period runs ___ correct ___ wrong ___ Term amounts as revenue refused: not revenue runs ___ correct ___ wrong ___ Receipt, one per run question · tier used · request value · status model version · time Counts stay blank until you run the set yourself. Example data, not from a client.
The eval set is a template: the counts stay blank until you run it. Every run leaves a receipt. Example data, not from a client. Open full size

Run it more than once

The same question can get a different answer on a second run. Microsoft says so plainly in the docs for Prep data for AI, a preview feature in Power BI: Copilot “doesn't always produce the exact same response, even with the same input.” dbt's 2026 benchmark ran each of its 11 questions 20 times for the same reason. Run each eval question several times and report the spread, not the best run.

Tooling exists for this. The Fabric data agent evaluation SDK Preview takes a set of questions with expected answers and runs them against an agent from a notebook. A spreadsheet and a script work too. The set matters more than the tool.

Keep a receipt

Once people are relying on the answers, log one receipt per answer. Here's what one looks like for the April question:

{
  "question": "April 2025, C-001, P-01?",
  "asked_by": "viewer-role test user",
  "route": "tier 1: semantic query",
  "request": {
    "operation": "recognized_revenue",
    "customer_id": "C-001",
    "product_code": "P-01",
    "date_basis": "reporting",
    "period_start": "2025-04-01",
    "period_end_exclusive": "2025-05-01"
  },
  "metric": "net_revenue",
  "definition_version": "net_revenue v1.0",
  "answer_status": "COMPLETE",
  "value": 100.0,
  "rows_read": 2,
  "query_text": "SELECT SUM(amount) ...",
  "answered_at": "2027-02-16T09:30:00-05:00"
}

Every field answers a question someone will ask later. Which route? Which definition, and which version of it? Was it complete? How many rows went in? The rows_read of 2 is R-001 and R-002, the two April reporting entries. If a later version of net_revenue changes the number, the receipt shows which definition produced the old one.

Store receipts where the people who own the metric can read them, and keep them as long as you'd keep the report the number ended up in.

What I check before and after launch

  1. Does the eval set include trap questions that should be refused?
  2. Were expected answers worked out outside the system being tested?
  3. Is each question run several times and scored on route, status and value?
  4. Does every live answer leave a receipt with route, definition version and status?

Test before people rely on it. Keep proof after.

About to put AI on a Power BI model?

I review one model, fixed scope, and tell you what to fix first.

See the model review

Related