m365-agent-evaluator
microsoft/skills
@microsoft/m365-copilot-eval CLI を使用して、Microsoft 365 Copilot の宣言型エージェント向けの評価スイートを作成、実行、および分析します。
...すべて拡張しますM365 エージェント評価ツール
このスキルを使用すると、ユーザーが@microsoft/m365-copilot-eval を使用して Microsoft 365 Copilot の宣言型エージェントを評価できるようになります。このスキルは、スキーマに準拠した評価データセットを設計し、パブリックプレビュー版の CLI を実行して結果を分析し、対象を絞った修正策を推奨します。
Microsoft 365 Agents Toolkit (ATK) プロジェクトが検出された場合はそれをデフォルトとして使用しますが、現在のディレクトリが ATK ではないという理由だけで強制的に停止することはありません。また、CLI では、明示的なM365_AGENT_IDまたは--m365-agent-id を指定することで、デプロイ済みのエージェントを評価することもできます。
常に次の CLI コマンドを使用してください
npx -y --package @microsoft/m365-copilot-eval@latest runevals
旧式の非公開インストーラー(aka.ms)、グローバルインストール、単なるrunevals、単なるnpx runevals、--input、または--html の使用は推奨されません。
アクティベーションのワークフロー
- ユーザーの目標を特定します:セットアップ、データセットの作成、評価の実行、結果の分析、または既存のエバリュエーションスイートの更新。
- 現在の目的に必要なリファレンスのみを読み込みます:
- エンドツーエンドのオペレーターワークフローおよび CLI コマンドについては、
references/workflow.mdを参照してください。 - 前提条件、環境設定ファイル、およびシークレットの取り扱いについては、
references/azure-setup.md を参照してください。 - 評価データセットの作成または編集を行う場合は、
references/eval-templates.md を参照してください。 - 生成するシナリオを決定する際は、
references/pra-framework.md を参照してください。 - JSON/CSV/HTML形式の結果が生成された後は、
references/result-analysis.mdを参照してください。 references/guardrails.md:ファイルの書き込み、シークレットの取り扱い、キャッシュのクリア、ログアウト、またはトラブルシューティングを行う前に参照してください。
- エンドツーエンドのオペレーターワークフローおよび CLI コマンドについては、
- プロジェクトの構成を検出:
- ATK:
.env.local、.env.local.user、env\.env.local.user、m365agents.yml、またはappPackage\declarativeAgent.json。 - ATK以外: evalデータセットに加え、
M365_AGENT_ID、--m365-agent-id、またはenv\.env.devなどの名前付き環境ファイル。
- ATK:
- 値を公開せずに前提条件を確認する:
- Node.js 24.12.0 以降。
- Microsoft 365 Copilot ライセンスおよびデプロイ済みの M365 Copilot エージェント。
- WorkIQ クライアント アプリに対するテナント管理者の同意。
TENANT_ID、Foundry Models エンドポイント/キー内の Azure OpenAI、および推奨/デフォルトのgpt-4o-miniデプロイメント。
- ワークフローを選択してください:
- データセットなし:
evals\evals.jsonを作成します。 - 既存のデータセット:実行、過去の結果の分析、または変更案の提案。
- クイックチェック:インラインプロンプトを使用します。
- 探索:対話モードを使用します。
- データセットなし:
現在のデータセット契約
ルート項目配列を含むスキーマバージョン1.2.0のドキュメントを生成します。旧式のPromptsObjectやルートプロンプト形式は生成しないでください。
最小構成:
{
"schemaVersion": "1.2.0",
"metadata": {
"name": "エージェント評価スイート",
"tags": ["starter"]
},
"default_evaluators": {
"Relevance": {},
"Coherence": {}
},
"items": [
{
"prompt": "このエージェントはどのようなことを手伝ってくれますか?",
"expected_response": "エージェントは、サポートされていない機能をでっち上げることなく、サポート範囲を説明します。"
}
]
}
ローカルのスキーマソースとしてreferences\prompts-schema.json を、コピー可能なシングルターン、マルチターン、評価器、および閾値の例としてreferences\eval-templates.mdを使用してください。
公開評価関数名
評価器の名称は大文字と小文字が区別されます。新しい権威ある情報源によって別段の記載がない限り、公開されている設定可能な評価器の名称のみを使用してください。
| 評価器 | セマンティクス |
|---|---|
関連性 |
1~5のLLMスコア。デフォルトの閾値は3。 |
一貫性 |
LLMスコア:1~5;デフォルトの閾値は3。 |
根拠の妥当性 |
文脈や期待される証拠に対するLLMスコア(1~5);デフォルトの閾値は3。 |
類似性 |
期待される応答に対するLLMスコア(1~5);デフォルトの閾値は3。 |
引用 |
カウントベースの引用チェック。デフォルトのしきい値は1。 |
完全一致 |
ブール値による文字列の完全一致。 |
PartialMatch |
0.0~1.0 の文字列の類似度。デフォルトの閾値は 0.5。 |
ToolCallAccuracy は、オーサリングにおいてはレガシー/プライベートとして扱います。現在の公開 CLI/スキーマのドキュメントで明示的に再導入されない限り、生成されたデータセットには追加しないでください。
一般的なコマンド
# バージョン/ヘルプの確認
npx -y --package @microsoft/m365-copilot-eval@latest runevals --version
npx -y --package @microsoft/m365-copilot-eval@latest runevals --help
# 初回セットアップ / EULA
npx -y --package @microsoft/m365-copilot-eval@latest runevals accept-eula
npx -y --package @microsoft/m365-copilot-eval@latest runevals --init-only
# 明示的な JSON 出力を伴うバッチ実行
npx -y --package @microsoft/m365-copilot-eval@latest runevals --prompts-file evals\evals.json --output .evals\results.json
# 人間によるレビューに適した HTML またはスプレッドシート対応の 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
# 簡単な確認
npx -y --package @microsoft/m365-copilot-eval@latest runevals --prompts "何を手伝ってくれますか?" --expected "エージェントがサポートする範囲を説明します。"
# ATK以外または名前付き環境
npx -y --package @microsoft/m365-copilot-eval@latest runevals --prompts-file evals\evals.json --m365-agent-id --env dev
--concurrency オプションは1~5 の値でのみ使用してください。デバッグ時は1から始め、環境のセットアップが安定してから値を増やしてください。
バージョンと PATH の安全性
エージェントの動作を診断する前に、どの実行ファイルが実行されているかを確認してください:
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 runevals
単に `runevals`を実行した際に「このバージョンの M365 Evals CLI は動作しなくなっており、更新が必要です」と表示される場合は、PATH/グローバルインストールが古くなっているものとみなしてください。 上記のnpx --package ...@latestコマンドで再実行し、npm uninstall -g @microsoft/m365-copilot-eval を使用してグローバルなシムを削除する前に確認を求めます。
ファイルの命名規則
| パス | 目的 |
|---|---|
.env.local |
M365_TITLE_ID などの、機密情報ではない ATK 設定。 |
.env.local.userまたはenv\.env.local.user |
テナント ID や Azure OpenAI キーなどのローカル機密情報。 |
env\.env. |
ATK 以外または明示的な--envワークフロー用の、名前付き環境設定。 |
evals\evals.json |
ユーザーがコミットを希望する場合の、ソース管理対象の eval データセット。 |
.evals\ |
ローカル実行の出力。通常はgit無視対象です。 |
ユーザーが明示的に要求し、データの共有が安全であることを確認しない限り、機密情報、機密データを含むプロンプト、取得したコンテンツ、デバッグログ、または生の結果ファイルを決して出力またはコミットしてはなりません。
生成に関するガイダンス
PRAをシナリオ設計のフレームワークとして使用する:
- 認識:情報の取得、文脈の把握、および情報源の網羅性。
- 推論(Reason):指示の順守、合成、曖昧性の処理、および拒否行動。
- Act(実行):宣言された能力/行動挙動。
Relevance、Coherence、Similarity、ExactMatch、またはPartialMatchなどの公開評価指標を用いてスコアを算出してください。従来のToolCallAccuracyは使用しないでください。
既存のデータセットを上書きする前に確認すること。生成された評価結果を書き込む際は、まず一時ファイルに書き出し、成功した場合にファイル名を変更すること。
結果分析の指針
存在する評価基準キーのみを分析してください。スコアキーが欠落している場合は、通常、その項目に対して評価基準が設定されていなかったことを意味し、評価に失敗したわけではありません。
存在する場合は、現在のスコアキー(relevance、coherence、groundedness、similarity、citations、exactMatch、partialMatch)を使用してください。失敗を、考えられる根本原因(指示の問題、グラウンディングの問題、引用(citation)の問題、期待される回答との不一致、機能のギャップ、認証/環境の問題、評価品質の問題)ごとにグループ化してください。
ユーザーが必要なテナント、エージェント、および Azure OpenAI の構成を提供または承認していない限り、実際のテナント依存の評価を実行しないでください。
---
name: m365-agent-evaluator
description: Create, run, and analyze evaluation suites for Microsoft 365 Copilot declarative agents using the @microsoft/m365-copilot-eval CLI.
---
# 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
```powershell
npx -y --package @microsoft/m365-copilot-eval@latest runevals
```
Do not recommend the old private `aka.ms` installer, global installs, bare `runevals`, bare `npx runevals`, `--input`, or `--html`.
## Activation workflow
1. Identify the user goal: setup, dataset authoring, running evals, analyzing results, or updating an existing eval suite.
2. 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.
- `references/eval-templates.md` when creating or editing eval datasets.
- `references/pra-framework.md` when deciding what scenarios to generate.
- `references/result-analysis.md` after JSON/CSV/HTML results exist.
- `references/guardrails.md` before writing files, handling secrets, clearing cache, signing out, or troubleshooting.
3. Detect project shape:
- ATK: `.env.local`, `.env.local.user`, `env\.env.local.user`, `m365agents.yml`, or `appPackage\declarativeAgent.json`.
- Non-ATK: an eval dataset plus `M365_AGENT_ID`, `--m365-agent-id`, or a named environment file such as `env\.env.dev`.
4. 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/default `gpt-4o-mini` deployment.
5. 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:
```json
{
"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
```powershell
# 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 dev
```
Use `--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:
```powershell
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 runevals
```
If 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`, or `PartialMatch`; do not use legacy `ToolCallAccuracy`.
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.
すべてのファイル
17件のファイルm365-agent-evaluatorをインストール
スキルファイルをダウンロードし、.claude/skills/ ディレクトリに解凍してください。
ZIPをダウンロードリポジトリをクローンし、スキルファイルをプロジェクトにコピーしてください。
git clone https://github.com/microsoft/skills/tree/main/.github/plugins/microsoft-365-agents-toolkit/skills/m365-agent-evaluator # Copy SKILL.md to your .claude/skills/ directory
コピー





家
