Skip to content

How this lab works

This lab turns a rough Power BI semantic model into an AI-ready model while teaching Copilot customization. The same five business questions score 3 of 10 on the baseline model and 10 of 10 after the AI-ready changes. The sample results are in Expected results.

Lab flow from setup to AI-ready validation

Contoso Pharmacy is synthetic. It has 12 fictional stores, four regions, generic medication categories, and fill events from 2024-01-01 to 2025-12-31. The baseline PBIP works, but it isn’t ready for people or agents:

  • It uses source codes such as fact_rx_fill, rgn, and proc_mins.
  • It misses a key Medication relationship.
  • It has weak metadata, no measures, and no AI instructions.
  • Agents answer the five business questions with only partial success.

You use Copilot features to improve the model as code: instructions, path instructions, AGENTS.md, skills, custom agents, handoffs, prompt files, hooks, MCP, Copilot CLI, cloud agent, code review, and APM.

Every lab page uses the same ten sections:

  1. At a glance: time, level, platform, surfaces, primitives, and checkpoints.
  2. Why this matters: the real reason for the lab.
  3. Concepts: terms you’ll use in the steps.
  4. Before you begin: expected start state and catch-up command.
  5. Steps: numbered tasks with UI paths, commands, and observable results.
  6. Verify your work: the deterministic check for that lab.
  7. Troubleshooting: common failure modes.
  8. Knowledge check: short multiple-choice questions.
  9. Recap and next: what changed and where to go next.
  10. Go further: optional practice.

Each step ends with You should see: and a tick box. Tick boxes are saved in your browser’s localStorage, so they are local to one browser profile. The /progress/ page reads the same local progress.

The progress check is deterministic. Run it from the repo root:

Terminal window
pwsh ./scripts/lab/Test-LabProgress.ps1 -Lab 07

Each lab page’s Verify your work section shows the exact command. A failed check prints a hint and links back to the step that fixes it. The check contract lives in lab/checks.yaml, and the implementation lives in tools/python/pharmacy_demo/labcheck/checks.py.

For full repo validation, run:

Terminal window
pwsh ./scripts/Invoke-Validation.ps1

If you skip a lab, get stuck, or need a clean model state, use a checkpoint from the upstream repo:

Terminal window
pwsh ./scripts/lab/Restore-LabCheckpoint.ps1 -Checkpoint lab07-complete

Checkpoint restore needs the upstream remote from Lab 01. It restores fabric/ and lab samples, then creates ignored outputs when needed. It doesn’t overwrite your custom instructions, agents, skills, or prompts.

Agents may choose a different order, wording, or intermediate DAX. That is normal. What matters is the final repo state and validation output.

Everything in data/generated/ is synthetic. There are no patients, prescribers, members, addresses, real store names, tenant IDs, workspace IDs, service principals, or credentials. Don’t add real data or screenshots with real account details.

Use the feedback link at the bottom of each lab. Include the lab number, step number, OS, tool versions, what you expected, and what you saw. If the issue is about a generated reference page, say which file or script produced it.