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.
flowchart LR A[Set up tools] --> B[Clone your copy] B --> C[Inspect baseline] C --> D[Customize Copilot] D --> E[Assess and improve model] E --> F[Test business questions] F --> G[Review, cloud agent, extend] B --> H[Restore checkpoints when needed] H --> E
The story
Section titled “The story”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, andproc_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.
How lab pages are structured
Section titled “How lab pages are structured”Every lab page uses the same ten sections:
- At a glance: time, level, platform, surfaces, primitives, and checkpoints.
- Why this matters: the real reason for the lab.
- Concepts: terms you’ll use in the steps.
- Before you begin: expected start state and catch-up command.
- Steps: numbered tasks with UI paths, commands, and observable results.
- Verify your work: the deterministic check for that lab.
- Troubleshooting: common failure modes.
- Knowledge check: short multiple-choice questions.
- Recap and next: what changed and where to go next.
- 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.
Verification is the source of truth
Section titled “Verification is the source of truth”The progress check is deterministic. Run it from the repo root:
pwsh ./scripts/lab/Test-LabProgress.ps1 -Lab 07Each 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:
pwsh ./scripts/Invoke-Validation.ps1Checkpoints help you catch up
Section titled “Checkpoints help you catch up”If you skip a lab, get stuck, or need a clean model state, use a checkpoint from the upstream repo:
pwsh ./scripts/lab/Restore-LabCheckpoint.ps1 -Checkpoint lab07-completeCheckpoint 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.
Agent output varies
Section titled “Agent output varies”Agents may choose a different order, wording, or intermediate DAX. That is normal. What matters is the final repo state and validation output.
Synthetic data notice
Section titled “Synthetic data notice”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.
Where to give feedback
Section titled “Where to give feedback”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.