💡 AI Labo Benchmark Series — Experiment
E56a(Cost-Optimization Ablation onE56)Part of our controlled benchmark series testing AI coding agent harnesses inside network-isolated Proxmox VMs (
N=3counterbalancedAB/BA/ABtrials,temperature=0.7, 3-UID grading, 90% prefix-cache cost accounting).
In E56, running our Shepherd branch swarm benchmark on gemini-4-carbon (MEDIUM) cost `$11.27` across 3 trials—and 53.9% (`$6.07`) was burned on 19 MAX_TOKENS truncations! Our first instinct was simple: downgrade gemini-4-carbon from MEDIUM to LOW.
That failed immediately—tripping a `$2.00` budget cap mid-run. So we re-ran the exact same E56 fixture and 32-case grader on symmetric gemini-3.8-flash (LOW) (N=3), cutting suite cost by -94.94% (19.8x cheaper) with 0 truncations.
TL;DR — Key Empirical Findings
- 1. Why Naive
Carbon LOWDowngrade (plan-a) Failed: Loweringgemini-4-carbontoLOW(16,384max tokens) did not stop runaway internal reasoning during multi-file generation. Inplan-a,Baseline (Carbon LOW)hitMAX_TOKENS4/11times in Trial 1 (`$0.8767`wasted) and6/9times in Trial 2 (16,381tokens per truncation), blowing past the`$2.00`/trial budget cap (usd_cap_exceeded) atseq=20. - 2. Symmetric
gemini-3.8-flash LOW(plan-a-rev) Cut Cost-94.94%& Sped Up9.09x: AcrossN=3trials on the identicalE56fixture, switching both modes togemini-3.8-flash (LOW)dropped 3-trial effective cached cost from`$11.2666`to`$0.5696`(-94.94%,1/19.8th), eliminatedMAX_TOKENS(19/70➔0/43calls;`$6.0698`➔`$0.0000`wasted), and cut total runtime from9,897.56s(165 min) to **18.1 min,1,088.71s(9.09xfaster)**. - 3. Eliminating
MAX_TOKENSRevealed the True Task Ceiling: Once0truncations occurred, both modes passed32.00 ± 0.00 / 32across all 3 trials (Baseline:99.88 ± 0.21%vs.Candidate:99.91 ± 0.16%unseen optimality,+0.03 pt). Part ofE56'sCarbon MEDIUMaccuracy gap (93.3%vs.100%) had been amplified byMAX_TOKENSstarving Trial 1 of a refinement turn—proving why a cheapN=1Flash pre-rehearsal must gate frontier runs.
Metric (N=3 Suite on Identical E56 Task) |
Original E56: Carbon MEDIUM |
plan-a-rev: Flash LOW (N=3) |
Delta (plan-a-rev vs. E56) |
|---|---|---|---|
| 3-Trial Effective Cost (90% OFF) | `$11.2666` (list `$12.3332`) |
`$0.5696` (list `$0.7252`) |
-94.94% (19.8x cheaper) |
Total Model Calls / MAX_TOKENS |
70 calls / 19 hits (27.1%) |
43 calls / 0 hits (0.0%) |
-38.6% calls / -100% hits |
Wasted Spend on MAX_TOKENS |
`$6.0698` (53.9% of total!) |
`$0.0000` (0.0%) |
`-$6.0698` waste eliminated |
Total Suite Time (N=3) |
9,897.56s (~165 min) |
1,088.71s (~18.1 min) |
9.09x faster (-89.0%) |
Mode A Cost / Unseen Score (32) |
`$1.4470` / 30.33 ± 2.89 (93.3%) |
`$0.0477 ± $0.0186` / 32/32 (99.88%) |
-96.7% cost, 17.4x faster |
Mode B Cost / Unseen Score (32) |
`$2.3085` / 32.00 ± 0.00 (100.0%) |
`$0.1422 ± $0.0438` / 32/32 (99.91%) |
-93.8% cost, 9.4x faster |
1. Experiment Design & 3-Tier Escalation Architecture
+-----------------------------------------------------------------------+
| Proxmox VM264 (0 NICs, Exact E56 Fixture & 3-UID 32-Case Grader) |
| |
| Ablation 1 (plan-a: Carbon LOW 16k on Mode A & Shepherd): |
| T1: $1.701 (4 MAX_TOKENS) -> T2: 6 MAX_TOKENS -> HALTED ($2.00 cap) |
| |
| Ablation 2 (plan-a-rev: Symmetric 3.8-flash LOW on all roles, N=3): |
| Pre-rehearsal (N=1): $0.2097, 0 MAX_TOKENS, 32/32 PASS |
| Production (N=3): T1 $0.136 | T2 $0.181 | T3 $0.253 -> $0.5696 total|
+-----------------------------------------------------------------------+
From E56a onward, AI Labo standardized a 3-Tier Model Escalation Policy: start every standard harness comparison at Tier 1 (gemini-3.8-flash LOW, max_output_tokens=32768, `$0.50` trial cap) with an N=1 rehearsal, escalate to Tier 2 (3.8-flash MEDIUM, `$1.00` cap) only if Flash LOW drops below 80% on unseen tests, and reserve Tier 3 (gemini-4-carbon) strictly for cross-generation or frontier-specific hypotheses.
2. Drop-In Implementation Recipe: Tier Gate & Hard Budget Cap
Enforce symmetric model selection, generous output ceilings (32768 so thinking tokens never collide with multi-file code writes), and a hard micro-USD circuit breaker inside your LLM relay:
TIERS = {
"tier1_flash_low": {"model": "gemini-3.8-flash", "thinking": "LOW", "max_out": 32768, "cap_usd": 0.50},
"tier2_flash_med": {"model": "gemini-3.8-flash", "thinking": "MEDIUM", "max_out": 32768, "cap_usd": 1.00},
"tier3_carbon": {"model": "gemini-4-carbon", "thinking": "MEDIUM", "max_out": 32768, "cap_usd": 2.50},
}
def select_benchmark_tier(rehearsal_unseen_pct: float, requires_frontier_behavior: bool) -> dict:
"""Routes benchmarks to the cheapest tier with sufficient discriminative power."""
if requires_frontier_behavior:
return TIERS["tier3_carbon"]
if rehearsal_unseen_pct < 80.0:
return TIERS["tier2_flash_med"]
return TIERS["tier1_flash_low"]
def guard_relay_budget(spent_micro_usd: int, tier: dict) -> None:
"""Hard relay circuit breaker preventing silent $11+ benchmark runaways."""
cap_micro = int(tier["cap_usd"] * 1_000_000)
if spent_micro_usd >= cap_micro:
raise RuntimeError(f"USD_CAP_EXCEEDED: {spent_micro_usd} >= {cap_micro} micro-USD")
- Why this works: Pairing an
N=1Flash rehearsal with a hardusd_cap_microrelay stop detects both ceiling effects and runawayMAX_TOKENSloops before committing to anN=3frontier sweep.
3. Threats to Validity & When NOT to Use This
- Task Ceiling vs. Harder Frontier Problems:
E56aproved3.8-flash LOWnearly maxed outE56'sspecinfer-scheduler-v2fixture (99.88%vs.99.91%), meaningE56did not requireCarbon's deep reasoning onceMAX_TOKENSwas removed. Harder tasks with undocumented legacy traps (E46:30/34vs.34/34) still require frontier models. - Output Cap (
16,384vs.32,768): While3.8-flash LOWproduced0MAX_TOKENSat16,384here,E60later showedFlashcan still hit16,384when writing 4+ modules in one shot—so setmax_output_tokens=32768and instruct 1–2 module chunked writes. - When to Keep
Carbon: Keepgemini-4-carbonwhen the research question explicitly targets frontier reasoning behavior (e.g., double-thinking taxE47, spec-conflict governanceE49, or undocumented invariant discoveryE46).
📋 Experiment Metadata & Reproducibility
- Experiment ID:
E56a(Cost-Optimization Ablation onE56/ Benchmark v2.1) - Run IDs:
e56a-20261123-vm264-01-rehearsal(N=1),plan-a(halted T2seq=20),plan-a-rev(N=3:AB➔BA➔AB,temperature=0.7) - Sandbox Environment: Proxmox Isolated VM
VM264(0 NICs,PrivateNetwork=yes, 3-UID isolation:labexp56/labrunner56/labjudge56) - Models:
models/gemini-4-carbon(LOW, failed) vs.models/gemini-3.8-flash(LOW,N=3passed) - Cost Accounting: Google 90% implicit prefix-cache discount (
effective_cached_micro_usd) as primary metric; list-price upper bound reported alongside.
Discussion: When an agent benchmark gets too expensive or hits MAX_TOKENS, do you first lower thinkingLevel on the frontier model—or drop down to a Flash-class model?
🔗 Continue Reading the Series
- 🚀 Master Benchmark Hub: AI Agent Harness Patterns Benchmark
- 🛡️ Methodology & Sandbox Architecture: How to Benchmark AI Agents Without Eval Cheating or API Key Leaks: Designing a Proxmox & systemd Sandbox
- ⬅️ Parent Benchmark (
E56): Shepherd Branch Swarms Beat Public-Test Overfitting: 100% vs. 93.3% (N=3) - ⚖️ Related Cross-Gen Boundary (
E46): Cross-Generation Capability vs. Cost Boundary: Unharnessed Gemini 4 Carbon (HIGH) vs. Harnessed 3.8 Flash (LOW) (-88.6% Cost, N=5) - ✂️ Related Subtraction Tax (
E47): Measuring the Double-Thinking Tax on Gemini 4 Carbon: Subtracting Legacy Scaffolding Cuts Effective Cost by 30.9% (N=3)
Comments
Join the discussionNo comments yet. Be the first to comment.