AGENT SKILL

Copilot Studio 评估测试集生成

create-eval-set

创建一个测试集 CSV 文件,用于导入 Copilot Studio 的产品内 Evaluate(评估)标签页。读取智能体的主题、指令和知识源,生成带有合适评分器(如通用质量 General quality、语义比较 Compare meaning、精确匹配 Exact match 等)的有意义测试用例。当用户要求为其智能体创建、准备或生成评估测试用例时使用。

适用职业测试工程师
License 许可
MIT
最近更新
2026-11-12
Stars
★ 493
Forks
103

01 前言 Front Matter

agent
copilot-studio-test
context
fork
description
Create a test set CSV file for import into Copilot Studio's in-product Evaluate tab. Reads the agent's topics, instructions, and knowledge sources to generate meaningful test cases with appropriate graders (General quality, Compare meaning, Exact match, etc.). Use when the user asks to create, prepare, or generate evaluation test cases for their agent.
allowed-tools
Read, Glob, Grep, Write
user-invocable
false

03 SKILL.md 正文

Create Evaluation Test Set

Create a test set CSV file that can be imported into Copilot Studio's Evaluate tab for in-product agent evaluation.

Phase 1: Understand the Agent

Read the agent's YAML files to understand what it does:

  1. Glob: **/agent.mcs.yml — find the agent
  2. Read agent.mcs.yml — get the agent's instructions, description, and capabilities
  3. Read settings.mcs.yml — check orchestration mode (generative vs classic)
  4. Glob: **/topics/*.mcs.yml — list all topics
  5. Read key topics (especially non-system ones) — understand trigger phrases, conversation flows, expected behaviors
  6. Check for knowledge sources, actions, and connected tools

Phase 2: Design Test Cases

Create test cases that cover:

Category What to test Example
Core functionality Main topics and capabilities Questions matching trigger phrases
Knowledge/generative Knowledge source responses Questions the agent should answer from its knowledge
System topics Greeting, Escalation, Goodbye, Thank You, Fallback "Hi", "I want to speak to a person", "Goodbye"
Edge cases Out-of-scope, ambiguous, off-topic "Tell me a joke", "Book a flight for me"
Boundary testing Things the agent should NOT do Actions beyond its capabilities

Aim for 10–25 test cases with good coverage across categories.

Phase 3: Write the Expected Responses

The CSV import only supports two columns: question and expectedResponse. Test methods cannot be set via CSV import — they are configured in the UI after import. The default test method (General quality) is applied to all imported test cases.

Write expected responses with this in mind:

  • For questions where you want General quality grading: write behavioral descriptions ("The response should recommend hotels in Paris with relevant details")
  • For questions where you'll later switch to Compare meaning or Exact match in the UI: write realistic agent replies that the grader can compare against
  • Leave expectedResponse empty for questions that only need General quality (it works without expected responses)

Available test methods (configured in UI after import)

Test method What it measures Requires expected response?
General quality (default) AI-graded quality: relevance, completeness, groundedness, abstention No (but recommended as a rubric)
Compare meaning Semantic similarity — compares meaning/intent Yes
Text similarity Cosine similarity of text Yes, configurable pass threshold
Exact match Character-for-character match Yes
Keyword match Response contains expected keywords/phrases Yes (keywords added in UI)
Capability use Agent called expected tools/topics Configured in UI
Custom Custom grader with your own instructions and labels Configured in UI

Phase 4: Write the CSV

Write the CSV file using the Write tool. The format must be:

"question","expectedResponse"
"User question here","Expected agent response or behavioral rubric"
"Question without expected response",

Column specification

Column Required Description
question Yes The user message to send to the agent. Max 1,000 characters.
expectedResponse No The expected response or behavioral rubric. Leave empty if not needed.

Important: The Testing method column is not supported on import — it is ignored. All imported test cases get the default test method (General quality). Configure other test methods in the UI after import.

Rules

  • Max 100 questions per test set
  • Max 1,000 characters per question (including spaces)
  • File must be .csv format
  • Use double quotes around all values
  • For questions that will use General quality: write expected responses as behavioral descriptions
  • For questions that will use Compare meaning or Exact match: write expected responses as realistic agent replies

Expected response examples

Behavioral rubric (for General quality):

"Find me a hotel in Paris","The response should include hotel recommendations in Paris with relevant details like names, locations, or prices."

Realistic reply (for Compare meaning — set method in UI after import):

"Hi there","Hello! How can I help you today?"

Exact expected text (for Exact match — set method in UI after import):

"What is 2+2?","4"

Phase 5: Instruct the User

After writing the CSV, tell the user:

To import into Copilot Studio:

  1. Open your agent in Copilot Studio
  2. Go to the Evaluate tab
  3. Click New evaluation > Single response
  4. Drag or browse for the CSV file
  5. Review the imported test cases and adjust if needed
  6. Optionally add more test methods (Capability use, Custom) in the UI
  7. Click Evaluate to run, or Save to run later

After import, some things can only be configured in the UI:

  • Pass thresholds for Compare meaning and Text similarity
  • Keywords for Keyword match test cases
  • Expected capabilities for Capability use test cases
  • Custom grader instructions and labels

04 同仓库更多 Skills

microsoft
microsoft/skills-for-copilot-studio

Copilot Studio YAML 校验

validate

使用 LSP 二进制文件的完整诊断能力(YAML 结构、Power Fx、schema、跨文件引用)校验 Copilot Studio 智能体的 YAML 文件。当用户要求检查、验证或核对 YAML 文件时使用。

AI 工程师智能体开发
★ 493
microsoft
microsoft/skills-for-copilot-studio

Copilot Studio 测试身份验证

test-auth

为 Copilot Studio 评估 API 和 SDK 聊天进行身份验证。缓存一个在 run-eval 和 chat-sdk 技能之间共享的令牌。在任何评估或 SDK 聊天工作流之前运行此技能。要求使用具有 MakerOperations 和 Copilots.Invoke 权限的 App Registration。

AI 工程师智能体开发
★ 493
microsoft
microsoft/skills-for-copilot-studio

Copilot Studio Kit 批量测试

run-tests-kit

通过 Copilot Studio Kit (Dataverse API) 运行批量测试套件。使用 Power CAT Copilot Studio Kit 对已发布的智能体执行测试用例,并生成包含延迟的通过/失败结果。要求环境中已安装 Kit、具有 Dataverse 权限的 App Registration,以及已发布的智能体。

AI 工程师测试与质量保障
★ 493
microsoft
microsoft/skills-for-copilot-studio

Copilot Studio 智能体评估运行

run-eval

通过 Power Platform Evaluation API 对 Copilot Studio 智能体运行评估。适用于草稿(DRAFT)智能体——无需发布步骤。列出测试集、启动运行、轮询直至完成、获取结果,并针对失败提出 YAML 修复建议。当用户希望在不发布的情况下测试智能体更改时使用。

AI 工程师智能体开发
★ 493
microsoft
microsoft/skills-for-copilot-studio

Copilot Studio 主题创建

new-topic

创建一个新的 Copilot Studio 主题(topic)YAML 文件。当用户要求为其智能体创建新主题、对话流程或对话框时使用。

AI 工程师智能体开发
★ 493
microsoft
microsoft/skills-for-copilot-studio

Copilot Studio 智能体管理

manage-agent

通过 VS Code 扩展的 LanguageServerHost LSP 二进制文件推送/拉取 Copilot Studio 智能体内容。处理身份验证(推送/拉取使用交互式浏览器登录,聊天令牌使用设备代码流)、同步推送、同步拉取、克隆和差异比较操作。

AI 工程师智能体开发
★ 493