Iterative Learning Experimental Design Lens
Philosophical Mode: Decision-Theoretic
Primary Question: "How does this maximize learning per cost?"
Focus: Factor Selection, Interaction Probing, Adaptive Allocation, Stopping Rules, Next-Experiment Planning
When to Use
- Planning a sequence of experiments
- Optimizing hyperparameter search
- Ablation study design
- User invokes
/exp-lens-iterative-learning or /make-experiment-diag iterative
Critical Constraints
NEVER:
- Modify any source code files
- Do not litter the codebase with useless comments, TODO markers, or explanatory annotations — the skill output and diagram speak for themselves
- Recommend one-factor-at-a-time exploration when interactions are plausible
ALWAYS:
- Evaluate exploration efficiency against the key uncertainty being reduced
- Identify high-value unexplored regions of the factor space
- Assess whether the stopping rule is principled or arbitrary
- Surface interaction structure that one-factor-at-a-time designs would miss
- BEFORE creating any diagram, LOAD the
/mermaid skill using the Skill tool - this is MANDATORY
Analysis Workflow
Step 1: Launch Parallel Exploration Subagents
Spawn Explore subagents to investigate:
Factor Space
- Find all experimental factors and their ranges
- Look for:
hyperparameter, config, param, factor, level, range, grid, sweep
Interaction Structure
- Find evidence of factor interactions
- Look for:
interaction, ablation, factorial, combination, cross, joint
Cost & Resource Model
- Find compute/time/cost constraints
- Look for:
budget, cost, time, gpu, compute, resource, quota, limit
Sequential Decision Logic
- Find adaptive or sequential experiment logic
- Look for:
bayesian_opt, optuna, hyperband, successive, early_stop, adaptive, bandit
Learning Objectives
- Find what uncertainty the experiments aim to reduce
- Look for:
objective, goal, hypothesis, question, target, uncertainty, explore
Step 2: Map the Design Space
Map the design space (factors x levels), identify which regions have been explored, which interactions are probed, and what the next high-value experiment would be. Assess whether the experimental sequence is efficient (reducing key uncertainty) or wasteful (one-factor-at-a-time in interacting systems).
Step 3: CRITICAL — Analyze Learning Efficiency
For every factor and experiment round:
- Information gain: What uncertainty does this experiment reduce? What does it leave unresolved?
- Interaction risk: Are there factors that likely interact? Does the design probe those interactions?
- Cost-efficiency: What is the cost per unit of learning? Is there a cheaper design with equivalent learning value?
- Exploration-exploitation: Is the strategy exploring new regions or exploiting known good regions prematurely?
- Stopping rule: Is the stopping criterion based on a principled uncertainty threshold, or is it arbitrary (fixed budget, time limit)?
Distinguish clearly:
- Full factorial: Explores all combinations — exhaustive but expensive, catches all interactions
- Fractional factorial: Efficient but aliases some interaction effects
- One-factor-at-a-time: Simple but misses interactions — inefficient in correlated spaces
- Adaptive/Bayesian: High efficiency when the response surface is smooth — risks local optima
Step 4: Create the Diagram
Use flowchart with:
Direction: LR (learning flows from exploration to refinement)
Subgraphs:
FACTOR SPACE
EXPLORATION STRATEGY
RESULTS SO FAR
NEXT EXPERIMENTS
STOPPING CRITERIA
Node Styling:
stateNode class: factors/parameters
handler class: exploration strategies
phase class: experiment rounds
output class: results/learnings
cli class: objectives
gap class: unexplored high-value regions
detector class: stopping criteria
Step 5: Write Output
Write the diagram to: temp/exp-lens-iterative-learning/exp_diag_iterative_learning_{YYYY-MM-DD_HHMMSS}.md
Output Template
# Iterative Learning Diagram: {System Name}
**Lens:** Iterative Learning (Decision-Theoretic)
**Question:** How does this maximize learning per cost?
**Date:** {YYYY-MM-DD}
**Scope:** {What was analyzed}
## Factor Space
| Factor | Range | Levels | Explored? | Interaction Risk |
|--------|-------|--------|-----------|-----------------|
| {Factor 1} | {min}–{max} | {n} | ✓ Full | Low |
| {Factor 2} | {min}–{max} | {n} | ✓ Partial | High |
| {Factor 3} | {min}–{max} | {n} | ✗ None | Unknown |
## Iterative Learning Design-Space Diagram
```mermaid
%%{init: {'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60, 'curve': 'basis'}}}%%
flowchart LR
%% CLASS DEFINITIONS %%
classDef cli fill:#1a237e,stroke:#7986cb,stroke-width:2px,color:#fff;
classDef stateNode fill:#004d40,stroke:#4db6ac,stroke-width:2px,color:#fff;
classDef handler fill:#e65100,stroke:#ffb74d,stroke-width:2px,color:#fff;
classDef phase fill:#6a1b9a,stroke:#ba68c8,stroke-width:2px,color:#fff;
classDef newComponent fill:#2e7d32,stroke:#81c784,stroke-width:2px,color:#fff;
classDef output fill:#00695c,stroke:#4db6ac,stroke-width:2px,color:#fff;
classDef detector fill:#b71c1c,stroke:#ef5350,stroke-width:2px,color:#fff;
classDef gap fill:#ff6f00,stroke:#ffa726,stroke-width:2px,color:#000;
classDef integration fill:#c62828,stroke:#ef9a9a,stroke-width:2px,color:#fff;
subgraph Factors ["FACTOR SPACE"]
direction TB
F1["{Factor 1}<br/>━━━━━━━━━━<br/>{range}, {levels} levels"]
F2["{Factor 2}<br/>━━━━━━━━━━<br/>{range}, {levels} levels"]
F3["{Factor 3}<br/>━━━━━━━━━━<br/>{range}, {levels} levels"]
end
subgraph Strategy ["EXPLORATION STRATEGY"]
direction TB
STRAT["{Strategy Type}<br/>━━━━━━━━━━<br/>{e.g., Bayesian/Grid/OFAT}"]
end
subgraph Rounds ["RESULTS SO FAR"]
direction TB
R1["{Round 1}<br/>━━━━━━━━━━<br/>{n} runs, {finding}"]
R2["{Round 2}<br/>━━━━━━━━━━<br/>{n} runs, {finding}"]
end
subgraph Next ["NEXT EXPERIMENTS"]
direction TB
NX1["{Next Experiment 1}<br/>━━━━━━━━━━<br/>{rationale}"]
NX2["{Next Experiment 2}<br/>━━━━━━━━━━<br/>{rationale}"]
end
subgraph Stopping ["STOPPING CRITERIA"]
direction TB
STOP["{Stopping Rule}<br/>━━━━━━━━━━<br/>{threshold or condition}"]
end
OBJ["{Learning Objective}<br/>━━━━━━━━━━<br/>{key uncertainty to reduce}"]
UNEXPLORED["{High-Value Unexplored Region}<br/>━━━━━━━━━━<br/>{what is missing and why it matters}"]
OBJ --> F1
OBJ --> F2
OBJ --> F3
F1 --> STRAT
F2 --> STRAT
F3 --> STRAT
STRAT --> R1
R1 --> R2
R2 --> NX1
R2 --> NX2
NX1 --> STOP
NX2 --> STOP
UNEXPLORED -.->|missed| STRAT
%% CLASS ASSIGNMENTS %%
class F1,F2,F3 stateNode;
class STRAT handler;
class R1,R2 phase;
class NX1,NX2 output;
class OBJ cli;
class UNEXPLORED gap;
class STOP detector;
Color Legend:
| Color |
Category |
Description |
| Dark Teal |
Factors |
Experimental factors and parameters |
| Orange |
Strategy |
Exploration strategy used |
| Purple |
Rounds |
Completed experiment rounds |
| Teal |
Next |
Recommended next experiments |
| Dark Blue |
Objective |
Learning objective |
| Yellow/Amber |
Gaps |
Unexplored high-value regions |
| Red |
Stopping |
Stopping criteria |
Efficiency Assessment
| Round |
Cost |
Key Learning |
Uncertainty Reduced |
Efficiency Rating |
| {Round 1} |
{cost} |
{finding} |
{what resolved} |
High/Med/Low |
| {Round 2} |
{cost} |
{finding} |
{what resolved} |
High/Med/Low |
Recommended Next Steps
| Priority |
Experiment |
Factors |
Expected Learning |
Cost Estimate |
| 1 |
{description} |
{factors to vary} |
{uncertainty reduced} |
{cost} |
| 2 |
{description} |
{factors to vary} |
{uncertainty reduced} |
{cost} |
---
## Pre-Diagram Checklist
Before creating the diagram, verify:
- [ ] LOADED `/mermaid` skill using the Skill tool
- [ ] Using ONLY classDef styles from the mermaid skill (no invented colors)
- [ ] Diagram will include a color legend table
---
## Related Skills
- `/make-experiment-diag` - Parent skill for lens selection
- `/mermaid` - MUST BE LOADED before creating diagram
- `/exp-lens-sensitivity-robustness` - For factor sensitivity analysis
- `/exp-lens-error-budget` - For cost and resource constraint analysis
1---2name: exp-lens-iterative-learning3description: Create Iterative Learning experimental design diagram showing factor space exploration, adaptive allocation, and next-experiment recommendations. Decision-Theoretic lens answering "How does this maximize learning per cost?"4---56# Iterative Learning Experimental Design Lens78**Philosophical Mode:** Decision-Theoretic9**Primary Question:** "How does this maximize learning per cost?"10**Focus:** Factor Selection, Interaction Probing, Adaptive Allocation, Stopping Rules, Next-Experiment Planning1112## When to Use1314- Planning a sequence of experiments15- Optimizing hyperparameter search16- Ablation study design17- User invokes `/exp-lens-iterative-learning` or `/make-experiment-diag iterative`1819## Critical Constraints2021**NEVER:**22- Modify any source code files23- Do not litter the codebase with useless comments, TODO markers, or explanatory annotations — the skill output and diagram speak for themselves24- Recommend one-factor-at-a-time exploration when interactions are plausible2526**ALWAYS:**27- Evaluate exploration efficiency against the key uncertainty being reduced28- Identify high-value unexplored regions of the factor space29- Assess whether the stopping rule is principled or arbitrary30- Surface interaction structure that one-factor-at-a-time designs would miss31- BEFORE creating any diagram, LOAD the `/mermaid` skill using the Skill tool - this is MANDATORY3233---3435## Analysis Workflow3637### Step 1: Launch Parallel Exploration Subagents3839Spawn Explore subagents to investigate:4041**Factor Space**42- Find all experimental factors and their ranges43- Look for: `hyperparameter`, `config`, `param`, `factor`, `level`, `range`, `grid`, `sweep`4445**Interaction Structure**46- Find evidence of factor interactions47- Look for: `interaction`, `ablation`, `factorial`, `combination`, `cross`, `joint`4849**Cost & Resource Model**50- Find compute/time/cost constraints51- Look for: `budget`, `cost`, `time`, `gpu`, `compute`, `resource`, `quota`, `limit`5253**Sequential Decision Logic**54- Find adaptive or sequential experiment logic55- Look for: `bayesian_opt`, `optuna`, `hyperband`, `successive`, `early_stop`, `adaptive`, `bandit`5657**Learning Objectives**58- Find what uncertainty the experiments aim to reduce59- Look for: `objective`, `goal`, `hypothesis`, `question`, `target`, `uncertainty`, `explore`6061### Step 2: Map the Design Space6263Map the design space (factors x levels), identify which regions have been explored, which interactions are probed, and what the next high-value experiment would be. Assess whether the experimental sequence is efficient (reducing key uncertainty) or wasteful (one-factor-at-a-time in interacting systems).6465### Step 3: CRITICAL — Analyze Learning Efficiency6667For every factor and experiment round:68- **Information gain**: What uncertainty does this experiment reduce? What does it leave unresolved?69- **Interaction risk**: Are there factors that likely interact? Does the design probe those interactions?70- **Cost-efficiency**: What is the cost per unit of learning? Is there a cheaper design with equivalent learning value?71- **Exploration-exploitation**: Is the strategy exploring new regions or exploiting known good regions prematurely?72- **Stopping rule**: Is the stopping criterion based on a principled uncertainty threshold, or is it arbitrary (fixed budget, time limit)?7374Distinguish clearly:75- **Full factorial**: Explores all combinations — exhaustive but expensive, catches all interactions76- **Fractional factorial**: Efficient but aliases some interaction effects77- **One-factor-at-a-time**: Simple but misses interactions — inefficient in correlated spaces78- **Adaptive/Bayesian**: High efficiency when the response surface is smooth — risks local optima7980### Step 4: Create the Diagram8182Use flowchart with:8384**Direction:** `LR` (learning flows from exploration to refinement)8586**Subgraphs:**87- `FACTOR SPACE`88- `EXPLORATION STRATEGY`89- `RESULTS SO FAR`90- `NEXT EXPERIMENTS`91- `STOPPING CRITERIA`9293**Node Styling:**94- `stateNode` class: factors/parameters95- `handler` class: exploration strategies96- `phase` class: experiment rounds97- `output` class: results/learnings98- `cli` class: objectives99- `gap` class: unexplored high-value regions100- `detector` class: stopping criteria101102### Step 5: Write Output103104Write the diagram to: `temp/exp-lens-iterative-learning/exp_diag_iterative_learning_{YYYY-MM-DD_HHMMSS}.md`105106---107108## Output Template109110```markdown111# Iterative Learning Diagram: {System Name}112113**Lens:** Iterative Learning (Decision-Theoretic)114**Question:** How does this maximize learning per cost?115**Date:** {YYYY-MM-DD}116**Scope:** {What was analyzed}117118## Factor Space119120| Factor | Range | Levels | Explored? | Interaction Risk |121|--------|-------|--------|-----------|-----------------|122| {Factor 1} | {min}–{max} | {n} | ✓ Full | Low |123| {Factor 2} | {min}–{max} | {n} | ✓ Partial | High |124| {Factor 3} | {min}–{max} | {n} | ✗ None | Unknown |125126## Iterative Learning Design-Space Diagram127128```mermaid129%%{init: {'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60, 'curve': 'basis'}}}%%130flowchart LR131 %% CLASS DEFINITIONS %%132 classDef cli fill:#1a237e,stroke:#7986cb,stroke-width:2px,color:#fff;133 classDef stateNode fill:#004d40,stroke:#4db6ac,stroke-width:2px,color:#fff;134 classDef handler fill:#e65100,stroke:#ffb74d,stroke-width:2px,color:#fff;135 classDef phase fill:#6a1b9a,stroke:#ba68c8,stroke-width:2px,color:#fff;136 classDef newComponent fill:#2e7d32,stroke:#81c784,stroke-width:2px,color:#fff;137 classDef output fill:#00695c,stroke:#4db6ac,stroke-width:2px,color:#fff;138 classDef detector fill:#b71c1c,stroke:#ef5350,stroke-width:2px,color:#fff;139 classDef gap fill:#ff6f00,stroke:#ffa726,stroke-width:2px,color:#000;140 classDef integration fill:#c62828,stroke:#ef9a9a,stroke-width:2px,color:#fff;141142 subgraph Factors ["FACTOR SPACE"]143 direction TB144 F1["{Factor 1}<br/>━━━━━━━━━━<br/>{range}, {levels} levels"]145 F2["{Factor 2}<br/>━━━━━━━━━━<br/>{range}, {levels} levels"]146 F3["{Factor 3}<br/>━━━━━━━━━━<br/>{range}, {levels} levels"]147 end148149 subgraph Strategy ["EXPLORATION STRATEGY"]150 direction TB151 STRAT["{Strategy Type}<br/>━━━━━━━━━━<br/>{e.g., Bayesian/Grid/OFAT}"]152 end153154 subgraph Rounds ["RESULTS SO FAR"]155 direction TB156 R1["{Round 1}<br/>━━━━━━━━━━<br/>{n} runs, {finding}"]157 R2["{Round 2}<br/>━━━━━━━━━━<br/>{n} runs, {finding}"]158 end159160 subgraph Next ["NEXT EXPERIMENTS"]161 direction TB162 NX1["{Next Experiment 1}<br/>━━━━━━━━━━<br/>{rationale}"]163 NX2["{Next Experiment 2}<br/>━━━━━━━━━━<br/>{rationale}"]164 end165166 subgraph Stopping ["STOPPING CRITERIA"]167 direction TB168 STOP["{Stopping Rule}<br/>━━━━━━━━━━<br/>{threshold or condition}"]169 end170171 OBJ["{Learning Objective}<br/>━━━━━━━━━━<br/>{key uncertainty to reduce}"]172 UNEXPLORED["{High-Value Unexplored Region}<br/>━━━━━━━━━━<br/>{what is missing and why it matters}"]173174 OBJ --> F1175 OBJ --> F2176 OBJ --> F3177 F1 --> STRAT178 F2 --> STRAT179 F3 --> STRAT180 STRAT --> R1181 R1 --> R2182 R2 --> NX1183 R2 --> NX2184 NX1 --> STOP185 NX2 --> STOP186 UNEXPLORED -.->|missed| STRAT187188 %% CLASS ASSIGNMENTS %%189 class F1,F2,F3 stateNode;190 class STRAT handler;191 class R1,R2 phase;192 class NX1,NX2 output;193 class OBJ cli;194 class UNEXPLORED gap;195 class STOP detector;196```197198**Color Legend:**199| Color | Category | Description |200|-------|----------|-------------|201| Dark Teal | Factors | Experimental factors and parameters |202| Orange | Strategy | Exploration strategy used |203| Purple | Rounds | Completed experiment rounds |204| Teal | Next | Recommended next experiments |205| Dark Blue | Objective | Learning objective |206| Yellow/Amber | Gaps | Unexplored high-value regions |207| Red | Stopping | Stopping criteria |208209## Efficiency Assessment210211| Round | Cost | Key Learning | Uncertainty Reduced | Efficiency Rating |212|-------|------|-------------|--------------------|--------------------|213| {Round 1} | {cost} | {finding} | {what resolved} | High/Med/Low |214| {Round 2} | {cost} | {finding} | {what resolved} | High/Med/Low |215216## Recommended Next Steps217218| Priority | Experiment | Factors | Expected Learning | Cost Estimate |219|----------|-----------|---------|------------------|---------------|220| 1 | {description} | {factors to vary} | {uncertainty reduced} | {cost} |221| 2 | {description} | {factors to vary} | {uncertainty reduced} | {cost} |222```223224---225226## Pre-Diagram Checklist227228Before creating the diagram, verify:229230- [ ] LOADED `/mermaid` skill using the Skill tool231- [ ] Using ONLY classDef styles from the mermaid skill (no invented colors)232- [ ] Diagram will include a color legend table233234---235236## Related Skills237238- `/make-experiment-diag` - Parent skill for lens selection239- `/mermaid` - MUST BE LOADED before creating diagram240- `/exp-lens-sensitivity-robustness` - For factor sensitivity analysis241- `/exp-lens-error-budget` - For cost and resource constraint analysis