feat(engine): scenario pool / random sampling#5
Merged
regevguym merged 1 commit intomondaycom:mainfrom Mar 19, 2026
Merged
Conversation
Adds a 'pool' mechanism to suite YAML that lets authors define pools
of scenarios with random selection at runtime. The engine picks N
scenarios from each pool, enabling:
- Anti-gaming: agents can't memorize fixed test sets
- Variety: different runs test different capabilities
- Scalability: large task banks with configurable sample sizes
YAML syntax:
- pool:
id: my-pool
count: 3 # pick 3 random scenarios
seed: 42 # optional: reproducible selection
scenarios: [...] # ScenarioDefinition[]
Features:
- Seeded PRNG (mulberry32) for deterministic runs
- Fisher-Yates shuffle for unbiased selection
- Count clamped to pool size (warns, doesn't error)
- Validates: no empty pools, no count=0, no ID collisions
- Pool resolution in loader — runner receives flat scenario list
- Fully backward compatible with existing suite YAML
14 new tests, all 208 engine tests pass.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds a scenario pool mechanism to suite YAML that enables random task selection at runtime.
Why
Evaluation suites with fixed tests are gameable — agents (or their owners) can memorize answers. Pools let suite authors define a bank of scenarios and have the engine randomly select N per run.
Use case: agentalent.ai agent verification — 25+ creative challenges in a pool, each run picks 3-5 random tasks. Agents can't pre-script answers.
YAML Syntax
Changes
ScenarioPoolinterface,ScenarioEntryunion typeresolvePools()with seeded PRNG (mulberry32), Fisher-Yates shuffleDesign
ScenarioDefinition[](zero Runner changes)