Skip to content

Create initial vally experiments for Azure MCP tool effectiveness.#3015

Draft
LarryOsterman wants to merge 5 commits into
microsoft:mainfrom
LarryOsterman:larryo/first_vally_evaluations
Draft

Create initial vally experiments for Azure MCP tool effectiveness.#3015
LarryOsterman wants to merge 5 commits into
microsoft:mainfrom
LarryOsterman:larryo/first_vally_evaluations

Conversation

@LarryOsterman

Copy link
Copy Markdown
Member

What does this PR do?

Create initial vally experiment framework for measuring effectiveness of MCP tools relative to the baseline.

This PR adds a new script named "Invoke-VallyEval.ps1" in servers/Azure.Mcp.Server\tests\Vally which invokes vally experiments for each tool experiment in the tests\Vally directory.

See the README.md file in tests\Vally for more information on the structure of the test framework and how the pieces all fit together.

The evaluations are based on the prompts kept in servers/Azure.Mcp.Server/docs/e2eTestPrompts.md file.

GitHub issue number?

[Link to the GitHub issue this PR addresses]

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Created a changelog entry if the change falls among the following: new feature, bug fix, UI/UX update, breaking change, or updated dependencies. Follow the changelog entry guide
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes running the script ./eng/scripts/Process-PackageReadMe.ps1. See Package README
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For tools with new names, including new tools or renamed tools, update consolidated-tools.json
    • For renamed tools, follow the Tool Rename Checklist and tag the PR with the breaking-change label
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated command list in servers/Azure.Mcp.Server/docs/azmcp-commands.md
    • Ran ./eng/scripts/Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • Updated test prompts in servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an initial Vally-based evaluation harness under servers/Azure.Mcp.Server/tests/Vally to measure Azure MCP tool effectiveness via baseline vs treatment experiment variants, with first experiments targeting Event Hubs.

Changes:

  • Introduces a discovery-based PowerShell runner (Invoke-VallyEval.ps1) that builds azmcp, provisions per-area resources, runs Vally experiments, and compares baseline/treatment results.
  • Adds initial Event Hubs experiments (eventhub-get, namespace-get) plus provisioning/teardown scripts.
  • Updates spelling dictionary and Azure MCP Server changelog to reflect the new harness.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
servers/Azure.Mcp.Server/tests/Vally/README.md Documents the Vally evaluation framework and how to run/add experiments.
servers/Azure.Mcp.Server/tests/Vally/Invoke-VallyEval.ps1 Runner script: builds azmcp, discovers experiments, provisions/tears down resources, runs Vally experiments, and reports deltas.
servers/Azure.Mcp.Server/tests/Vally/eventhubs/New-EventHubsResources.ps1 Provisions Event Hubs test resources used by the experiments.
servers/Azure.Mcp.Server/tests/Vally/eventhubs/Remove-EventHubsResources.ps1 Tears down Event Hubs test resources after experiments.
servers/Azure.Mcp.Server/tests/Vally/eventhubs/eventhub-get.experiment.yaml Defines baseline vs treatment variants for the Event Hub “get” scenario.
servers/Azure.Mcp.Server/tests/Vally/eventhubs/eventhub-get.eval.yaml Shared eval spec (stimuli + outcome graders) for Event Hub “get”.
servers/Azure.Mcp.Server/tests/Vally/eventhubs/namespace-get.experiment.yaml Defines baseline vs treatment variants for the namespace “get” scenario.
servers/Azure.Mcp.Server/tests/Vally/eventhubs/namespace-get.eval.yaml Shared eval spec (stimuli + outcome graders) for namespace “get”.
servers/Azure.Mcp.Server/tests/Vally/.gitignore Ignores Vally output artifacts under the new test folder.
servers/Azure.Mcp.Server/CHANGELOG.md Notes the addition of the Vally harness and initial Event Hubs experiment(s).
.vscode/cspell.json Adds Vally-/eval-related words to the spelling dictionary.

Comment thread servers/Azure.Mcp.Server/tests/Vally/Invoke-VallyEval.ps1 Outdated
@@ -0,0 +1,148 @@
#!/bin/env pwsh
@@ -0,0 +1,73 @@
#!/bin/env pwsh
Comment on lines +6 to +7
Provisions the Azure Event Hubs resources used by the vally "get Event Hub"
evaluation (eventhubs/eval.yaml).
Comment thread servers/Azure.Mcp.Server/tests/Vally/README.md Outdated
Comment on lines +54 to +59
The **treatment** (`eventhub-get.eval.yaml`) additionally uses the
[`tool-calls`](https://microsoft.github.io/vally/reference/graders/) grader to
assert that:

- the agent **selects and invokes** `eventhubs_eventhub_get`, and
- it does **not** invoke a destructive Event Hubs tool (e.g. `*_delete`).
Comment on lines +66 to +68
`eventhub-get.eval.baseline.yaml` is the **control**: it reuses the exact same
prompts but omits the `environment.mcpServers` block, so the agent runs with only
its built-in tools.
Comment on lines +168 to +175
# Only run the treatments; skip the baseline/control runs
./Invoke-VallyEval.ps1 -SkipBaseline

# Override the model and show full agent output
./Invoke-VallyEval.ps1 -Model claude-opus-4.6 -Verbose

# Run one explicit spec (its baseline is derived automatically)
./Invoke-VallyEval.ps1 -EvalSpec ./eventhubs/eventhub-get.eval.yaml
Comment thread servers/Azure.Mcp.Server/CHANGELOG.md Outdated
Comment on lines +54 to +58
$exists = az group exists --name $ResourceGroup @subArgs 2>$null
if ($exists -ne 'true') {
Write-Info "Resource group '$ResourceGroup' does not exist. Nothing to delete."
return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants