KTL Blog

How to Create the Best Fabric Data Agent: Master Semantic Modeling and AI Preparation

Written by Barry Crowell

A Fabric data agent can transform how teams interact with analytics. However, many teams discover that their agent struggles to provide useful insights. Even when the data architecture is clean, the AI may still produce vague or incorrect responses.

You may already have a strong foundation. Your data flows through bronze, silver, and gold layers. You built a semantic model. Everything appears organized.

Yet when you launch a Fabric data agent, the answers feel underwhelming.

The agent might not understand business logic. It might miss the correct measures. Sometimes it returns generic responses instead of meaningful analysis.

This happens because most semantic models are designed for human analysts, not AI systems.

Fortunately, optimizing a Fabric data agent only requires three strategic steps:

  1. Prepare your semantic model with descriptions and synonyms
  2. Create a business ontology
  3. Provide structured data agent instructions

Once these pieces are in place, the agent can interpret your data the way your business does.


Step 1: Prepare Your Semantic Model for a Fabric Data Agent

A Fabric data agent relies heavily on metadata. Without it, the agent cannot properly understand your model.

For example, analysts know that Rev_Amt means Revenue Amount. Humans also understand that “customers” and “clients” may refer to the same entity. AI systems do not make these assumptions.

Instead, the agent searches for exact matches.

As a result, it may fail when users ask about revenue because no table contains that literal name. Similarly, queries about clients may fail if the model only uses customers.

Adding descriptions and synonyms solves this problem.

Option 1: Use Tabular Editor and a C# Script

First, export your model objects using a C# script in Tabular Editor. Then feed that list into an AI assistant with a prompt.

Example prompt:

“I am documenting a Power BI semantic model. For each table, column, and measure listed below, generate a business-friendly description and five synonyms. Format the output as a C# script for Tabular Editor that updates the .Description and .SetAnnotation(‘Synonyms’, …) properties.”

After generating the script, paste it back into Tabular Editor and execute it.

Benefits include:

  • Fast documentation
  • Easy scalability
  • Version-control friendly workflows

(Internal link opportunity: Semantic model best practices)

Option 2: Use Power BI Modeling MCP Server in VS Code

Alternatively, the Power BI Modeling MCP server allows developers to modify semantic models directly from VS Code.

Using GitHub Copilot, you can simply describe what you want:

  • Add descriptions
  • Create synonyms
  • Update metadata

Copilot will update the model automatically.

Advantages include:

  • Natural language editing
  • Interactive development
  • Transaction support with rollback

(Internal link opportunity: GitHub Copilot + Fabric integration guide)


Step 2: Build a Fabric Ontology to Define Business Relationships

Next, create an ontology layer that explains how your business works.

Although your semantic model contains relationships, those connections often live inside join logic or DAX formulas. Unfortunately, a Fabric data agent cannot always interpret that logic effectively.

An ontology solves this problem.

Instead of describing tables, it describes business entities and relationships.

For instance:

  • Entity: Product
  • Entity: Order
  • Entity: Customer

Relationships might include:

  • Customer places Order
  • Order contains Product

Without ontology, the agent thinks like SQL:

SELECT * FROM Orders
JOIN Customers
WHERE...

With ontology, the agent understands business intent.

A query such as:

“Show customers who placed multiple orders last quarter.”

becomes easier to interpret because the relationship definitions already exist.

Therefore, ontology provides a bridge between technical data models and business language.

(Internal link opportunity: Power BI data model optimization)


Step 3: Write Effective Fabric Data Agent Instructions

Finally, clear instructions are critical for every Fabric data agent.

Many teams misunderstand this step. They provide vague guidance instead of clear operational rules.

Your agent has 15,000 characters for instructions, so use that space carefully.

A practical framework includes four parts.

1. Define the Agent’s Role

First, give the agent a clear identity.

Example:

“You are a sales analyst for a retail company helping leadership understand revenue trends and customer behavior.”

This context improves interpretation and prioritization.

2. Provide Detailed Domain Knowledge

Next, explain the structure of your data.

Include:

  • Fact tables
  • Dimension tables
  • Key measures
  • Important definitions

For example, if COGS exists in your model, clarify that it means Cost of Goods Sold and specify what it includes.

This step ensures the Fabric data agent understands your business vocabulary.

3. Define Resolution Rules

Ambiguity frequently causes incorrect results. Therefore, define rules that resolve conflicts.

Example:

“If a user asks for ‘revenue,’ always use the measure TotalRevenue, not GrossRevenue.”

These rules dramatically improve response accuracy.

4. Allow Clarification Questions

Even with good instructions, some prompts remain unclear.

Therefore, instruct the agent to ask follow-up questions.

Example:

“If the time period is not specified, ask whether the user means fiscal year or calendar year.”

This approach prevents incorrect assumptions.


Best Practice: Use Specialized Fabric Data Agents

Another common mistake is creating a single, universal agent.

However, broad agents often perform poorly.

Instead, limit each Fabric data agent to roughly 25 tables or fewer. Specialized agents typically outperform general ones because they focus on a specific domain.

For example, create separate agents for:

  • Sales analytics
  • Finance reporting
  • Supply chain insights

Focused agents produce faster and more accurate results.


Final Thoughts on Building a High-Performing Fabric Data Agent

A Fabric data agent is only as powerful as the preparation behind it.

Descriptions and synonyms help the AI understand your model. Ontology diagrams clarify business relationships. Meanwhile, structured instructions guide the agent’s decision-making.

Together, these three steps transform a struggling agent into a reliable analytics assistant.

Start with one focused implementation. Build a specialized Fabric data agent, refine it, and expand from there.

When done correctly, teams often see faster data request turnaround and higher analytics adoption.

Related Articles

Scroll to Top