Skip to main content

Design Philosophy

Every experiment tests a hypothesis about what makes agents better. The experiment driver makes the independent variables explicit:
VariableHow you control it
KnowledgeknowledgeRefs in dataset items, knowledgeBaseDir in config
Prompt structurepromptTemplate with {{task}} and {{knowledgeRefs}} placeholders
Modelmodel field in config
Execution strategyYour AgentInvoker implementation
Evaluation criteriaYour Jury wiring

Variant Ladders

The most informative experiments use a progressive variant ladder β€” each variant adds one thing to the previous:
VariantChange from previousTests
1. Simple promptβ€” (baseline)Model’s raw capability
2. + System promptAdd domain instructionsDoes framing help?
3. + Knowledge baseAdd knowledgeRefsDoes knowledge help?
4. + Skills (SkillsJars)Same content, structured packagingDoes structure help?
5. + SAEAdd Structured Agent ExecutionDoes execution structure help?
Each step isolates one variable. If variant 4 outperforms variant 3 with identical knowledge content, the structure is what matters β€” not just the knowledge.

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 using IterationMetadata:
In the agent-experiment-template, this is configured in experiment-config.yaml:
This creates an audit trail: for every variant you can trace back to the observation that motivated it and verify whether the hypothesis held.

Intervention levers

The type of loss determines which lever to pull:
LeverWhen to use
PromptDiffuse waste, no dominant failure pattern
Knowledge / skillsFriction loops around a specific knowledge gap
Execution structureLoops around states that could be deterministic
ModelAgent fundamentally cannot perform the task
Rubric / evaluationJudge 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 IterationMetadata is present
The report is written to 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 to knowledgeBaseDir)

Buckets

Use buckets to stratify difficulty:
BucketTypical characteristics
ASingle file, mechanical change, clear instructions
BMulti-file, requires understanding, some ambiguity
CCross-cutting concern, requires domain knowledge, creative problem-solving

Filtering

Run subsets of the dataset:

ExperimentConfig Reference

FieldRequiredDefaultDescription
experimentNameYesβ€”Experiment identifier
datasetDirYesβ€”Path to dataset directory
modelYesβ€”LLM model (sonnet, opus, haiku, or full ID)
promptTemplateYesβ€”Template with {{task}} and {{knowledgeRefs}}
perItemTimeoutYesβ€”Timeout per item invocation
itemFilterNoall itemsFilter by bucket, tags, ID, status
knowledgeBaseDirNoβ€”KB root (for ablation tracking)
outputDirNoβ€”Directory for workspaces and logs
experimentTimeoutNoβ€”Timeout for entire experiment
metadataNoβ€”Arbitrary key-value pairs
baselineIdNoβ€”Reference experiment for comparison

Result Structure

Results are persisted by FileSystemResultStore:
Each result contains:
  • 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

The comparison engine aligns items by ID across two experiments and reports per-item and aggregate deltas.

Building a Jury

Three-tier evaluation: deterministic, structural, semantic

API Reference

Full config, dataset format, invoker contract