M365 Agent Evaluator
MicrosoftOfficialPublished by Microsoft
- Skill
- Tool integration
- Software development
- MIT
- Low risk
From the skill’s files
Taken from the skill’s own files (its description, section headings and stated usage). Not an AutoGineer summary, and not written by the author as one.
Use this skill when a user wants to create, run, or analyze evaluation suites for Microsoft 365 Copilot declarative agents with the public @microsoft/m365-copilot-eval CLI. Trigger on intents such as "evaluate my agent", "test my agent", "run my evals", "create eval prompts", "add multi-turn tests", "tune evaluator thresholds", "why is my agent failing", or "set up eval environment variables". Use this skill to help users evaluate Microsoft 365 Copilot declarative agents with @microsoft/m365-copilot-eval. The skill designs schema-compatible eval datasets, runs the public preview CLI, analyzes results, and recommends targeted fixes.
What it does
- Always use this CLI invocation
- Activation workflow
- Current dataset contract
- Public evaluator names
- Common commands
- Version and PATH safety
When to use it
- Use this skill when a user wants to create, run, or analyze evaluation suites for Microsoft 365 Copilot declarative agents with the public @microsoft/m365-copilot-eval CLI.
- Trigger on intents such as "evaluate my agent", "test my agent", "run my evals", "create eval prompts", "add multi-turn tests", "tune evaluator thresholds", "why is my agent failing", or "set up…
- Identify the user goal: setup, dataset authoring, running evals, analyzing results, or updating an existing eval suite.
- Load only the reference needed for the current goal:
- references/workflow.md for the end-to-end operator workflow and CLI commands.
- references/azure-setup.md for prerequisites, env files, and secret handling.
Advantages
The skill’s files do not state this.
Usage examples
The skill’s files do not state this.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/microsoft/m365-agent-evaluator/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip m365-agent-evaluator.zip -d .agents/skills
Documentation by Microsoft
M365 Agent Evaluator
Use this skill to help users evaluate Microsoft 365 Copilot declarative agents with @microsoft/m365-copilot-eval. The skill designs schema-compatible eval datasets, runs the public preview CLI, analyzes results, and recommends targeted fixes.
Default to Microsoft 365 Agents Toolkit (ATK) projects when detected, but do not hard-stop solely because the current directory is not ATK. The CLI can also evaluate deployed agents with an explicit M365_AGENT_ID or --m365-agent-id.
Always use this CLI invocation
npx -y --package @microsoft/m365-copilot-eval@latest runevalsDo not recommend the old private aka.ms installer, global installs, bare runevals, bare npx runevals, --input, or --html.
Activation workflow
Identify the user goal: setup, dataset authoring, running evals, analyzing results, or updating an existing eval suite.
Load only the reference needed for the current goal:
references/workflow.mdfor the end-to-end operator workflow and CLI commands.references/azure-setup.mdfor prerequisites, env files, and secret handling.references/eval-templates.mdwhen creating or editing eval datasets.references/pra-framework.mdwhen deciding what scenarios to generate.references/result-analysis.mdafter JSON/CSV/HTML results exist.references/guardrails.mdbefore writing files, handling secrets, clearing cache, signing out, or troubleshooting.
Detect project shape:
ATK:
.env.local,.env.local.user,env\.env.local.user,m365agents.yml, orappPackage\declarativeAgent.json.Non-ATK: an eval dataset plus
M365_AGENT_ID,--m365-agent-id, or a named environment file such asenv\.env.dev.
Verify prerequisites without exposing values:
Node.js 24.12.0 or newer.
Microsoft 365 Copilot license and a deployed M365 Copilot agent.
Tenant admin consent for the WorkIQ Client App.
TENANT_ID, Azure OpenAI in Foundry Models endpoint/key, and recommended/defaultgpt-4o-minideployment.
Choose the workflow:
No dataset: create
evals\evals.json.Existing dataset: run, analyze prior results, or propose changes.
Quick check: use inline prompts.
Exploration: use interactive mode.
Current dataset contract
Generate schema version 1.2.0 documents with a root items array. Do not generate the old PromptsObject or root prompts format.
Minimum shape:
{
"schemaVersion": "1.2.0",
"metadata": {
"name": "Agent evaluation suite",
"tags": ["starter"]
},
"default_evaluators": {
"Relevance": {},
"Coherence": {}
},
"items": [
{
"prompt": "What can this agent help me with?",
"expected_response": "The agent explains its supported scope without inventing unsupported capabilities."
}
]
}Use references\prompts-schema.json as the local schema source and references\eval-templates.md for copyable single-turn, multi-turn, evaluator, and threshold examples.
Public evaluator names
Evaluator names are case-sensitive. Use only the public configurable evaluator names unless a newer authoritative source proves otherwise.
| Evaluator | Semantics |
|---|---|
Relevance | LLM score from 1-5; default threshold 3. |
Coherence | LLM score from 1-5; default threshold 3. |
Groundedness | LLM score from 1-5 against context/expected evidence; default threshold 3. |
Similarity | LLM score from 1-5 against expected_response; default threshold 3. |
Citations | Count-based citation check; default threshold 1. |
ExactMatch | Boolean exact string match. |
PartialMatch | String similarity from 0.0-1.0; default threshold 0.5. |
Treat ToolCallAccuracy as legacy/private for authoring. Do not add it to generated datasets unless current public CLI/schema documentation explicitly reintroduces it.
Common commands
# Version/help checks
npx -y --package @microsoft/m365-copilot-eval@latest runevals --version
npx -y --package @microsoft/m365-copilot-eval@latest runevals --help
# First-time setup / EULA
npx -y --package @microsoft/m365-copilot-eval@latest runevals accept-eula
npx -y --package @microsoft/m365-copilot-eval@latest runevals --init-only
# Batch run with explicit JSON output
npx -y --package @microsoft/m365-copilot-eval@latest runevals --prompts-file evals\evals.json --output .evals\results.json
# Human-review HTML or spreadsheet-friendly CSV
npx -y --package @microsoft/m365-copilot-eval@latest runevals --prompts-file evals\evals.json --output .evals\results.html
npx -y --package @microsoft/m365-copilot-eval@latest runevals --prompts-file evals\evals.json --output .evals\results.csv
# Quick checks
npx -y --package @microsoft/m365-copilot-eval@latest runevals --prompts "What can you help me with?" --expected "The agent describes its supported scope."
# Non-ATK or named environment
npx -y --package @microsoft/m365-copilot-eval@latest runevals --prompts-file evals\evals.json --m365-agent-id <agent-id> --env devUse --concurrency only with values 1-5. Start with 1 for debugging and increase only after setup is stable.
Version and PATH safety
Before diagnosing agent behavior, confirm which executable is running:
Get-Command runevals -All
npm list -g @microsoft/m365-copilot-eval --depth=0
npm view @microsoft/m365-copilot-eval version
npx -y --package @microsoft/m365-copilot-eval@latest runevals --version
npx -y --package @microsoft/m365-copilot-eval@latest where runevalsIf bare runevals prints This version of the M365 Evals CLI has stopped working and must be updated, treat it as a stale PATH/global install. Re-run with the npx --package ...@latest command above, then ask before removing global shims with npm uninstall -g @microsoft/m365-copilot-eval.
File conventions
| Path | Purpose |
|---|---|
.env.local | Non-secret ATK config such as M365_TITLE_ID. |
.env.local.user or env\.env.local.user | Local secrets such as tenant ID and Azure OpenAI key. |
env\.env.<environment> | Named environment config for non-ATK or explicit --env workflows. |
evals\evals.json | Source-controlled eval dataset if the user wants it committed. |
.evals\ | Local run outputs; usually gitignored. |
Never print or commit secrets, prompts containing sensitive data, retrieved content, debug logs, or raw result files unless the user explicitly asks and confirms the data is safe to share.
Generation guidance
Use PRA as a scenario-design framework:
Perceive: retrieval, grounding, and source coverage.
Reason: instruction adherence, synthesis, ambiguity handling, and refusal behavior.
Act: declared capability/action behavior. Score with public evaluators such as
Relevance,Coherence,Similarity,ExactMatch, orPartialMatch; do not use legacyToolCallAccuracy.
Ask before overwriting an existing dataset. When writing generated evals, write to a temporary file first and rename on success.
Result analysis guidance
Analyze only evaluator keys that are present. Missing score keys usually mean the evaluator was not configured for that item, not that it failed.
Use current score keys when present: relevance, coherence, groundedness, similarity, citations, exactMatch, and partialMatch. Group failures into likely root causes: instruction issue, grounding issue, citation issue, expected-answer mismatch, capability gap, auth/environment issue, or eval-quality issue.
Do not run real tenant-dependent evals unless the user has provided or approved the necessary tenant, agent, and Azure OpenAI configuration.
Files
- ATTRIBUTION.mdAdded by AutoGineer908 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md7.9 KiB
- examples/analyze-failures.md1.5 KiB
- examples/basic-generation.md1.8 KiB
- examples/iterate-on-changes.md1.3 KiB
- examples/missing-instructions.md1.5 KiB
- examples/not-atk-project.md1.4 KiB
- examples/run-and-analyze.md1.6 KiB
- references/azure-setup.md5.8 KiB
- references/eval-templates.md5.1 KiB
- references/guardrails.md4.1 KiB
- references/output-schema.json4.0 KiB
- references/output-schema.md2.6 KiB
- references/pra-framework.md3.2 KiB
- references/prompts-schema.json15.4 KiB
- references/remediation-patterns.md3.6 KiB
- references/result-analysis.md4.4 KiB
- references/workflow.md6.5 KiB
references/workflow.md
M365 Copilot eval workflow
Use this workflow when the user wants to set up, author, run, or analyze evaluations with the public preview @microsoft/m365-copilot-eval CLI.
Canonical command
Always invoke the CLI through the public npm package:
npx -y --package @microsoft/m365-copilot-eval@latest runevalsDo not use private-preview installers, global installs, bare runevals, bare npx runevals, or retired flags such as --input and --html.
1. Detect project shape
Default to the Agents Toolkit path, but support explicit agent IDs for non-ATK projects.
| Project shape | Signals | Agent ID source |
|---|---|---|
| ATK / Teams Toolkit | .env.local, .env.local.user, env\.env.local.user, m365agents.yml, appPackage\declarativeAgent.json | M365_TITLE_ID from .env.local, or M365_AGENT_ID |
| Non-ATK | Eval dataset plus named env files or explicit CLI args | M365_AGENT_ID or --m365-agent-id |
If no agent ID can be found, ask the user for the deployed M365 Copilot agent ID or tell them to add it to a local env file.
2. Verify local prerequisites
Run safe checks that do not reveal secret values:
node --version
npx -y --package @microsoft/m365-copilot-eval@latest runevals --version
npx -y --package @microsoft/m365-copilot-eval@latest runevals --helpCurrent public docs require Node.js 24.12.0 or newer and describe authentication support as Windows-first. The user also needs a Microsoft 365 Copilot license, a deployed M365 Copilot agent, tenant admin consent for the WorkIQ Client App, and Azure OpenAI in Foundry Models configuration.
Also check for stale global/PATH installs before troubleshooting the agent:
Get-Command runevals -All
npm list -g @microsoft/m365-copilot-eval --depth=0
npm view @microsoft/m365-copilot-eval version
npx -y --package @microsoft/m365-copilot-eval@latest where runevalsIf bare runevals reports This version of the M365 Evals CLI has stopped working and must be updated, the shell is resolving an outdated global shim. Use the package-scoped npx --package @microsoft/m365-copilot-eval@latest command, and only remove the global package after user confirmation.
3. Accept the EULA and initialize
Use these commands for first-time setup:
npx -y --package @microsoft/m365-copilot-eval@latest runevals accept-eula
npx -y --package @microsoft/m365-copilot-eval@latest runevals --init-only--init-only validates setup and can create starter files without running a full tenant-dependent evaluation.
4. Prepare env files
Use references\azure-setup.md for full setup details. Keep secrets out of .env.local.
Minimal ATK layout:
.env.local # non-secret ATK values, for example M365_TITLE_ID
.env.local.user # local secrets
env\.env.local.user # alternate local secrets pathMinimal non-ATK layout:
env\.env.dev # named environment selected with --env dev
evals\evals.json # evaluation datasetRequired values are:
TENANT_ID=<tenant-guid>
AZURE_AI_OPENAI_ENDPOINT=<foundry-models-endpoint>
AZURE_AI_API_KEY=<secret>Recommended/default model values:
AZURE_AI_API_VERSION=2024-12-01-preview
AZURE_AI_MODEL_NAME=gpt-4o-miniSet one of:
M365_TITLE_ID=<atk-title-id>
M365_AGENT_ID=<deployed-agent-id>5. Create or validate the dataset
The CLI auto-discovers prompts.json, evals.json, or tests.json in the current directory or in evals\. Prefer evals\evals.json for new work.
Use schema version 1.2.0 with root items:
{
"schemaVersion": "1.2.0",
"metadata": {
"name": "Agent regression suite",
"tags": ["regression"]
},
"default_evaluators": {
"Relevance": {},
"Coherence": {}
},
"items": [
{
"prompt": "What can this agent help me with?",
"expected_response": "The agent describes only supported capabilities."
}
]
}Use references\eval-templates.md for copyable single-turn, multi-turn, and evaluator-threshold examples.
6. Run evaluations
Batch run with explicit output:
npx -y --package @microsoft/m365-copilot-eval@latest runevals --prompts-file evals\evals.json --output .evals\results.jsonHuman-review HTML:
npx -y --package @microsoft/m365-copilot-eval@latest runevals --prompts-file evals\evals.json --output .evals\results.htmlSpreadsheet-friendly CSV:
npx -y --package @microsoft/m365-copilot-eval@latest runevals --prompts-file evals\evals.json --output .evals\results.csvInline smoke test:
npx -y --package @microsoft/m365-copilot-eval@latest runevals --prompts "What can you help me with?" --expected "The agent explains its supported scope."Interactive exploration:
npx -y --package @microsoft/m365-copilot-eval@latest runevals --interactiveNamed environment:
npx -y --package @microsoft/m365-copilot-eval@latest runevals --prompts-file evals\evals.json --env devExplicit non-ATK agent:
npx -y --package @microsoft/m365-copilot-eval@latest runevals --prompts-file evals\evals.json --m365-agent-id <agent-id> --env devControlled concurrency:
npx -y --package @microsoft/m365-copilot-eval@latest runevals --prompts-file evals\evals.json --concurrency 1 --output .evals\debug.json
npx -y --package @microsoft/m365-copilot-eval@latest runevals --prompts-file evals\evals.json --concurrency 5 --output .evals\batch.jsonUse values from 1 to 5 only. Start with 1 while debugging auth, schema, or agent behavior.
7. Manage local state
Use these only when needed, and warn the user first because they affect local state:
npx -y --package @microsoft/m365-copilot-eval@latest runevals --cache-info
npx -y --package @microsoft/m365-copilot-eval@latest runevals --cache-dir
npx -y --package @microsoft/m365-copilot-eval@latest runevals --cache-clear
npx -y --package @microsoft/m365-copilot-eval@latest runevals --signout--cache-clear can remove cached run data. --signout resets the local authentication session.
8. Analyze and iterate
Load references\result-analysis.md after a run. Treat setup/auth/schema failures separately from agent-quality failures. For regression comparisons, keep the same dataset, expected responses, evaluator set, thresholds, model deployment, and concurrency where possible.
Do not run real evaluations unless the user has provided or approved the tenant, deployed agent, and Azure OpenAI configuration.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
Security
What our scanner noticed· Low risk
- Instructions that use the network
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Microsoft
- Publisher
- Microsoft (Official)
- Source
- microsoft/skills · .github/plugins/microsoft-365-agents-toolkit/skills/m365-agent-evaluator · commit 0696600
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Microsoft or Microsoft.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download m365-agent-evaluator.zip