Data Analytics
  • All of Microsoft
  • Python
  • My Role
    • All in My Role
    • Data Analytics
  • Focus
    • All in Focus
    • Microsoft Fabric
    • What's Hot
    • M365 Release
  • Security & Identity
Timespan
explore our new search
Power BI agents: build from a spec, not a long prompt
Power BI

Power BI agents: build from a spec, not a long prompt

by HubSite 365 about Guy in a Cube

Power BI teams can guide an AI agent with a clear spec, project files, version control and validation instead of relying on one elaborate prompt.

Key insights

  • The workflow uses Power BI Project files (PBIP) and TMDL so an agent can read model and report files as text.
  • A spec sets clear completion criteria for the model, measures, validation and report.
  • Git provides a way to commit approved changes and roll back changes that are not wanted.
  • The described toolchain includes GitHub Copilot CLI, Fabric skills, a Power BI authoring skill and a report CLI.
  • Measure validation compares results with expected values using a 0.1% tolerance.

Power BI agents can build a semantic model, measures and a report from a written specification, reducing reliance on a single long prompt. This approach is aimed at Power BI developers and data teams who want to use an AI agent while retaining control over requirements and changes. Guy in a Cube demonstrates a workflow based on project files, Git, agent skills, a specification and validation.

What it does

The central idea is to treat an agent-assisted Power BI project as a sequence of defined work items, not as a request to generate a finished report from one prompt. The specification explains what the result should contain and how the team will decide whether each part is complete. That gives the agent more structured guidance than a broad instruction to create a model or report.

The workflow starts with Power BI Project files, or PBIP, and TMDL. These formats represent model and report content as text that an agent can read. The project also uses Git in Visual Studio, so a developer can commit changes they approve and roll back changes they do not want to keep.

Agent skills and instructions play different roles in the process. The demonstration describes team standards as skills and agent instructions, including an agents.md file: skills capture house rules, while instructions provide the agent’s cookbook for the work. The toolchain named includes GitHub Copilot CLI, Fabric skills, a Power BI authoring skill and a report CLI.

Who it is for and what you need

This process is relevant to people who author or maintain Power BI semantic models and reports, especially teams already comfortable working with project files and version control. It is not just a way for report consumers to ask questions of an existing report; the described agent is used to create and revise project artifacts from a specification.

The starting point is a project brief that is specific enough to define the model, measures, checks and report. The demonstration’s materials include a database, a report sketch, a spec, skills and agent instructions. Together, these give the agent data and design context, team conventions, and criteria for assessing the output.

The workflow relies on GitHub Copilot CLI and the named skills and command-line tooling. It also relies on a Git repository if you want to review, commit and undo changes as described. The approach is therefore most useful when someone can inspect the generated project and validate its behavior, rather than treating the agent’s output as automatically correct.

How it works

  1. Prepare the Power BI project in PBIP and TMDL form. The text-based project content gives the agent material it can inspect and edit while working on the model and report.

  2. Set up version control with Git in Visual Studio. Review the changes the agent makes, commit the work you accept and use rollback when a change does not meet the project’s needs.

  3. Provide the agent with the relevant skills and instructions. The team’s standards belong in reusable skills; agent instructions, including agents.md, guide how the agent should carry out the work.

  4. Write a spec with explicit “done when” criteria. Cover the model and relationships, measures, validation expectations and report deliverable. A report sketch can communicate the intended layout, but the spec should define the requirements the agent must satisfy.

  5. Run the work task by task: first the model and relationships, then measures, validation and the report. This breaks a broad request into stages where you can review the result before moving forward.

  6. Validate measures against expected values. The described check uses a 0.1% tolerance. If validation fails, investigate and correct the issue before relying on the measures or proceeding as if the work were complete.

  7. Inspect the report against the sketch and the written requirements. The workflow includes comparing the agent-built report with the sketch, then deciding which changes to accept into the project.

This structure changes where the effort goes: rather than trying to make one prompt anticipate every detail, the team writes requirements, supplies reusable standards and checks outputs at each stage. The prompt still matters as part of the agent’s instructions, but the spec and project context carry much of the work.

Limitations and alternatives

An agent can produce work that fails its own acceptance checks. In the demonstrated sequence, validation failed, making validation a substantive project step rather than a final formality. A measure that looks plausible is not enough; compare it with expected values before accepting it.

Likewise, a report sketch is guidance, not proof that the resulting report meets the specification. Review the agent’s result against both the intended design and the stated requirements. Git helps manage changes, but it does not replace that review: it gives the team a way to preserve accepted work and reverse unwanted edits.

The practical alternative to a spec-led workflow is to keep refining a large prompt. The described approach instead distributes instructions across a structured spec, project files, skills and agent instructions, then divides implementation into reviewable tasks. It does not remove the need for human decisions about requirements, validation or which changes to keep.

Sources

Frequently asked questions

How can an AI agent build a Power BI report from a spec?

Use PBIP and TMDL project files, provide agent skills and instructions, and write completion criteria for the model, measures, validation and report. Run the work in tasks and review each result.

Why use Git with a Power BI agent?

Git lets you commit changes you approve and roll back changes you do not want to keep. The workflow uses Git in Visual Studio.

How should you validate measures created by a Power BI agent?

Compare measure results with expected values. The described workflow uses a 0.1% tolerance and treats failed validation as something to investigate before accepting the work.