You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: add support for benchmarks to experiments - #373
This PR adds benchmark-backed experiments so we can compare custom treatments against control and benchmark conditions using the same capability groups.
Capability prerequisites run for every treatment, after experiment setup and before treatment setup. Benchmark-level setup runs only for Benchmark. Created and restored plans preserve the same setup order and treatment isolation.
Changelog
New
Add the benchmark experiment option with automatic Control and Benchmark treatments.
Add capability-aware experiment results and reporting.
Add regression coverage for setup order and treatment isolation in created and restored plans.
Changed
Require benchmarksDirectory in calls to getExperiment and listExperiments, including scenario-backed experiments.
Update capability and setup guidance for benchmark-backed experiments.
Use default exports in experiment authoring guidance and examples.
Require specific source evidence for resource-based agent decisions and recommendations.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Benchmark experiment plans incorrectly restrict shared capability setup to the Benchmark treatment, breaking control and custom treatment prerequisites.
Update experiment guidance to use default exports and require source evidence for resource-based decisions. Clarify capability setup scopes and the benchmarksDirectory migration.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b79d13c1-4b88-4e32-9faa-d425f1e2b55d
Avoid strict parsing to preserve manifest compatibility
packages/agent-eval/src/experiment/plan.ts:82
Changing this parser from z.object to z.strictObject makes previously accepted experiment plan manifests fail whenever they contain an extra top-level field, even though this feature does not require stricter parsing and the equivalent benchmark parser remains permissive (packages/agent-eval/src/benchmark/plan.ts:58). Keep the existing parsing behavior to avoid an unrelated CLI compatibility break.
Document migration for breaking Experiment type changes
.changeset/sparkly-waves-post.md:8
The migration note covers the new loader argument, but it omits two other breaking public type changes: Experiment is now a discriminated union whose scenarios field requires narrowing, and ExperimentOutput now requires a capabilities map (packages/agent-eval/src/experiment/experiment.ts:7-35, packages/agent-eval/src/experiment/output.ts:171-176). Please state how existing TypeScript consumers should update; the changeset guidance requires migration instructions for breaking changes.
🧠 Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #329
This PR adds benchmark-backed experiments so we can compare custom treatments against control and benchmark conditions using the same capability groups.
Capability prerequisites run for every treatment, after experiment setup and before treatment setup. Benchmark-level setup runs only for
Benchmark. Created and restored plans preserve the same setup order and treatment isolation.Changelog
New
benchmarkexperiment option with automaticControlandBenchmarktreatments.Changed
benchmarksDirectoryin calls togetExperimentandlistExperiments, including scenario-backed experiments.Removed