14.1 Create a Test Set
Key Takeaways
- A test set is a reusable collection of test cases that Copilot Studio runs as a batch against your agent so you can measure quality objectively instead of relying only on ad-hoc test chat.
- Single-response test sets support up to 100 unconnected questions; conversational test sets support multi-turn scenarios with a smaller case cap (up to 20) for longer interactions.
- You can create cases manually, import Question/Expected response CSV files, generate questions with AI from instructions and knowledge, pull from test chat, or seed from analytics themes.
- Expected answers (or keywords/tools) are required for match, similarity, compare-meaning, keyword, and tool-use methods; missing expectations produce Invalid results for those methods.
- Treat coverage of intents, tools, knowledge sources, edge cases, and responsible-AI refusals as a design task: a golden set is curated expected behavior, not a random pile of prompts.
Why creating a test set matters on AB-620
Create a test set is the first skill under Evaluate agent performance in Domain 3 (Test and manage agents, about 20–25% of AB-620). Microsoft does not treat evaluation as optional polish. Enterprise agents that call tools, ground on knowledge, and serve internal or external users need a repeatable way to prove quality before publish and after every material change.
Agent evaluation is automated, structured testing: you define test cases, group them into a test set, run the set against the agent, and score each response with one or more test methods (graders). That is different from the authoring test chat, which is interactive and useful for exploration but weak as regression evidence because it is hard to rerun the same suite after every topic, knowledge, or tool change.
Core vocabulary
| Term | Meaning in Copilot Studio evaluation |
|---|---|
| Test case | One simulated user message (or multi-turn conversation unit) plus optional expected response, keywords, or expected tools/topics |
| Test set | A named group of test cases you run together as one evaluation |
| Expected response | The answer (or meaning target) you believe is correct for grading methods that need a reference |
| Golden set | A curated subset of high-value cases with trusted expected outcomes used as the quality bar for releases |
| Evaluation run | One execution of a test set against the current agent configuration; runs are saved so you can compare over time |
| User profile | Authenticated identity/connections used when the agent must access resources as a user |
When you run an evaluation, Copilot Studio sends the questions, records the agent’s responses, compares them to expectations or quality criteria, and scores each case. You can inspect the transcript, activity map, and which resources the agent used—details that ad-hoc chat rarely captures consistently.
Single-response vs conversational test sets
Choose the set type based on what behavior you need to prove:
| Attribute | Single-response test set | Conversational test set |
|---|---|---|
| Interaction model | One unconnected question at a time | Multi-turn conversation behavior |
| Typical use | Exact wording, tool selection, FAQ grounding, short factual answers | Context carry-over, clarification flows, multi-step assistance |
| Capacity (product guidance) | Up to 100 test cases per set | Up to 20 test cases per set |
| Methods | Broad support for match, similarity, tool use, quality, custom, and related graders | Quality, keyword, custom, and other methods that support conversations |
Exam framing: If the stem says “validate that order status always invokes the REST tool and returns the same SKU code format,” think single-response with tool-use and exact/keyword graders. If the stem says “confirm the agent remembers the employee’s location across three turns before recommending a policy,” think conversational evaluation.
How to create a single-response test set (product path)
- Open the agent in Copilot Studio and go to the Evaluation page (or Evaluate tab depending on UI density).
- Select New evaluation → Single response.
- Choose how to populate cases (see creation methods below).
- Name the test set clearly (for example
HR-policy-golden-v3orOrder-status-regression). - Add or adjust test methods and expected answers as required.
- Save, then Evaluate, or save first and run later from Recent results.
Important operational limit: test results are retained in Copilot Studio for 89 days. Export to CSV if you need longer evidence for audits, change boards, or ALM gates.
Ways to populate test cases
Microsoft supports multiple authoring paths so you do not have to invent every prompt by hand:
| Method | What it does | Best for |
|---|---|---|
| Quick question set | AI generates about 10 questions from description, instructions, and capabilities | Fast smoke tests; seed for a larger set |
| Full question set | AI generates more questions from knowledge sources or topics; you choose volume | Broader coverage of published knowledge and topic design |
| Test chat conversation | Pulls questions from the latest test chat (or start evaluation from the evaluate control in chat) | Capturing real maker-discovered failure prompts |
| Import file | Spreadsheet/CSV upload of questions (and optional expected responses) | Golden sets managed outside the product; bulk authoring |
| Write yourself | Manual case entry and edit | Precise legal wording, edge cases, adversarial prompts |
| Analytics themes | Seed from production theme patterns in agent analytics | High-volume real user intents after go-live |
CSV / spreadsheet import shape
For import files, Microsoft’s template pattern uses two columns in order:
- Question
- Expected response
Rules that show up in both product docs and exam-style questions:
- Each question is limited to about 1,000 characters including spaces.
- Save as .csv or .txt (or follow the downloadable template under the data-source step).
- Expected response is optional at import, but you need expected responses (or keywords/tools, depending on method) to run exact match, text similarity, compare meaning, and related reference-based methods. Without them, those methods return Invalid for the case.
Designing coverage: intents, tools, knowledge, and risk
A weak test set is a list of happy-path FAQs. A exam-ready and production-ready set is a coverage matrix. Build cases across at least these dimensions:
| Coverage dimension | Example cases |
|---|---|
| Primary intents | Top business questions the agent is funded to answer |
| Knowledge grounding | Questions whose answers must come from a specific source (SharePoint, Azure AI Search, connector knowledge) |
| Tool / topic selection | Prompts that should call a REST tool, MCP tool, custom connector, agent flow, or specific topic |
| Negative / out-of-scope | Requests the agent must refuse, redirect, or escalate |
| Ambiguous phrasing | Paraphrases of the same intent to catch brittle topic triggers |
| Edge formats | Short codes, policy numbers, currency, dates, multilingual variants if in scope |
| Responsible AI / safety | Jailbreak-style or sensitive requests your RAI strategy should block or de-escalate |
| Multi-agent handoff (if designed) | Questions that should route to Fabric, Foundry, or peer agents |
Golden set discipline: Mark a smaller core of cases (often dozens, not necessarily the full 100) as release-blocking. Those cases get human-reviewed expected answers, stable naming, and ownership. Use broader AI-generated cases for discovery; promote only proven cases into the golden set.
Expected answers that grade well
Writing expected answers is part of test design, not an afterthought:
- For exact match, keep answers short and deterministic (“24 hours”, “SKU-1044”, “Contact HR at hr@contoso.com”).
- For compare meaning or general quality, write the intent of a correct answer in clear prose; do not over-constrain wording if paraphrase is acceptable.
- For keyword match, list the mandatory terms (policy name, legal phrase, product code) rather than a full essay.
- For tool use, select the expected tools/topics per case (or bulk-edit when every case shares the same tool expectation).
User profiles and connections
Many enterprise agents behave differently based on identity and connected systems. When creating or editing a test set, you can attach a user profile and verify connections (green/active vs broken). Automated evaluation uses that profile’s authentication. You can run some tests without a profile, but if the agent needs knowledge tools or connectors that require auth, a broken profile produces failed or invalid runs rather than trustworthy quality signal.
Scenario: Contoso employee benefits agent
Contoso builds a Copilot Studio benefits agent with SharePoint knowledge, a custom connector for enrollment status, and a topic for “open enrollment deadlines.”
- Maker creates a single-response test set named
Benefits-golden-2026. - Imports 40 CSV questions covering plan options, deadlines, and out-of-scope payroll tax advice.
- Adds expected responses for factual cases and expected tool use for enrollment-status questions.
- Generates a quick question set of 10 more prompts from instructions, then deletes duplicates and weak generic items.
- Pulls three failing prompts from test chat into the set after a pilot.
- Tags twelve cases as the golden gate for pipeline promotion; keeps the rest as exploratory coverage.
- Documents that results will be exported weekly because stakeholders need longer than 89 days of history.
Exam traps for create-a-test-set
- Confusing test chat with a test set—only the latter is the evaluation batch artifact.
- Assuming every method works without expected responses—many return Invalid without them.
- Designing only positive FAQs and forgetting tool, refusal, and knowledge-miss cases.
- Ignoring single-response vs conversational limits when the scenario clearly needs multi-turn context.
- Never naming or versioning sets, so regression comparison becomes impossible.
Checklist before you leave this skill
- Can you define test case, test set, expected response, and golden set in one sentence each?
- Can you list at least four ways to create cases (manual, CSV, AI generate, test chat, themes)?
- Do you know the approximate case caps for single-response vs conversational sets?
- Can you design a coverage matrix across intents, tools, knowledge, and safety?
- Do you remember 89-day result retention and CSV export for longer evidence?
A team wants automated regression for 80 short FAQ prompts where each prompt is independent and should not depend on prior turns. Which Copilot Studio evaluation construct is the best primary fit?
Which import file pattern matches Microsoft’s documented spreadsheet template for building evaluation cases?
Why should makers treat a golden set differently from a large AI-generated exploratory question set?