From Events to Answers · Part 4 of 7
The agent writes the sentence, the table holds the number
In a Fabric data agent, let the language model write the sentence and the query, never the number, and show the trace that proves it.
In short
- A Fabric data agent is a generally available Fabric item that answers plain-language questions about your data. It writes a read-only query, runs it as the asking user, and phrases the result. It should write only two things: the query and the sentence. Every number should come back from a governed table.
- Calculations belong to a deterministic program that a person wrote and tested. The agent reads that program's stored output and names the method. In the demo, the optimizer grid-search-v1 lowers OB-104 from 14,353 to 13,298 QAR per kg, a 7.4 percent saving.
- Instructions, data source instructions, and example queries steer the agent toward the right table. They do not guarantee it. The visible query is the one check every reader can run.
- Microsoft Learn states that data agents need a paid F2 or higher capacity, not a trial. Agent requests are background jobs, smoothed over 24 hours. Learn's worked example comes to 0.11 CU hours per request.
What a Fabric data agent should write, and what it should not
The Fabric data agent GA answers a question in three steps. It picks a data source, writes a read-only query, and turns the result into text. Microsoft Learn names the query tools: NL2SQL for lakehouses and warehouses, NL2DAX for semantic models, and NL2KQL for KQL databases. Every query runs with the asking user's credentials. The agent cannot create, update, or delete data.
Dr. Kot's position is a strict split of labor. The model writes the query and the sentence. It never produces a number. Every figure in a business answer comes from a governed table, and the answer names that table. Anything that needs a calculation goes to a program a person wrote and tested. The agent reads that program's output like any other row.
The reason is simple. A language model writes plausible text. A plausible cost is worse than no cost, because nobody checks a number that looks right. A query against a named table can be checked by anyone with read access. The script for the session put it in three short lines: “The AI wrote the sentence. The numbers came from a table. That is the design, not luck.”
Figure 1 takes one answer from the demo apart. It shows which words the model wrote, which value came from which row, and which query fetched both rows. For the conference demo of the same agent type and its status, see Fabric data agent: plain-language questions over a lakehouse. For the story behind this demo, start with Part 1.
The trap question: reduce the cost of OB-104
Beat D2 asks the agent for a cost reduction. A language model is good at inventing a reformulation that sounds right. The demo asks the question anyway, to show what the agent does instead. Question Q4 in the kit asks how to:
“reduce the raw material cost of OB-104 without dropping below its intensity target”
The house, its six formulas, its panels, and its costs are invented. Costs are in Qatari riyals (QAR) per kg of concentrate.
The expected answer is one row of the table formula_optimization, returned unchanged. The agent adds the words around it and nothing else.
| ID | Field | Value in the OB-104 row |
|---|---|---|
| O1 | Baseline cost | 14,353 QAR per kg |
| O2 | Optimized cost | 13,298 QAR per kg |
| O3 | Saving | 7.4 percent |
| O4 | Intensity | 32.02 at baseline, 32.32 optimized. The target in the formulas table is 32.0. |
| O5 | Recommended changes | Assam oud oil -1 pts, Cambodian oud oil -8 pts, Synthetic oud accord +8 pts, Musk base -7 pts, Amber accord +8 pts. The table stores all five in one text field. |
| O6 | Method | grid-search-v1 |
The method matters as much as the numbers. grid-search-v1 is a short Python program in the session kit, and its rules fit in a few lines. Only oud materials and bases may move. They move in 1-point steps, by at most 8 points each. The total stays at 100 percent. Intensity must stay at or above the formula's target. Boosters, precious materials, fixatives, and top notes stay fixed.
A named method is something a reviewer can open. The ST-12 report says that labdanum absolute at 5 percent raises the material cost, and it asks for a cost optimization before launch. In the kit, labdanum is a fixative, and grid-search-v1 holds fixatives fixed. So the optimizer never touches the material the report blames. That is a limit of version 1. It is visible only because the answer names the method.
Figure 2 shows the same program's output for all six formulas. Every optimized formula keeps its intensity at or above its target, because the program rejects any mix that falls below it.
formula_optimization. The axis starts at 7,000. OB-105 saves most, 15.7 percent. The program can cut its plantation oud oil, which costs 32,000 QAR per kg, the most of any oud material in the kit.| ID | Formula | Baseline, QAR per kg | Optimized, QAR per kg | Saving | Intensity target | Optimized intensity |
|---|---|---|---|---|---|---|
| OB-101 | Oud Classic | 9,443 | 8,885 | 5.9 percent | 23.0 | 23.03 |
| OB-102 | Oud Rose | 13,074 | 12,059 | 7.8 percent | 22.5 | 22.83 |
| OB-103 | Oud Amber | 11,135 | 10,640 | 4.4 percent | 31.0 | 31.57 |
| OB-104 | Oud Saffron S-7 | 14,353 | 13,298 | 7.4 percent | 32.0 | 32.32 |
| OB-105 | Oud Plantation | 13,273 | 11,189 | 15.7 percent | 24.0 | 24.32 |
| OB-106 | Oud Daylight | 8,697 | 8,076 | 7.1 percent | 22.0 | 22.39 |
How the agent is told never to calculate
The demo agent carries three layers of guidance: agent instructions, data source instructions, and four example queries. Each layer pushes cost questions to one table and forbids arithmetic. None of them is a hard control. Microsoft Learn describes instructions and examples as context that helps the agent decide how to process a question. Treat them as steering, and verify the result.
| ID | Layer | Text, quoted from the kit | What the guard does |
|---|---|---|---|
| G1 | Agent instructions, rule 2 | “Numbers come from tables. Reasons, recommendations, and limitations come from doc_chunks.” | Splits facts from reasons before the agent writes any query. |
| G2 | Agent instructions, rule 3 | “Cost optimization is deterministic.” “Never calculate or estimate an optimized formula yourself.” | Sends every cost reduction question to formula_optimization and makes the agent name the method. |
| G3 | Agent instructions, rule 4 | “Cite the study_id and the file_name for every statement taken from a document.” | Makes every reason traceable to one file. |
| G4 | Agent instructions, rule 5 | “Costs are in QAR per kg of concentrate. Say the unit.” | Stops a bare number from leaving the agent. |
| G5 | Data source instructions, cost section | “Never propose your own material changes. Never recalculate cost.” “If the formula has no row in formula_optimization, say that no optimizer result exists.” | Gives the agent a way to say no, instead of inventing a row. |
| G6 | Example query for OB-104 | SELECT formula_id, baseline_cost_qar_per_kg, optimized_cost_qar_per_kg, saving_pct, recommended_changes, method FROM formula_optimization WHERE formula_id = 'OB-104' | Shows the agent the target shape: one table, one filter, no arithmetic. |
The data source instructions came from a Markdown file of topic rules with three sections: cost optimization, study findings, and preference results. The build loaded the whole file as the data source instructions of the lakehouse. Learn says the agent sends data source instructions to the query tool every time it uses that source. So the cost rule reached every question. Learn also describes a separate feature called topics Preview, which sends only the relevant sections. It runs only on the preview runtime, and the demo did not use it.
Two details from the build matter for your own agent. First, the word winner is defined nowhere in these guards, on purpose. It lives in the ontology, which Part 3 explains. Second, the guards disagree in one small place. The cost rule asks for both intensity values. The OB-104 example query selects neither. Guards drift like any other code, so read them side by side before each publish.
Learn is direct about the limits of examples. It states that NL2SQL does not always follow example queries closely, and that it “sometimes adds logic or constraints” the examples did not contain. That sentence is the case for showing the query. Guards make the right answer likely. Only the trace makes it checkable.
Open the query, find the row: how to verify a data agent answer
Beat D2 ends with three moves that any reader can repeat. Open the generated query. Check that it reads one governed table and does no arithmetic. Then open that table and find the row. In the script, the query stays on screen for ten seconds, and the row shows the same numbers, unchanged.
Learn documents where to look. The agent shows the result and the steps it took, and you can expand those steps under the answer. It also shows the generated code it ran against the source. Steps, query, and row together form the trace. Check four things:
- The query names a table with an owner, such as
formula_optimization. - The query returns stored values. It does not add, multiply, or average them, unless that arithmetic is the documented definition of the metric.
- The row holds the same numbers as the sentence, in the same unit.
- Every reason or recommendation carries a study ID and a file name.
The room question at the end of D2 was: would you trust this answer more or less, now that you saw the query? The script's answer is the thesis of this post. Showing the trace is the point. Hiding it is the risk. The recovery line for a bad evening follows the same logic. If the agent gives a wrong number, open the query and show the table.
Learn adds one more reason to go to the table. Chat responses are capped at 25 rows and 25 columns. For an audit, read the table, not the chat.
Answers that exist only in documents
Some answers live in no table. Beat D4 asks: “OB-105 went from 44 to 61 percent first choice. Did the formula change? Why did it improve?” The composition table holds one recipe for OB-105, and the ST-14 report confirms that the percentages did not change. The reason is a sentence in two reports.
The ST-13 report advises against OB-105 as blended and proposes a four-week maceration step before bottling. The ST-14 report repeats the test after that process change and records 61 percent. The expected answer cites both files, ST-13_en_preference-report.pdf and ST-14_en_preference-report.pdf. Both reports are labeled restricted. Their optional row-level security policy was a backup to test, not part of the show.
One question in the demo is in French. Question Q3, asked in beat D1, reads: “Que recommande l'étude ST-12 pour la formule OB-104 ?” The kit expects a French answer from one French passage. On stage, the agent answered it correctly in French. That passage is the recommendation section of the ST-12 report. It is stored as a row in doc_chunks and copied into study_recommendations. That answer is an industrial pilot, with S-7 not below 1.5 percent. Agent instruction rule 6 asks for the language of the question and a note whenever the agent translates. Microsoft Learn says otherwise. Its page Fabric data agent concepts, checked on November 3, 2026, states that the data agent does not currently support “non-English languages.” It advises English questions, instructions, and examples. Learn wins here. The French answer is one demo result on one short passage, not a supported feature.
The demo is open about how it read the reports. The five PDF files, three in English and two in French, were never searched live. Their passages were prepared in advance as 20 rows in a table called doc_chunks. Each report has four sections, and the documents table links each one to its file name. There are no embeddings and no vector search in this build. The notebook cell that extracted PDF text live failed during the build, and the agent never needed it.
That matches Learn. The data agent does not read PDF files, and lakehouse files reach it only as tables. For a real document collection, Learn offers an Azure AI Search index as an agent source Preview. Chunking, tables inside PDF files, and retrieval quality then become the real work. Part 5 covers that gap and two other ways to build the same layer.
Failure modes from the real build
Four failures from the build teach more than the demo itself. Two of them surfaced on the day of the session. Each one has a check you can run before production.
| ID | What happened | How it was fixed | Check before production |
|---|---|---|---|
| B1 | The definition file for the agent created a phantom top-level dbo schema with placeholder ids. The portal showed a warning triangle. The build script had placed the ten tables under a top-level dbo element with generated ids. The service expects Schemas, then dbo, then Tables, and its element ids encode that path. | Through the public data agent staging API: select the ten real tables under Schemas, dbo, Tables, delete the phantom, and republish. The published view then showed 10 of 10 tables. A re-test of Q1 returned OB-104, ST-12, 68 percent. | After every deployment by API, read the published definition back and count the selected tables. |
| B2 | A new account got the error PowerBIUserAccessTokenNotFoundError from the agent until its first sign-in to the Fabric portal. | A scripted first sign-in for each account before the session, and a sign-in for every participant during the break. | Sign in once with every test account before you test the agent. |
| B3 | A shared agent that was never published answers no consumer, because consumers can query only the published version. Read on the agent is not enough either: each user also needs read access to every source behind it. | The build script wrote the draft and the published parts in one definition, so the agent was published from the start. | Test as a consumer with a second account, against the published version. |
| B4 | Views created in a notebook did not show in the SQL analytics endpoint that the agent uses. | formula_overview and study_recommendations ship as tables, not views. | List what the SQL analytics endpoint shows before you select tables. |
Learn confirms B3 on its sharing page. With no extra permission selected, users “can only query the published version.” When you share an agent, “you must also share access to the underlying data it uses.” For a lakehouse, the minimum is Read on the lakehouse item, plus table access where it is enforced. With less, queries “fail or return empty results.”
Learn does not document the B2 error as of November 3, 2026. The closest Learn statement concerns workspace access: a change “only takes effect the next time the user logs into Microsoft Fabric.” Plan a portal sign-in for every new account. Part 6 describes how the session prepared 50 accounts.
Empty results are the dangerous case. An empty result reads like a fact: no rows, so nothing to report. Test with the weakest account that should still see the data.
Fabric data agent capacity requirements and cost
A Fabric data agent needs a paid F2 or higher capacity, or a Power BI Premium P1 or higher capacity with Fabric enabled. Learn's trial page lists “AI Experiences such as Data agent” among the features a trial capacity does not support. Plan paid capacity for any agent pilot, even a short one.
Each request is small and spread over a day. Learn states that the AI work inside a data agent request is “classified as background jobs.” Learn's throttling page adds that “Fabric smooths background operations over a 24-hour period.” Learn's worked example uses 2,000 input tokens and 500 output tokens. That comes to 400 CU seconds, which is 6.67 CU minutes, or 0.11 CU hours. Running the generated query is billed separately, to the engine that runs it.
The session sizing used Learn's example. The demo workspace ran on an F32 capacity, which has 768 CU hours per day. Fifty people asking six questions each comes to about 33 CU hours, about 4 percent of an F32 day. That is an estimate, not a measurement. Learn notes that agent instructions, data source instructions, example queries, and conversation history all add input tokens. The demo agent has long instructions and four examples, so its real requests are larger than the example. Tokens per question were not measured.
Two settings matter outside the EU Data Boundary and the US. A tenant admin must allow data sent to Azure OpenAI to be processed, and stored, outside the capacity's geographic region. Learn also states that a query fails when the source and the agent sit on capacities in different regions. Measure before you size. The Capacity Metrics app reports data agent usage under the operation name AI Query.
A trust checklist for a production Fabric data agent
This checklist is Dr. Kot's position, not Microsoft guidance. It comes from building and breaking the demo agent.
- T1. Put every number a business answer needs into a governed table with a named owner. If no table holds the number, the agent should say so.
- T2. Move every calculation that decides money or risk into a deterministic program a person wrote and tested. Store its output with the method name and version.
- T3. Write one instruction that forbids calculation, one data source rule per route, and one example query per route. Read all three together for conflicts.
- T4. Require the unit and the source in every answer: the table name, the study ID, or the file name.
- T5. Teach every consumer to open the query. Expect one governed table, no undocumented arithmetic, and the same row.
- T6. Keep a file of expected answers and run all of them after every publish. The demo kit had six questions with expected answers.
- T7. Test as a consumer, not as the author. Use a second account with Read on the agent and on every source, signed in once, against the published version.
- T8. Test row-level security with a restricted account before you trust it. Learn says the agent honors it. Prove that on your own data.
- T9. After every deployment by API, read the published definition back and count the selected tables.
- T10. Size capacity from one week of measured AI Query usage, not from the Learn example.
To review a data agent design with Dr. Kot, book a slot. The session kit and the hands-on steps are shared in the Fabric Falcons community. For the wider platform, see the Microsoft Fabric implementation guide.
Key facts at a glance
Product facts from Microsoft Learn, checked on November 3, 2026. Demo facts from the session kit.
| ID | Fact | Source |
|---|---|---|
| K1 | The Fabric data agent is generally available. | Fabric data agent concepts |
| K2 | A data agent needs a paid F2 or higher capacity, or Power BI Premium P1 or higher with Fabric enabled. | Fabric data agent concepts |
| K3 | Trial capacities do not support the data agent. | Try Microsoft Fabric for free |
| K4 | A request with 2,000 input and 500 output tokens uses 400 CU seconds, which is 0.11 CU hours. | Data agent in Fabric consumption |
| K5 | The AI work in a request is a background job, and Fabric smooths background jobs over 24 hours. | Fabric capacity throttling policy |
| K6 | One data agent can use up to five data sources, with up to 100 example queries per source. | Fabric data agent concepts |
| K7 | NL2SQL retrieves the most similar example queries by vector similarity, and it does not always follow them closely. | SQL sources in Fabric data agent |
| K8 | Chat responses are capped at 25 rows and 25 columns. | Fabric data agent concepts |
| K9 | The data agent does not read PDF files directly, and an Azure AI Search index source is in preview. | Add and configure data sources |
| K10 | The data agent does not currently support non-English languages. | Fabric data agent concepts |
| K11 | Users with default share permission can query only the published version, and they need read access to every source. | Data agent sharing and permissions |
| K12 | In the synthetic demo, grid-search-v1 lowers OB-104 from 14,353 to 13,298 QAR per kg, a 7.4 percent saving. | Session kit, expected answers and formula_optimization |
Frequently asked questions
Does a Fabric data agent make up numbers?
A Fabric data agent writes a query and a sentence, and the numbers come from the query result. It can still write a wrong query or phrase a value wrongly. Give it instructions that forbid calculation, route calculations to a table of stored results, and open the generated query to check the table and the row.
Where does a Fabric data agent show the query it ran?
Under the answer in the data agent chat, in the steps you can expand. Microsoft Learn says the agent shows the steps it took and the generated code it ran against the data source. Check that the query reads a governed table, does no arithmetic you did not define, and returns the same numbers as the sentence.
What capacity does a Fabric data agent need?
A paid F2 or higher Fabric capacity, or Power BI Premium P1 or higher with Fabric enabled. Microsoft Learn states that trial capacities do not support AI experiences such as the data agent. The Copilot and Azure OpenAI tenant settings must also be on.
How much capacity does one Fabric data agent question use?
Microsoft Learn's example request has 2,000 input tokens and 500 output tokens and uses 400 CU seconds, or 0.11 CU hours. It counts as a background job, smoothed over 24 hours. Instructions, example queries, and chat history add input tokens, so measure your own usage in the Capacity Metrics app under AI Query.
Can a Fabric data agent read PDF files?
Not directly. Microsoft Learn states that the data agent does not support unstructured files such as PDF, and it reads lakehouse files only after they become tables. The demo stored report passages as rows in a table. For a real document collection, an Azure AI Search index can be a data agent source, in preview.
Why can a colleague not query my shared Fabric data agent?
Check three things. The agent must be published, because users with default share permission can query only the published version. The colleague needs read access to every data source behind the agent. In the demo build, new accounts also had to sign in to the Fabric portal once before the agent answered them.
Can a Fabric data agent answer in French or Arabic?
Microsoft Learn states that the data agent does not currently support non-English languages and recommends English questions, instructions, and example queries. In the demo, the French question got a correct French answer from a French report, but treat that as a demo result. Test every language you need before you promise it.
Sources
Microsoft Learn, checked on November 3, 2026. Demo facts come from the session kit: the agent instructions, the topic rules, the expected answers, and the synthetic tables.
- Fabric data agent concepts
- Create a Fabric data agent
- SQL sources in Fabric data agent
- Add and configure data sources in Fabric data agent
- Use topics in a Fabric data agent (preview)
- Connect data agents to your Azure AI Search index (preview)
- Fabric data agent sharing and permission management
- Configure Fabric data agent tenant settings
- Data agent in Fabric consumption
- Understand the Fabric capacity throttling policy
- Try Microsoft Fabric for free
- Give users access to workspaces