Add Vally skill-effectiveness experiments and Python test scenarios#383
Add Vally skill-effectiveness experiments and Python test scenarios#383LarryOsterman wants to merge 5 commits into
Conversation
Split from #375: adds the Vally skill-effectiveness experiment framework (run-skill-experiments.ps1, run-all-evals.ps1, generate-skill-experiments.ps1, compare-experiment.mjs), standardized vally eval/experiment yaml and scenarios.yaml for ~40 Python skills, shared Python grader tooling, and harness runner script/dependency updates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9429ad33-6f31-4ec5-ba00-0f11b5afb82e
There was a problem hiding this comment.
Pull request overview
Adds a standardized Vally “skill effectiveness” experiment setup for Python skills under tests/scenarios/, including shared Python grader tooling and updated test-runner dependencies/ignores. This PR is part of the split from #375 and focuses on the Python scenario/eval content (not harness/CI).
Changes:
- Adds shared Node-based graders for Python syntax + basic idiomatic checks under
tests/scenarios/_shared/vally/tools/. - Introduces per-skill Vally
eval.yaml+skill_effectiveness_experiment.yaml(and, for some,skill_effectiveness_eval.yaml) plus updates manyscenarios.yamlmodel defaults. - Updates
tests/package.json(Vally version + package manager metadata) and expandstests/.gitignoreto ignore evaluation output folders.
Reviewed changes
Copilot reviewed 176 out of 178 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/package.json | Bumps @microsoft/vally and adds packageManager metadata for tests tooling. |
| tests/.gitignore | Ignores additional eval output directories under tests/. |
| tests/scenarios/_shared/vally/tools/check-python-syntax.mjs | New shared Python syntax validation grader (supports optional exclude patterns config). |
| tests/scenarios/_shared/vally/tools/check-python-idiomatic.mjs | New shared heuristic Python “idiomatic” checks grader. |
| tests/scenarios/_shared/vally/azure-sdk-python-skill-evaluations.yaml | Aggregates many Python skill evals into a single suite file. |
| tests/scenarios/agent-framework-azure-ai-py/vally/skill_effectiveness_experiment.yaml | Adds skill-vs-baseline experiment definition for this skill. |
| tests/scenarios/agent-framework-azure-ai-py/vally/eval.yaml | Adds Vally eval suite for this skill’s scenarios. |
| tests/scenarios/agent-framework-azure-ai-py/vally/skill_effectiveness_eval.yaml | Adds the skill-effectiveness eval suite definition for this skill. |
| tests/scenarios/agent-framework-azure-ai-py/scenarios.yaml | Sets scenario model config for this skill. |
| tests/scenarios/agent-framework-azure-ai-py/test-output.txt | Adds a captured output artifact for this scenario directory. |
| tests/scenarios/azure-search-documents-py/vally/skill_effectiveness_experiment.yaml | Adds skill-vs-baseline experiment definition for this skill. |
| tests/scenarios/azure-search-documents-py/vally/eval.yaml | Adds Vally eval suite for this skill’s scenarios. |
| tests/scenarios/azure-search-documents-py/scenarios.yaml | Updates scenario model config for this skill. |
| tests/scenarios/azure-eventgrid-py/vally/skill_effectiveness_experiment.yaml | Adds skill-vs-baseline experiment definition for this skill. |
| tests/scenarios/azure-eventgrid-py/vally/eval.yaml | Adds Vally eval suite for this skill’s scenarios. |
| tests/scenarios/azure-eventgrid-py/scenarios.yaml | Updates scenario model config for this skill. |
| tests/scenarios/azure-messaging-webpubsubservice-py/vally/skill_effectiveness_experiment.yaml | Adds skill-vs-baseline experiment definition for this skill. |
| tests/scenarios/azure-messaging-webpubsubservice-py/vally/eval.yaml | Adds Vally eval suite for this skill’s scenarios. |
| tests/scenarios/azure-messaging-webpubsubservice-py/scenarios.yaml | Updates scenario model config for this skill. |
| tests/scenarios/azure-monitor-opentelemetry-py/vally/skill_effectiveness_experiment.yaml | Adds skill-vs-baseline experiment definition for this skill. |
| tests/scenarios/azure-monitor-opentelemetry-py/vally/eval.yaml | Adds Vally eval suite for this skill’s scenarios. |
| tests/scenarios/azure-monitor-opentelemetry-py/scenarios.yaml | Updates scenario model config for this skill. |
| tests/scenarios/pydantic-models-py/vally/syntax-check-config.json | Adds per-scenario syntax-check exclusion config. |
| tests/scenarios/pydantic-models-py/vally/skill_effectiveness_experiment.yaml | Adds skill-vs-baseline experiment definition for this skill. |
| tests/scenarios/pydantic-models-py/scenarios.yaml | Updates scenario model config for this skill. |
| tests/scenarios/fastapi-router-py/vally/syntax-check-config.json | Adds per-scenario syntax-check exclusion config. |
| tests/scenarios/fastapi-router-py/vally/skill_effectiveness_experiment.yaml | Adds skill-vs-baseline experiment definition for this skill. |
| tests/scenarios/azure-storage-queue-py/vally/skill_effectiveness_experiment.yaml | Adds skill-vs-baseline experiment definition for this skill. |
| tests/scenarios/azure-storage-queue-py/vally/eval.yaml | Adds Vally eval suite for this skill’s scenarios. |
| tests/scenarios/azure-storage-queue-py/vally/skill_effectiveness_eval.yaml | Adds the skill-effectiveness eval suite definition for this skill. |
| tests/scenarios/azure-storage-queue-py/scenarios.yaml | Updates scenario model config for this skill. |
| tests/scenarios/m365-agents-py/vally/skill_effectiveness_experiment.yaml | Adds skill-vs-baseline experiment definition for this skill. |
| tests/scenarios/m365-agents-py/vally/eval.yaml | Adds Vally eval suite for this skill’s scenarios. |
| tests/scenarios/m365-agents-py/vally/skill_effectiveness_eval.yaml | Adds the skill-effectiveness eval suite definition for this skill. |
| tests/scenarios/m365-agents-py/scenarios.yaml | Updates scenario model config for this skill. |
| tests/scenarios/azure-ai-language-conversations-py/scenarios.yaml | Adds scenario definitions and mock responses for this skill. |
| tests/scenarios/azure-ai-language-conversations-py/acceptance-criteria.md | Expands/clarifies acceptance criteria with correct/incorrect examples. |
Files not reviewed (1)
- tests/pnpm-lock.yaml: Generated file
| @@ -0,0 +1 @@ | |||
| Error: Experiment config file not found: Q:\src\skills\tests\scenarios\agent-framework-azure-ai-py\skill_effectiveness_experiment.yaml | |||
| - CRITICAL: Include explicit exception handling: | ||
| * Wrap client initialization and send/receive operations in try/except blocks | ||
| * Handle: ServiceBusError, EventHubError, OperationTimeoutError, AzureError | ||
| * Example: try: sender.send_batch(batch) except ServiceBusError as e: print(f'Error: {e}') |
| - CRITICAL: Include explicit exception handling: | ||
| * Wrap client initialization and send/receive operations in try/except blocks | ||
| * Handle: ServiceBusError, EventHubError, OperationTimeoutError, AzureError | ||
| * Example: try: sender.send_batch(batch) except ServiceBusError as e: print(f'Error: {e}') |
| - CRITICAL: Include explicit exception handling: | ||
| * Wrap client initialization and send/receive operations in try/except blocks | ||
| * Handle: ServiceBusError, EventHubError, OperationTimeoutError, AzureError | ||
| * Example: try: sender.send_batch(batch) except ServiceBusError as e: print(f'Error: {e}') |
| - CRITICAL: Include explicit exception handling: | ||
| * Wrap client initialization and send/receive operations in try/except blocks | ||
| * Handle: ServiceBusError, EventHubError, OperationTimeoutError, AzureError | ||
| * Example: try: sender.send_batch(batch) except ServiceBusError as e: print(f'Error: {e}') |
| # Run compare-experiment.mjs for the experiment directory | ||
| $compareScript = Join-Path $PSScriptRoot "compare-experiment.mjs" | ||
| if (Test-Path $compareScript) { | ||
| & node $compareScript $experimentResultsDir |
| @@ -0,0 +1 @@ | |||
| Error: Experiment config file not found: Q:\src\skills\tests\scenarios\agent-framework-azure-ai-py\skill_effectiveness_experiment.yaml | |||
| * Wrap client initialization and send/receive operations in try/except blocks | ||
| * Handle: ServiceBusError, EventHubError, OperationTimeoutError, AzureError | ||
| * Example: try: sender.send_batch(batch) except ServiceBusError as e: print(f'Error: {e}') |
| * Wrap client initialization and send/receive operations in try/except blocks | ||
| * Handle: ServiceBusError, EventHubError, OperationTimeoutError, AzureError | ||
| * Example: try: sender.send_batch(batch) except ServiceBusError as e: print(f'Error: {e}') |
| $jsonlPath = Join-Path $runDir.FullName "results.jsonl" | ||
| if (Test-Path -LiteralPath $jsonlPath) { | ||
| $line = Get-Content -Path $jsonlPath | | ||
| Where-Object { $_ -match '"type"\s*:\s*"run-summary"' } | | ||
| Select-Object -Last 1 | ||
| if ($line) { | ||
| try { $summary = $line | ConvertFrom-Json -Depth 20 } catch {} | ||
| } | ||
| } |
| } | ||
| } | ||
|
|
||
| function matchGlobPattern(filePath, pattern) { |
| ".vally", | ||
| ]); | ||
|
|
||
| function collectPythonFiles(dir, acc) { |
…lude-pattern support
richardpark-msft
left a comment
There was a problem hiding this comment.
Some stuff I think is worth fixing:
- Let's use a real python linter (pylint?). Our skills should produce clean code anyways.
- Can you add in a README.md too? There's some handy little workflows in here, hard to discover without a small roadmap.
| const regex = new RegExp(`^${regexPattern}$`); | ||
| return regex.test(filePath); | ||
| } | ||
|
|
There was a problem hiding this comment.
It's probably better to just use pylint or something. I'm assuming you have, or could have, a python env here.
| const EXCLUDED_DIRS = new Set([ | ||
| ".git", | ||
| ".hg", | ||
| ".svn", |
There was a problem hiding this comment.
What environment are we running this check in, that we need to exclude some of these things?
| scoring: scale_1_5 | ||
| - name: persistent_agent_thread | ||
| prompt: |- | ||
| Show how to retrieve an existing agent and continue a conversation |
There was a problem hiding this comment.
I think you're just porting over some existing tests, but I feel like a more realistic prompt would say "write a program that can" or something of that nature. I'm curious if it's a style difference between us though.
| defaults: | ||
| runs: 1 | ||
| timeout: 30m | ||
| model: claude-sonnet-4.6 |
There was a problem hiding this comment.
I'd add a comment that mentions you're purposefully picking models from two different families (I believe you've mentioned this before)
| weight: 1 | ||
| config: | ||
| model: claude-sonnet-4.6 | ||
| prompt: |- |
There was a problem hiding this comment.
If you can, I think it'd be better to use pylint. Someone on the Python team probably has a realistic config we can use (or maybe even a different linter)
Fixed in commit f7b82c6. Here's a summary of all changes made:
|
| Running experiment 'azure-monitor-ingestion-py-skill-experiment' | ||
| Output: Q:\src\skills\tests\scenarios\azure-monitor-ingestion-py\vally\vally-experiment-results\2026-06-30T23-35-17-490Z |
| Running experiment 'azure-monitor-ingestion-py-skill-experiment' | ||
| Output: Q:\src\skills\tests\scenarios\azure-monitor-ingestion-py\vally\vally-experiment-results\2026-06-30T23-40-22-287Z |
| # Validate vally is available | ||
| $vallyCmd = Get-Command vally -ErrorAction SilentlyContinue | ||
| if (-not $vallyCmd) { | ||
| Write-Error "vally command not found. Please install Vally to run experiments." | ||
| exit 1 | ||
| } |
| $results = @() | ||
|
|
||
| foreach ($evalFile in $evalFiles) { |
| - CRITICAL: Include explicit exception handling: | ||
| * Wrap client initialization and send/receive operations in try/except blocks | ||
| * Handle: ServiceBusError, EventHubError, OperationTimeoutError, AzureError | ||
| * Example: try: sender.send_batch(batch) except ServiceBusError as e: print(f'Error: {e}') |
| - CRITICAL: Include explicit exception handling: | ||
| * Wrap client initialization and send/receive operations in try/except blocks | ||
| * Handle: ServiceBusError, EventHubError, OperationTimeoutError, AzureError | ||
| * Example: try: sender.send_batch(batch) except ServiceBusError as e: print(f'Error: {e}') |
| - Return the final answer as Python code only. | ||
| - CRITICAL: Include explicit exception handling: | ||
| * Wrap client initialization and query/ingestion operations in try/except blocks | ||
| * Handle: ServiceError, HttpResponseError, ValidationError, AzureError |
| - Return the final answer as Python code only. | ||
| - CRITICAL: Include explicit exception handling: | ||
| * Wrap client initialization and query/ingestion operations in try/except blocks | ||
| * Handle: ServiceError, HttpResponseError, ValidationError, AzureError |
Split from #375 (5 of 5).
Adds the Vally skill-effectiveness experiment framework and Python test scenarios:
run-skill-experiments.ps1,run-all-evals.ps1,generate-skill-experiments.ps1,compare-experiment.mjsvally/eval + experiment yaml andscenarios.yamlfor ~40 Python skillstests/scenarios/_shared/run-harness-by-language.ps1and test dependency manifests178 files under
tests/(excludestests/harness/and*-rustscenarios, covered by #380 and #381).