Lesson 4 of 8 · 9 min
Creating the Fabric Data Agent
You now have three things most projects skip:
- A reliability contract
- A readiness assessment
- A semantic packet
That preparation makes the actual creation process much simpler. Instead of experimenting with every setting at once, you are assembling a small system from decisions you have already made.
Confirm the prerequisites
Before creating the agent, verify:
- Fabric is enabled for the tenant.
- The workspace is on paid Fabric F2-or-higher capacity, or Power BI Premium P1-or-higher capacity with Fabric enabled.
- You can read the source you plan to connect.
- The source contains data and is in a usable state.
- Required cross-geo AI settings are enabled if your tenant and capacity configuration needs them.
Use a learning-safe source. Do not begin with the broadest or most sensitive production dataset.
Create the item
In the Fabric workspace:
- Select New item.
- Choose Fabric data agent.
- Give it a purpose-specific name.
- Add the first governed data source.
Use a name such as Student Success Data Agent, not AI Test.
The name should tell future owners what business boundary the agent serves.
Add focused sources
Fabric Data Agent and its standard runtime are generally available. Its GA query-generation tools support:
- Warehouse
- Lakehouse through its SQL analytics endpoint
- SQL Database
- Mirrored Database
- Eventhouse KQL Database
- Power BI semantic model
Graph Models, Fabric ontologies, and Azure AI Search are preview source integrations. Microsoft Graph is a separate supported source path. Source release status is independent of standard versus preview runtime selection, so verify both before depending on a capability.
An agent can use a limited number of sources, currently up to five. Treat that as a maximum, not a target. Five overlapping sources can create more confusion than one well-prepared source.
For the first version, use one primary source. Add another only when a required question cannot be answered cleanly from the first.
Configure the source
Apply the semantic packet from lesson three.
Schema selection
Select only the supported schema objects required for the source. For Power BI columns and measures, define the finer-grained AI data schema in Prep for AI.
Source instructions
Add direct, testable statements:
- Use only the latest risk assessment where
IsCurrent = 1. - High risk means
RiskScore >= 0.70. - Academic terms use the
TermCodefield. - Exclude test student records where
IsTestStudent = 1.
Avoid vague instructions:
- Be accurate.
- Use best practices.
- Answer carefully.
Those intentions are good, but they do not resolve query decisions.
Example queries
Add examples that teach complex SQL or KQL patterns. Keep them aligned with the current schema.
For semantic models, configure the AI data schema, AI instructions, and Verified Answers in Prep for AI. Data-agent-level instructions are not passed to DAX generation, and semantic models do not use data-agent source descriptions, source instructions, or example queries in the same way as SQL and KQL sources.
Test in the authoring experience
Start with three groups of questions. Do not improvise them in the chat window. Pull them from the reliability contract so you are testing the intended product.
Direct questions
- How many active students are enrolled this term?
- What is the current retention rate?
Paraphrases
- How many learners are currently registered?
- What percentage came back this fall?
Boundary questions
- Why did this student leave the university?
- Tell me which student has a medical condition.
- Predict next year’s budget.
The first group tests basic correctness. The second tests language flexibility. The third tests whether the agent respects analytical and security boundaries.
Inspect before you celebrate
For each answer, inspect:
- The source selected
- The generated SQL, KQL, or DAX
- Intermediate steps
- Filters
- Joins
- Aggregation grain
- Returned row set
Do not approve an answer because the final sentence looks plausible.
Draft and published versions
Publishing creates an isolated, read-only published version of the agent.
The draft can continue changing while users consume the published version. This separation is useful, but it creates an operating responsibility:
- Record what changed.
- Re-run evaluation before publishing.
- Confirm the intended version is live.
- Avoid assuming draft improvements automatically reached users.
Sharing and permissions
Sharing the agent does not remove the need for access to the underlying source.
The user needs Read access to the Fabric Data Agent and the source-specific minimum permission for the connected data. For a Power BI semantic model, model Read permission is sufficient for querying through the agent. Security rules such as RLS, CLS, and OLS continue to matter, subject to the elevated-role behavior discussed in lesson two.
Test the agent as:
- The owner
- A normal intended user
- A restricted user
- A user without source access
Exercise: publish version 1
Publish a first version that supports only five required questions.
For each question, capture:
- Exact wording
- Generated query
- Expected answer
- Actual answer
- User role
- Pass or fail
Keep the scope deliberately small. Version 1 is a controlled evaluation target, not a finished enterprise assistant. Think of it as a flight simulator: the purpose is to reveal failure modes safely before real users depend on the system.
Carry this forward
You have now built a working data agent. The next question is not whether it can answer something.
The next question is whether you can explain precisely how it produced the answer.
That is what we will investigate in the next lesson.