Skip to content

lab: GAIA evolve harness on a generalized eval/evolve-loop - #1616

Merged
Evanfeenstra merged 1 commit into
mainfrom
gaia-evolve
Aug 28, 2026
Merged

lab: GAIA evolve harness on a generalized eval/evolve-loop#1616
Evanfeenstra merged 1 commit into
mainfrom
gaia-evolve

Conversation

@Evanfeenstra

Copy link
Copy Markdown
Collaborator

What

Ports the harvey self-evolving setup to GAIA — and does it by generalizing the loop rather than copying it, per EVOLVE_SPEC §9.5 ("the GENERIC step remains open — this is the shape it should generalize").

The generic loop

  • harvey/evolve-loopeval/evolve-loop (mcp/src/lab/eval/steps/evolve-loop.ts): same best-anchored hill-climb (briefings from all prior attempts, exploit→explore flip after exploreAfter stalls, durable resume, run-control checkpoints), now domain-neutral. A domain plugs in its gen workflow plus a digest emitting fitness (fallback meanPassRate) and a fitnessName for briefings. harvey-evolve rewires onto it; its report fields (bestPassRate etc.) are unchanged.

The GAIA instance

  • gaia-run now takes input.produceWorkflow (was hardcoded) — grades any seeded produce variant, matching harvey-run.
  • gaia/evaluate fromRun mode: unpacks a candidate run's answer in code (the template evaluator does not short-circuit — §5.3.5); a failed candidate run scores as "", an honest zero that never aborts a batch. Also returns gold-stripped question/level for digests.
  • gaia/digest-results: accuracy as fitness, each miss tagged wrong-answer / empty-answer / produce-error (§8's formatting/persistence/tooling taxonomy, cheap code-only version), candidate answers + question excerpts for misses. Gold never enters or leaves this step.
  • gaia-candidate-run: runs an ai-stamped candidate on one task via meta/run-workflow (own runId, fresh registry, refuses seeded workflows) and grades fromRun.
  • gaia-evolve-gen / gaia-evolve: meta/*-only author generations over the task set. GAIA-adapted author method: exact-match answer formatting is the top lever, then persistence, tooling, structure; candidate contract is input { taskId }{ taskId, answer, cost, steps }, and embedding gaia/evaluate in a candidate (produce-time oracle) is called out as disqualifying at promotion review.

Measurement discipline

  • improveMargin: 0 for GAIA — exact-match scoring has no judge noise; any task flip counts. The residual produce-sampling noise is answered by held-out validation (the report's TRAIN-score note demands it), not a margin.
  • Scores remain train scores; promotion stays human.

Testing

  • New offline smoke npx tsx src/lab/gaia/evolve-smoke.ts — workflow parses/registry, template no-short-circuit guards, fromRun semantics (honest zero, metadata degradation, mode exclusivity), digest shape normalization + miss taxonomy, loop fitness/naming/margin-0 ties.
  • npx tsx src/lab/harvey/evolve-smoke.ts (updated for the generic loop) — passes.
  • npx tsx src/lab/gaia/smoke.ts — passes. tsc --noEmit clean.

Docs updated: EVOLVE_SPEC.md §9.5, lab/AGENTS.md (eval + gaia sections).

🤖 Generated with Claude Code

…EC §9.5)

Promote harvey/evolve-loop to the GENERIC eval/evolve-loop the spec called
for: domain-neutral hill-climb over workflow versions, reading the gen
digest's `fitness` (fallback meanPassRate) and naming it via `fitnessName`
in briefings. harvey-evolve rewires onto it (pass-rate fitness, report
field names unchanged).

GAIA instance, mirroring harvey's produce/grade split:
- gaia-run takes input.produceWorkflow (was hardcoded to gaia-produce)
- gaia/evaluate gains a fromRun mode: unpacks a candidate run's answer in
  code (no-short-circuit template rule, §5.3.5) — a failed run scores as
  "" (honest zero), plus gold-stripped question/level metadata for digests
- gaia/digest-results: accuracy as fitness, misses tagged wrong-answer /
  empty-answer / produce-error (§8's taxonomy, code-only), candidate
  answers + question excerpts, gold never enters or leaves
- gaia-candidate-run: ai-stamped candidate via meta/run-workflow, graded
  fromRun
- gaia-evolve-gen / gaia-evolve: meta/* author generations over the task
  set; improveMargin 0 (exact match has no judge noise — the residual
  produce-sampling noise is answered by held-out validation, per the
  report's TRAIN-score note)

Offline checks: src/lab/gaia/evolve-smoke.ts (workflow parses, template
guards, fromRun semantics, digest shapes, loop fitness/naming); harvey
evolve-smoke updated for the generic loop. tsc clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Evanfeenstra
Evanfeenstra merged commit ab222db into main Aug 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant