MSBA-249 · Lesson 5 of 12 · 19 min

Domain review: testing and managing agents

▶ Video coming soon A video version of this lesson is on the way.

Domain 3 was the part of the exam Yusra had lived through most recently. In October and November 2026 she had moved the Policy Service Assistant into a solution with the qib publisher prefix, built evaluation test sets that gated each release, run releases 1.3.0 to 1.7.2 through a two-stage pipeline, and rolled back 1.6.0 when an endorsement change broke a driver lookup. Her practice assessment score on this domain was her best. Bram still gave it a full session. "You know how your pipeline works," he said. "The exam asks how pipelines work. When those differ, the exam wins."

This lesson reviews domain 3, Test and manage agents, weighted 25 to 30 percent in the December 18, 2026 outline. Its share increased in the change log, and its two objective groups changed only slightly. The detail is in MSBA-242, especially its lessons on evaluations and test sets, measuring answer quality, solutions and environment strategy, and pipelines and application lifecycle management.

Evaluate agent performance

The first group has four bullets: create a test set, choose an evaluation method, review test results, and evaluate AI model candidates for an agent. Copilot Studio's agent evaluation feature, which Microsoft announced as generally available in 2026, is the tool behind all four.

A loop with four steps: create a test set, choose evaluation methods, run and review results, change the agent or model. An arrow from the last step returns to running the same test set.
The evaluation loop: the same test set is run again after every change.

Test sets. A test set holds the questions or conversations the agent is judged on. In late 2026 a test set could hold up to 100 cases and could be either single-response cases or conversation cases. Builders could create one in several ways: a quick set of 10 generated cases, a fuller set generated from the agent's knowledge or topics, a set captured from the test chat, an imported CSV or text file of up to 100 questions of up to 1,000 characters each, or cases written by hand. Generated sets are fast; hand-written and imported sets let the team include the hard cases they care about. Quillfield's release gate used both kinds.

Evaluation methods. Each case is scored by one or more methods, and choosing the method is an objective in its own right. The question is always: what does a correct answer look like for this case?

MethodWhat it checksGood for
General qualityRelevance, groundedness, completeness and appropriate abstention, judged by a modelOpen questions where many good answers exist
Compare meaningWhether the answer means the same as an expected answer; default pass mark 50Questions with one correct answer that can be phrased many ways
Text similarityCloseness of wording to an expected answer, on a 0 to 1 scaleAnswers that should follow set wording
Exact matchIdentical textCodes, numbers, fixed responses
Keyword matchWhether any or all listed keywords appearAnswers that must mention particular terms
Tool useWhether the expected tool was calledAgents that must take an action, not just reply
Content safetyHarmful content, scored 0 to 7Public agents and sensitive topics
CustomYour own instructions and labelsOrganization-specific rules

A common exam scenario describes an agent that must create a change request and asks how to confirm it does so. The answer is the tool use method, because a well-worded reply without the tool call is a failure. Another describes policy wording that must be repeated precisely, which points to text similarity or exact match rather than general quality. If an expected value is missing for a method that needs one, the result is reported as invalid rather than as a pass or fail, which is a detail worth remembering.

Reviewing results. Evaluation runs as the signed-in user, so results reflect that person's access to knowledge and tools. Results were kept for 89 days in late 2026 and could be exported as CSV. Reviewing means more than reading the pass rate: open the failed cases, read the agent's reasoning and the sources it used, decide whether the agent or the test case is wrong, and fix the right one. Quillfield's rule was that a release could go to production only if no case that passed in the previous release now failed.

Evaluating model candidates. When Microsoft adds a model or a team wants a cheaper or faster one, the safe way to change is to run the same test set against the agent with each candidate model and compare. Quality, cost per conversation and response time all matter. This objective pairs with domain 1's model selection bullet: a scenario may ask what to do before switching models, and the answer is to evaluate the candidate against the existing test set.

Implement ALM for agents in Copilot Studio

The second group has four bullets: create a solution, add existing agents to a solution, create and use environment variables, and implement and extend pipelines in Microsoft Power Platform. MSBA-242's lessons on solutions and environment strategy and on pipelines cover each in detail.

Three environments in a row: Development (unmanaged solution), Test (managed), Production (managed). A pipeline host environment above them. Arrows show the solution deployed from development to test, then to production, with an approval gate before production and environment variables set per environment.
Application lifecycle management for agents: a solution moves through managed environments by a pipeline, with values set per environment.

Solutions. A solution is the container that carries an agent and its parts between environments. Create it in the development environment with a custom publisher whose prefix identifies your organization; Quillfield used qib. The agent, its custom connectors, connection references, environment variables, Dataverse tables, workflows and prompts all go into it. Downstream environments receive the solution as managed, so nobody edits production directly.

Adding existing agents. Agents built outside a solution, as many first pilots are, can be added to one afterwards. When you add an agent, check that its dependencies come with it: a missing connection reference or table will fail the import in the next environment. The solution checker and the dependency view help.

Environment variables. Values that differ between environments, such as a SharePoint site address, an API base URL or an approval group, belong in environment variables. The pipeline asks for the value in each target environment, so the same solution works everywhere without edits. A scenario that says a test agent "keeps writing to the production site" points to a hard-coded value that should be an environment variable.

Pipelines. Power Platform pipelines deploy a solution through stages. In late 2026 the pipeline host had to be a production-type environment that was not itself a development or target environment; targets had to be managed environments, with developer environments excepted and a notice period that began in October 2026; the same artifact was deployed to every stage; and delegated deployments let a service principal or owner deploy with approvals. Pipelines validate connection references and environment variables before deploying, and a previous version can be redeployed if that option is enabled, which is how Quillfield rolled back 1.6.0. Extending a pipeline means adding gates or steps, such as requiring evaluation results before the production stage.

Scenario detailALM answer
Agent works in test but uses the wrong site in productionUse an environment variable for the site address
Import fails because a connector is missingAdd the connector and its connection reference to the solution
Someone edited the agent directly in productionDeploy managed solutions downstream and restrict maker roles in production
Need approval before production deploymentAdd an approval gate or delegated deployment with approvers to the pipeline
A release broke somethingRedeploy the previous version if the pipeline allows it, then fix in development

Beyond the bullets

MSBA-242 also covered analytics, transcripts, data loss prevention, capacity monitoring, security and retirement. Those are not separate objectives in the December outline, but they appear inside scenarios. Analytics in late 2026 excluded test pane conversations, kept data for up to 360 days with session details for 28 days, and could take up to an hour to update. Capacity was managed in the Power Platform admin center, with per-environment allocations and optional per-agent limits. You do not need every number, but you should know where to look and why a number might differ from what a builder expects.

Worked problem

A release gate question

A team's agent must always call the CreateCase tool when a user reports a lost card, and its answers about card fees must repeat the fee schedule wording exactly. They want to stop any release reaching production if either behavior breaks. What should they set up?

Show solution
  1. Create a test set with lost-card conversations and fee questions, including expected answers.
  2. Use the tool use method on the lost-card cases, because the action matters more than the wording.
  3. Use exact match or text similarity on the fee cases, because the wording must be precise.
  4. Run the test set in the test environment after each deployment.
  5. Add a gate to the pipeline that requires the evaluation results before the production stage.

Answer: A test set scored with tool use and exact match or text similarity, run in test and required by a pipeline gate before production.

Reading an evaluation run

Exam questions on evaluation rarely ask for a definition. They show a result and ask what to do next. Bram used Quillfield's own history to practice this. Release 1.6.0 of the Policy Service Assistant had passed its general quality cases comfortably, but three tool use cases on driver lookups had failed, and the team had released anyway because the overall pass rate looked healthy. The rollback that followed was the lesson.

What the run showsWhat it usually meansNext step
High overall pass rate, a few tool use failuresThe agent answers well but skips an actionTreat tool use failures as blocking; check the tool description and instructions
Many invalid resultsExpected answers are missing for methods that need themAdd expected answers or switch those cases to general quality
Failures only for one userEvaluation runs as the signed-in user, who lacks accessRun as a user with the intended access, or fix the access
A case that passed last release now failsA regressionBlock the release until it is understood
Every case on one topic failsA missing or unindexed knowledge sourceCheck the source status and indexing

Two habits help. First, read failures by method, not only by total. A pass rate is an average, and averages hide the one failure that matters. Second, decide whether the agent or the test case is wrong before fixing anything. A test case with an out-of-date expected answer should be corrected, not used as a reason to change a correct agent.

Where domain 3 meets domain 1

Several domain 3 objectives connect to domain 1 objectives, and scenario questions often cross the line. Model choice is configured in domain 1 and evaluated in domain 3. Instructions are written in domain 1 and their effect is measured in domain 3. Environment variables are created in domain 3 but must be planned for when the agent is designed, which is part of planning reusable components in domain 1. When a question seems to belong to two domains, answer it from the lifecycle: what would a careful team do first, and what would they check afterwards?

Yusra found this framing useful for the questions that had felt ambiguous. A question about changing a model was really a question about testing first. A question about moving an agent between environments was really a question about having planned the values that change. Once she asked what came first, the right option was usually clear.

A quick self-check for domain 3

Before leaving this domain, Yusra tested herself with five prompts, answering each aloud in under a minute. Which method checks an action? Which methods compare wording? What happens to a case with a missing expected answer? Why does production receive a managed solution? Where does a value that changes per environment belong? If any answer took longer than a minute, she marked it for review in week 6 of her plan. The prompts are deliberately short, because the exam gives you about two minutes per question, and much of that goes on reading the scenario rather than recalling the fact.

Common mistakes

  • MistakeUsing general quality to check that an action was taken.

    InsteadUse the tool use method; a good reply without the tool call is still a failure.

  • MistakeSwitching models and then testing.

    InsteadEvaluate candidate models with the existing test set before switching.

  • MistakeHard-coding environment-specific values in the agent.

    InsteadUse environment variables and set them per environment through the pipeline.

  • MistakeDeploying unmanaged solutions to production.

    InsteadDeploy managed solutions downstream so production cannot be edited directly.

  • MistakeExpecting test pane conversations to show in analytics.

    InsteadAnalytics excluded test pane sessions in late 2026; use evaluation results for testing.

Summary and key terms

  • Domain 3, test and manage agents, is 25 to 30 percent of the December 2026 outline.
  • Evaluation covers test sets of up to 100 cases, a choice of methods, review of results and comparing model candidates.
  • Choose methods by what a correct answer looks like: meaning, wording, keywords, tool use, safety or custom rules.
  • ALM covers solutions with a custom publisher, adding existing agents, environment variables and Power Platform pipelines.
  • Pipelines deploy the same managed artifact through stages, validate connections and variables, and can add gates and approvals.
  • Analytics, capacity and data policies appear inside scenarios even though they are not separate objectives.
Test set
A collection of up to 100 cases that an agent is evaluated against.
Evaluation method
The way a test case is scored, such as compare meaning or tool use.
Solution
The container that carries an agent and its components between environments.
Managed solution
A solution that cannot be edited in the environment it is installed in.
Environment variable
A solution component holding a value that differs between environments.
Pipeline
A Power Platform feature that deploys a solution through stages such as test and production.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. What are the four bullets in the evaluate agent performance group?

    Show answer

    Create a test set, choose an evaluation method, review test results, evaluate AI model candidates.

  2. Which evaluation method confirms the agent called a particular tool?

    Show answer

    Tool use.

  3. A test agent writes to the production SharePoint site. What is the fix?

    Show answer

    Store the site address in an environment variable and set it per environment.

  4. Why should downstream environments receive managed solutions?

    Show answer

    So no one can edit the agent directly there; changes come only through the pipeline.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz