All articles

Before an AI Assistant Answers "How Much Did We Sell?"

A warehouse check I want to finish before a data agent reads the tables.

Diagram in four zones from left to right: warehouse tables and source system feed table tests and a reconcile gate, then instructions and a read-only data agent, ending in a trusted answer checked against known questions.
Look at the Checks zone: the table tests and reconcile gate run before the agent writes any query. The known questions at the end check the final answer.

Lately, in a few customer conversations, I keep seeing the same picture. A warehouse on one side, an AI assistant on the other, and a manager typing "How much did we sell last month?" into a chat box. It is a nice demo. However, whether the answer is right depends on the tables underneath, and the chat box cannot fix those.

Simply put, a data agent turns your question into a read-only SQL query, runs it, and tells you the result in plain words. If the query is wrong, the answer is wrong, and it will still sound sure of itself.

What does the agent actually do?

I use the Microsoft Fabric data agent as the example because it is the one I meet most in my work. As of November 2026, the Fabric data agent documentation says it needs a paid F2 or larger capacity. It reads from sources such as a warehouse, a lakehouse or a semantic model. It writes the query itself, it is read-only, and it runs as the person who asks. So row-level and column-level security still apply to that person.

In my case, the question in the room is always the same: "Can people just ask the data?"

You can, but a few limits are worth knowing before you promise anything. The same page says the agent does not read unstructured files like PDF or Word. It is English only. You cannot change the model behind it. Answers are capped at 25 rows and 25 columns. So, it does not replace your BI reports, and it does not replace RAG over documents. It is a different tool for a different kind of question. I wrote about the document side in "What I'd Check Before Letting an AI Assistant Search Company Documents".

Where can a confident answer go wrong?

Think of a new staff member who is very fast with a calculator but has never visited your shop. Give them a messy ledger and they will add it up quickly and hand you a wrong number with a smile.

Here is a small example with made-up retail data. You ask for sales by region last month. The agent joins the sales table to a store table. If the store table has two rows for the same store, because of a slowly changing record, every sale for that store appears twice. The total doubles. Nothing fails and no error shows. The agent reports the bigger number happily.

This is why grain matters. If you do not know what one row in the fact table means, the agent cannot know either. I wrote about this in "Before I Build a Data Warehouse, What Does One Row Mean?". Microsoft's guidance says the same in plain words: garbage in, garbage out. It also says to check referential integrity yourself, because Fabric Warehouse does not enforce foreign keys.

Late-arriving and changed orders cause the same kind of trouble. If yesterday's total changes after the agent already answered, two people get two different numbers. That is the reconciliation problem from my last article, and here it shows up in the chat box.

What can you check before turning it on?

You do not need a big project. These are the checks I plan to put in place, in this order.

First, tests on the tables. A tool like dbt lets you write not-null, unique and relationship tests in a schema file, and dbt test runs them. Microsoft publishes a dbt adapter for Fabric Data Warehouse, and there is a dbt job item in Fabric that the documentation lists as a preview feature. Check its status before you rely on it. A unique test on the store key catches the duplicate row above.

Second, a reconciliation gate. Before the nightly refresh is marked as done, compare the warehouse total with the source system total for the same day. If they differ by more than you accept, hold the refresh. A late but correct table is better than an on-time wrong one.

Third, instructions and example queries for the agent. You can write instructions in plain language, and you can add example question and query pairs, up to 100 per source. Example pairs are not supported for Power BI semantic model sources, so check your source type first. Put your own definition of "sales" in there: before or after tax, with or without returns. Otherwise the agent will pick one for you.

Fourth, test questions with known answers. Keep a short list, ten is fine, where you already know the correct number from your finance report. Run them after every change.

The test I plan to run is a synthetic sales warehouse with one deliberate bug: a store that moved region, where the old row was never closed. I will ask the same questions before and after fixing it and compare with the known answer from the source.

Question Known answer Before the fix After the fix
Sales by region, last month lab result needed lab result needed lab result needed
Top 5 products by quantity lab result needed lab result needed lab result needed
Returns as a share of sales lab result needed lab result needed lab result needed

Lab result needed. I have not run this lab yet. I will run it later and fill in the table, so please read the empty cells as a plan, not a result.

This is my current view, and your case may be different. If your data is small and one person owns it, a weekly manual check may be enough. If many people will ask, I would automate the gate first.

What can you try this week?

Pick one question your manager asks often. Find the correct answer in your finance report. Then write the SQL by hand against your warehouse and see if it matches. If it does not, you have found what an AI assistant would have found for you, with more confidence and less warning. Fix that first, and add a unique test on the key behind it.

If you want the reconciliation step in more detail, read my earlier piece, "The Order Changed Today. How Do I Reconcile Yesterday's Sales?"