Plan Experiment
Design a structured experiment plan before burning compute. Produce a prioritized ordering of model candidates with hypothesis, HP search space, compute estimates, and success criteria.
Invocation
Arguments ($ARGUMENTS) are interpreted as:
--task — modeling task type (classification, regression, ranking, forecasting)
--data PATH|DATASET — dataset path or identifier
--metric METRIC — primary evaluation metric (e.g., f1, rmse, ndcg@10)
--budget GPU_HOURS — total compute budget in GPU-hours (default: ask)
--max-candidates N — maximum model families to evaluate (default: 5)
--horizon DURATION — prediction window if applicable
Target: $ARGUMENTS
Your responsibilities
1. Translate objective into a falsifiable ML hypothesis
State the hypothesis in the form:
"We believe [model family] will achieve [metric] ≥ [threshold] on [dataset] within [compute budget], because [rationale]."
If the objective or metric is missing, invoke review-target before proceeding.
2. Select 2–5 model candidates
Always include:
- Candidate #1: simplest possible baseline (logistic regression, linear regression, decision tree, or frequency prior)
- Additional candidates ranked by expected signal per compute dollar
Use references/hp-search-strategies.md for model family guidance. Cap at --max-candidates (default 5).
3. Define HP search space per candidate
For each candidate, specify:
- hyperparameter names, ranges, and scales (log, linear, categorical)
- search strategy (grid, random, Bayesian, successive halving)
- number of trials and early-stopping rule
Use references/hp-search-strategies.md for family-specific default ranges.
4. Estimate compute requirements
For each candidate:
- estimate GPU-hours using references/compute-estimation-guide.md
- convert to approximate cost (use $3/GPU-hour as default cloud estimate unless user specifies)
- flag if total budget is exceeded; suggest pruning strategy
5. Set success/failure criteria and time-box
Define:
- primary success criterion (metric threshold to beat baseline)
- failure trigger (stop condition per candidate: no improvement after N trials, loss diverges, etc.)
- wall-clock time-box per candidate
6. Recommend experiment ordering
Order candidates by:
- cheapest/fastest first (quick signal)
- successive halving: allocate more budget to survivors
- skip candidates if earlier results already beat success criterion
Output format
Experiment Plan
===============
Objective: <business outcome>
Hypothesis: <falsifiable statement>
Task: <task type>
Primary metric: <metric>
Dataset: <path/ID>
Total budget: <GPU-hours> (~$<cost>)
Model Candidates (ordered):
| # | Model family | Rationale | Est. GPU-hrs | Est. cost |
|---|-------------------|--------------------------|--------------|-----------|
| 1 | <baseline> | <why> | <h> | $<cost> |
| 2 | <candidate> | <why> | <h> | $<cost> |
HP Search Space:
Candidate 1 — <model>:
<param>: range=[<lo>, <hi>], scale=<log|linear>, search=<strategy>
Success criteria:
- Primary: <metric> ≥ <threshold> vs. baseline
- Failure trigger per candidate: <condition>
- Time-box per candidate: <duration>
Experiment ordering:
1. Run <candidate> — expected <duration>, budget <GPU-hrs>
2. If criterion met: STOP and proceed to feature-engineer / check-data-pipeline
If not: run <next candidate>
Decision: GO | NO-GO (missing: <what>)
JSON artifact
Write plan-experiment.json to --out-dir (or ./ if invoked standalone) following the schema in ../../references/schemas.md. Use vocabulary from ../../references/vocabulary.md.
Key fields to populate from the plan output:
decision: GO when plan is complete and ready; NO-GO when blocking input is missing
hypothesis, candidates, success_criteria, experiment_order
findings: one entry per blocker or gap (severity blocker for missing metric/dataset, medium for warnings)
next_commands: ordered experiment run commands
Quick heuristics
- No baseline → add one before any deep learning candidate; reject plan otherwise
- Budget < 1 GPU-hour for all candidates → suggest CPU-only models or reduce search trials
- Dataset < 10 K rows → warn against deep learning; prefer tree ensembles or linear models
- No metric chosen → request metric or invoke
review-target
- User says "try everything" → cap at 5 model families / 50 trials total; apply successive halving
- All candidates are neural networks → add gradient-boosted trees as Candidate #2 (strong baseline for tabular data)
Stop conditions
Stop when:
- experiment plan with all sections is complete and ordering is defined, or
- blocking input (metric, dataset, task type) is missing and explicitly requested.
Additional resources
- references/hp-search-strategies.md — HP ranges by model family and search algorithm selection
- references/compute-estimation-guide.md — GPU throughput heuristics and cost formulas
1---2name: plan-experiment3description: Designs a structured ML experiment plan with hypothesis, model candidates, hyperparameter search space, compute budget, and experiment ordering. Invoke automatically whenever a user has a defined target and wants to start training — even if they just say "let's train a model", "I want to try a few models", or "what should I run first?" Running compute without an experiment plan wastes GPU hours and delays signal.4---56# Plan Experiment78Design a structured experiment plan before burning compute. Produce a prioritized ordering of model candidates with hypothesis, HP search space, compute estimates, and success criteria.910## Invocation1112Arguments (`$ARGUMENTS`) are interpreted as:1314- `--task` — modeling task type (classification, regression, ranking, forecasting)15- `--data PATH|DATASET` — dataset path or identifier16- `--metric METRIC` — primary evaluation metric (e.g., `f1`, `rmse`, `ndcg@10`)17- `--budget GPU_HOURS` — total compute budget in GPU-hours (default: ask)18- `--max-candidates N` — maximum model families to evaluate (default: 5)19- `--horizon DURATION` — prediction window if applicable2021Target: `$ARGUMENTS`2223## Your responsibilities2425### 1. Translate objective into a falsifiable ML hypothesis2627State the hypothesis in the form:2829> "We believe [model family] will achieve [metric] ≥ [threshold] on [dataset] within [compute budget], because [rationale]."3031If the objective or metric is missing, invoke `review-target` before proceeding.3233### 2. Select 2–5 model candidates3435Always include:3637- **Candidate #1**: simplest possible baseline (logistic regression, linear regression, decision tree, or frequency prior)38- Additional candidates ranked by expected signal per compute dollar3940Use [references/hp-search-strategies.md](references/hp-search-strategies.md) for model family guidance. Cap at `--max-candidates` (default 5).4142### 3. Define HP search space per candidate4344For each candidate, specify:4546- hyperparameter names, ranges, and scales (log, linear, categorical)47- search strategy (grid, random, Bayesian, successive halving)48- number of trials and early-stopping rule4950Use [references/hp-search-strategies.md](references/hp-search-strategies.md) for family-specific default ranges.5152### 4. Estimate compute requirements5354For each candidate:5556- estimate GPU-hours using [references/compute-estimation-guide.md](references/compute-estimation-guide.md)57- convert to approximate cost (use $3/GPU-hour as default cloud estimate unless user specifies)58- flag if total budget is exceeded; suggest pruning strategy5960### 5. Set success/failure criteria and time-box6162Define:6364- primary success criterion (metric threshold to beat baseline)65- failure trigger (stop condition per candidate: no improvement after N trials, loss diverges, etc.)66- wall-clock time-box per candidate6768### 6. Recommend experiment ordering6970Order candidates by:71721. cheapest/fastest first (quick signal)732. successive halving: allocate more budget to survivors743. skip candidates if earlier results already beat success criterion7576## Output format7778```text79Experiment Plan80===============81Objective: <business outcome>82Hypothesis: <falsifiable statement>83Task: <task type>84Primary metric: <metric>85Dataset: <path/ID>86Total budget: <GPU-hours> (~$<cost>)8788Model Candidates (ordered):89| # | Model family | Rationale | Est. GPU-hrs | Est. cost |90|---|-------------------|--------------------------|--------------|-----------|91| 1 | <baseline> | <why> | <h> | $<cost> |92| 2 | <candidate> | <why> | <h> | $<cost> |9394HP Search Space:95Candidate 1 — <model>:96 <param>: range=[<lo>, <hi>], scale=<log|linear>, search=<strategy>9798Success criteria:99- Primary: <metric> ≥ <threshold> vs. baseline100- Failure trigger per candidate: <condition>101- Time-box per candidate: <duration>102103Experiment ordering:1041. Run <candidate> — expected <duration>, budget <GPU-hrs>1052. If criterion met: STOP and proceed to feature-engineer / check-data-pipeline106 If not: run <next candidate>107108Decision: GO | NO-GO (missing: <what>)109```110111### JSON artifact112113Write `plan-experiment.json` to `--out-dir` (or `./` if invoked standalone) following the schema in [../../references/schemas.md](../../references/schemas.md). Use vocabulary from [../../references/vocabulary.md](../../references/vocabulary.md).114115Key fields to populate from the plan output:116117- `decision`: `GO` when plan is complete and ready; `NO-GO` when blocking input is missing118- `hypothesis`, `candidates`, `success_criteria`, `experiment_order`119- `findings`: one entry per blocker or gap (severity `blocker` for missing metric/dataset, `medium` for warnings)120- `next_commands`: ordered experiment run commands121122## Quick heuristics123124- No baseline → add one before any deep learning candidate; reject plan otherwise125- Budget < 1 GPU-hour for all candidates → suggest CPU-only models or reduce search trials126- Dataset < 10 K rows → warn against deep learning; prefer tree ensembles or linear models127- No metric chosen → request metric or invoke `review-target`128- User says "try everything" → cap at 5 model families / 50 trials total; apply successive halving129- All candidates are neural networks → add gradient-boosted trees as Candidate #2 (strong baseline for tabular data)130131## Stop conditions132133Stop when:134135- experiment plan with all sections is complete and ordering is defined, or136- blocking input (metric, dataset, task type) is missing and explicitly requested.137138## Additional resources139140- [references/hp-search-strategies.md](references/hp-search-strategies.md) — HP ranges by model family and search algorithm selection141- [references/compute-estimation-guide.md](references/compute-estimation-guide.md) — GPU throughput heuristics and cost formulas