Design Philosophy
Every experiment tests a hypothesis about what makes agents better. The experiment driver makes the independent variables explicit:| Variable | How you control it |
|---|---|
| Knowledge | knowledgeRefs in dataset items, knowledgeBaseDir in config |
| Prompt structure | promptTemplate with {{task}} and {{knowledgeRefs}} placeholders |
| Model | model field in config |
| Execution strategy | Your AgentInvoker implementation |
| Evaluation criteria | Your Jury wiring |
Variant Ladders
The most informative experiments use a progressive variant ladder β each variant adds one thing to the previous:| Variant | Change from previous | Tests |
|---|---|---|
| 1. Simple prompt | β (baseline) | Modelβs raw capability |
| 2. + System prompt | Add domain instructions | Does framing help? |
| 3. + Knowledge base | Add knowledgeRefs | Does knowledge help? |
| 4. + Skills (SkillsJars) | Same content, structured packaging | Does structure help? |
| 5. + SAE | Add Structured Agent Execution | Does execution structure help? |
Improvement Flywheel
Variant ladders can be pre-planned, but the most effective experiments use empirically motivated variants β each exists because the previous variantβs analysis revealed a specific gap. This follows the Improvement Flywheel methodology:Iteration metadata
Each variant records what motivated it usingIterationMetadata:
experiment-config.yaml:
Intervention levers
The type of loss determines which lever to pull:| Lever | When to use |
|---|---|
| Prompt | Diffuse waste, no dominant failure pattern |
| Knowledge / skills | Friction loops around a specific knowledge gap |
| Execution structure | Loops around states that could be deterministic |
| Model | Agent fundamentally cannot perform the task |
| Rubric / evaluation | Judge variance, scores donβt correlate with quality |
Comparison reporting
GrowthStoryReporter (in the template) generates a markdown comparison report across variants. It:
- Shows per-judge score deltas, improvements, and regressions for each variant pair
- Flags regressions with explicit warnings when any
ScoreComparison.regressions() > 0 - Includes iteration motivation (finding + hypothesis) before each variantβs scores when
IterationMetadatais present
analysis/comparison-report.md and provides the MEASURE output that feeds the next DIAGNOSE step.
Dataset Design
Item structure
Each item needs:developerTaskβ what youβre asking the agent to do (natural language)before/β the starting state (real source code)reference/β the correct result (for judge comparison)bucketβ difficulty classification (A = easy, B = medium, C = hard)knowledgeRefsβ paths to relevant KB entries (relative toknowledgeBaseDir)
Buckets
Use buckets to stratify difficulty:| Bucket | Typical characteristics |
|---|---|
| A | Single file, mechanical change, clear instructions |
| B | Multi-file, requires understanding, some ambiguity |
| C | Cross-cutting concern, requires domain knowledge, creative problem-solving |
Filtering
Run subsets of the dataset:ExperimentConfig Reference
| Field | Required | Default | Description |
|---|---|---|---|
experimentName | Yes | β | Experiment identifier |
datasetDir | Yes | β | Path to dataset directory |
model | Yes | β | LLM model (sonnet, opus, haiku, or full ID) |
promptTemplate | Yes | β | Template with {{task}} and {{knowledgeRefs}} |
perItemTimeout | Yes | β | Timeout per item invocation |
itemFilter | No | all items | Filter by bucket, tags, ID, status |
knowledgeBaseDir | No | β | KB root (for ablation tracking) |
outputDir | No | β | Directory for workspaces and logs |
experimentTimeout | No | β | Timeout for entire experiment |
metadata | No | β | Arbitrary key-value pairs |
baselineId | No | β | Reference experiment for comparison |
Result Structure
Results are persisted byFileSystemResultStore:
- Experiment metadata (name, config, git version, timestamps)
- Per-item results (agent output, jury verdict, tokens, cost, duration)
- Aggregate statistics (pass rate, total cost, total duration)
Cross-Run Comparison
Related
Building a Jury
Three-tier evaluation: deterministic, structural, semantic
API Reference
Full config, dataset format, invoker contract