AGENT SKILL

Vally 技能评测

vally-eval

为智能体技能编写、验证并运行 Vally 评测套件。触发场景:创建评测、编写评测、添加评测、运行评测、验证评测、vally eval、eval.yaml、添加 stimulus、将测试映射到评测、将测试迁移到评测、评测评分器、评测打分、将评测加入 CI。

适用职业AI 工程师
License 许可
MIT
最近更新
2026-11-14
Stars
★ 264
Forks
225

01 前言 Front Matter

name
vally-eval
license
MIT
metadata
{ "author": "Microsoft", "version": "1.1.0" }
description
Author, validate, and run Vally evaluation suites for agent skills. TRIGGERS: create eval, write eval, add eval, run eval, validate eval, vally eval, eval.yaml, add stimulus, map test to eval, migrate test to eval, eval graders, eval scoring, add eval to CI.

02 资源文件 2

03 SKILL.md 正文

Vally eval suites

Skills in the azure-skills plugin are required to have integration tests that run prompts against an LLM agent to evaluate whether they help the agent accomplish goals in target scenarios. Such integration tests are written as vally eval suites, using vally as the underlying tool for running tests and grading the agent outcome.

Write vally eval suites

Vally eval suites are written as yaml documents. All eval suites share eval spec.

Refer to the official documentation on the schema of the spec and the schema of the eval suites writing-eval-specs.

Vally eval suites for azure-skills plugin have the following file layout. The shared eval spec is located at <repo-root>/.vally.yaml. The eval suites are categorized by plugin and skills. The eval suites for each skill are located at <repo-root>/evals/<plugin-dirname>/<skill-name>/*.yaml, e.g. <repo-root>/evals/azure-skills/azure-ai/eval.yaml.

Use meaningful file names to categorize tests. If a skill needs fixture files for its eval suites, it should organize such fixture files in a fixture directory under its directory, e.g. <repo-root>/evals/azure-skills/azure-ai/fixture/. The vally test runner and stimulus validation script will load all *.yaml files except for those under a fixture/ directory. Make sure to put all fixture files under the fixture/ directory.

Why is there a custom executor

Our custom executor implemented features that vally doesn't support yet, such as early termination, system prompt modification, screenshot taking, etc. Besides, test-all-integration runs automated integration tests, collects its exported data and feeds the data to a dashboard web app under <repo-root>/dashboard/ to monitor skill integration test results.

If you intend to have your vally suites use any of the extended features or have their results be consumed by the dashboard, you MUST use the custom executor in your vally suites.

Use tags to control the custom executor

The custom executor uses special tag values to control the behavior of the custom executor. See tag-helpers.ts to learn what special tags are supported.

Note: If an eval suite specifies an earlyTerminate condition, the suite MUST NOT use the completed grader because early terminated runs will always fail the completed grader by design.

Here are the advanced features implemented by the custom executor using tags.

  • Early termination: terminate a test run based on custom conditions
  • System prompt: use a customized system prompt
  • Screenshot: take screenshot of a web app at the end of the test
  • Azure fixture: provision Azure resources and present them to the agent as context. See azure-fixtures for more details.

Validate vally eval suites

Vally eval suites in this repo follow certain conventions. For example, all eval suites must have a type, tier, cost and area tag so they can be run for a corresponding target group. To ensure all eval suites follow the conventions, a script is added to validate the eval suites and report errors when it sees any violation. To run the script, execute this command from the scripts/ directory.

# cwd as <repo-root>/scripts/
npm run vally validate-stimulus

Extended features such as early termination are implemented using tags and many of them use serialized JSON objects as input. This validation script also validates the values of these special tags.

Run vally eval suites locally

Use vally-cli to run vally eval suites. In most cases, you would like to use a command like this.

# In tests/
npm run test:vally -- --plugin $PLUGIN_DIR --skill $SKILL

See vally test runner on how it composes the vally commands under the hood.

Run vally eval suites in CI

Vally eval suites implemented in this repo can be added to the CI test workflow to be run nightly and publish results for reviewing. Refer to ci-test on how to add the Vally eval suites to the CI test workflow.

Extend with custom grader

Custom graders can be added to grade trajectories in ways built-in graders don't support. To add a custom grader, follow the examples in the official vally documentation to create a tests/vally/<custom-name>-grader.ts module and register the new custom grader in tests/vally/vally-graders.ts. The npm run test:vally command internally loads all the custom graders when testing skills.

Re-grade an existing trajectory

Test authors commonly need to fine-tune grader configurations to reduce result flakiness. Vally supports re-grading an existing trajectory using a command like this:

# in tests/
npx @microsoft/vally-cli grade --eval-spec ../evals/<plugin-dirname>/<skill-name>/eval.yaml --verbose < results/<test-run-name>/results.jsonl

You can keep tuning the grader config in eval.yaml and re-grade the trajectory until the results meet your expectations.

If your skill uses a custom grader, add --grader-plugin to load the custom graders.

# in tests/
npx @microsoft/vally-cli grade --eval-spec ../evals/<plugin-dirname>/<skill-name>/eval.yaml --grader-plugin
../../../tests/vally/vally-graders.ts --verbose < results/<test-run-name>/results.jsonl

Note that the grader plugin's path is relative to the parent directory of the eval spec to run. For example, if the eval spec to run is <repo-root>/evals/azure-skills/azure-ai/eval.yaml, resolving this relative path ends at <repo-root>/tests/vally/copilot-sdk-executor.ts.

Collect test results

When running locally, the test results can be found at the following directories:

  • tests/reports/<test-run-name>/
  • tests/results/<test-run-name>/

When running in CI, the test results can be found in the GitHub Action artifacts or at a storage account that the workflow publishes to. You can also use the integration tests dashboard to view the test results from nightly test runs.

04 同仓库更多 Skills

microsoft
microsoft/GitHub-Copilot-for-Azure

azure-advisor-cost-optimization

Analyze Azure Advisor Cost/IdleResources findings and prevalidate deletion safety, including Service Groups. WHEN: "find unused Azure resources", "what resources am I paying for but no longer using", "idle-resource savings", "historical idle-resource savings", "are these idle resources safe to delete". Generic Cost, other subcategories, and cross-category requests use azure-advisor.

★ 264
microsoft
microsoft/GitHub-Copilot-for-Azure

Foundry IQ 知识库管理

foundry-iq

Foundry IQ 知识库。适用时机:让本地或 Blob 文档可被搜索;创建/诊断知识库;对不支持的连接器或多源知识库的创建/重新配置进行分类处理;将现有知识库连接到智能体(包括多源知识库);创建/复用 Search 服务;从现有知识库检索带引用的内容;无需品牌词。在查询/目标类问题前先阅读其流程说明。不适用:其他知识库提供商、存储库文件搜索、不涉及 Foundry IQ 知识库或连接器请求的经典 Azure AI Search 索引/查询/应用类工作、通用智能体创建。

AI 工程师知识管理与沉淀
★ 264
microsoft
microsoft/GitHub-Copilot-for-Azure

Python 应用 Azure 部署

python-appservice-deploy

将 Python(Flask/Django/FastAPI)代码部署到 Azure App Service Linux。触发条件:"Flask App Service"、"Django App Service"、"FastAPI App Service"、"将 Python 部署到 App Service"。不适用:Container Apps、Functions、非 Python、Terraform/Bicep/IaC、完整基础设施——请使用 azure-prepare。

云架构师部署与发布管理
★ 264
microsoft
microsoft/GitHub-Copilot-for-Azure

Azure OpenAI 快速部署

preset

通过分析所有可用区域的容量,智能地将 Azure OpenAI 模型部署到最优区域。自动优先检查当前区域,并在需要时显示备选方案。适用于:快速部署、最优区域、最佳区域、自动区域选择、快速配置、多区域容量检查、高可用部署、部署到最佳位置。不适用于:自定义 SKU 选择(使用 customize)、特定版本选择(使用 customize)、自定义容量配置(使用 customize)、PTU 部署(使用 customize)。

AI 工程师AI 平台资源管理
★ 264
microsoft
microsoft/GitHub-Copilot-for-Azure

Azure OpenAI 自定义部署

customize

具有完全自定义控制能力的 Azure OpenAI 模型交互式引导部署流程。逐步选择模型版本、SKU(GlobalStandard/Standard/ProvisionedManaged)、容量、RAI 策略(内容过滤器)以及高级选项(动态配额、优先处理、溢出)。适用于:自定义部署、定制模型部署、选择版本、选择 SKU、设置容量、配置内容过滤器、RAI 策略、部署选项、详细部署、高级部署、PTU 部署、预置吞吐量。不适用于:快速部署到最优区域(使用 preset)。

AI 工程师AI 平台资源管理
★ 264
microsoft
microsoft/GitHub-Copilot-for-Azure

Azure OpenAI 模型容量查询

capacity

跨区域和跨项目发现可用的 Azure OpenAI 模型容量。分析配额限制、比较可用性,并根据容量需求推荐最佳部署位置。适用场景:查找容量、检查配额、可以在哪里部署、容量发现、容量最佳区域、多项目容量搜索、配额分析、模型可用性、区域比较、检查 TPM 可用性。不适用场景:实际部署(发现后转交给预设或自定义技能)、配额提升申请(引导用户前往 Azure 门户)、列出现有部署。

AI 工程师AI 平台资源管理
★ 264