VeriEvolve: Evaluator-First Evolution for Tool-Using Agents
Organizations: University of Illinois Urbana-Champaign · aiXplain
Abstract
A central obstacle to self-improving agents is the absence of a reliable fitness signal for realistic stateful tasks. We introduce VeriEvolve, an evaluator-first evolution framework that constructs this missing evaluation layer before optimizing the agent. From task instruction, VeriEvolve synthesizes instruction-grounded challenge states and an executable evaluator that checks them. During each round of workflow evolution, the evaluator is frozen and serves as the fitness signal. Between rounds, VeriEvolve revises the evaluator by converting the end states of strong and weak runs into a pair of counterfactual test cases. Across all 30 MCPMark Filesystem tasks, VeriEvolve constructs 30 evaluators with 141 challenge states, achieving 141/141 agreement on the generated suites and 113/122 agreement on held-out states produced by executor agents. Evaluator-guided evolution increases externally verified success from 6/30 to 18/30 for GLM-5.2 and from 27/30 to 30/30 for Claude; refinement removes all three false positives that the weak executor exposes. Cross-environment studies on PostgreSQL, Playwright, Notion, and GitHub further expose complementary limits from observability, state representation, and search/execution capacity. These results show that executable evaluators can be synthesized and used to guide search when task success is observable and an external verifier is available for calibration.
Figures & tables
| Environment | Constructed | Cases (P/N) | Ext. agreement | Stage-2 study |
|---|---|---|---|---|
| Filesystem | 30/30 | 141 (34/107) | 141/141 | 30/30 |
| PostgreSQL | 18/21 | 120 (22/98) | 115/120 | 15/21 |
| Int/Ext | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Executor | States | / | / | / | / | Agr. | Prec. | Rec. | Spec. |
| GLM-5.2 | 85 | 18 | 3 | 1 | 63 | 95.3 | 85.7 | 94.7 | 95.5 |
| Claude | 44 | 30 | 0 | 5 | 9 | 88.6 | 100.0 | 85.7 | 100.0 |
| All (distinct) | 122 | 41 | 3 | 6 | 72 | 92.6 | 93.2 | 87.2 | 96.0 |
| Executor | Workflow | Int. pass | Ext. pass | FP | FN |
|---|---|---|---|---|---|
| Claude | Seed | 24/30 | 27/30 | 0 | 3 |
| Claude | Evolved | 30/30 | 30/30 | 0 | 0 |
| GLM-5.2 | Seed | 8/30 | 6/30 | 2 | 0 |
| GLM-5.2 | Evolved | 21/30 | 18/30 | 3 | 0 |
| Run | Exec. tok. | Evolver | Wall | Normalized cost |
| Filesystem | ||||
| Stage 2, GLM-5.2 | 33.18M | $31.24 | 43.5 h | 2.76M, $2.60 per gained task (12) |
| Stage 2, Claude | 0.58M a | $1.74 | 5.3 h | 0.19M, $0.58 per gained task (3) |
| Stage 3 | 8.10M | $3.49 | 4.6 h b | 2.70M + 21.4K TSG/VE, $1.16 per repaired evaluator (3) |
| PostgreSQL (15 tasks) | ||||
| Stage 2, GLM-5.2 | 27.82M | $22.74 | 37.4 h | 9.27M per solved task (3) |
Appendix figures & tables22 assets
Supplementary material from the paper’s appendix.
Appendix
| Environment | Universe | RQ1 attempted | S2 eligible | Valid pairs | RQ3 cases | Disposition |
|---|---|---|---|---|---|---|
| Filesystem | 30 | 30 | 30 | 30-task campaigns | 3 | Primary standardized study; no exclusions. |
| PostgreSQL | 21 | 21 | 15 | 15 | 0 | Full Stage 1 disposition and Stage 2 sweep over all eligible tasks; three additional evaluators fall below the admission threshold and three tasks are blocked by the observation interface. |
| Playwright | 4 | 4 | 2 | 2 | 0 | Two formal exclusions: missing independent ground truth and unobservable success state. |
| Notion | 28 | 23 | 2 | 1 historical | 0 | One historical matched pair; broader standardized execution remains limited by the live-state representation. |
| GitHub | 23 | 23 | 1 | 0 standardized | 0 | Incomplete feasibility campaign; one externally calibrated evaluator and one corrected strong-executor , with the corrected weak-executor pair incomplete. |
| Task | Evaluation regime | Representative requirements |
|---|---|---|
| uppercase | Nearly direct specification | Create explicitly named uppercase file copies and a fixed-format word-count artifact. Major instruction clauses map nearly one-to-one to deterministic evaluator checks. |
| structure_mirror | Implicit state specification | Reproduce a transformed hierarchy while satisfying interacting existence, naming, placeholder-content, discard, preservation, and absence constraints. The prohibition on invalid extra structure is exposed only through strong–weak execution-state comparison in the development and controlled runs (Appendix C ). |
| Role | Base model | Invocation | Context and visible inputs | Output |
|---|---|---|---|---|
| Test-Suite Generator, Stage 1 | Claude | Interactive Claude Code CLI | Persistent task session; task instruction, observable initial state, and self-generated artifacts | Declarative labeled challenge-state specification |
| Verifier Evolver, Stage 1 | Claude | Same interactive session | Shares context with the Test-Suite Generator; receives challenge states and deterministic internal scoring feedback | Sandboxed verify(context) evaluator |
| Test-Suite Generator, Stage 3 | Claude Sonnet | Headless retained CLI session | Packet-restricted task instruction, current evaluator, sanitized cases, state-difference facts, and output contract | Anchor-based paired challenge cases |
| Verifier Evolver, Stage 3 | Claude Sonnet | Resumes Stage 3 TSG session | Current evaluator, cumulative cases, factual paired contrasts, and deterministic repair feedback | Localized evaluator edits or replacement code |
| Workflow Evolver | Claude Sonnet | claude -p ; one call per round | Fresh call with alternative statistics, score trajectory, failed checks, and artifact-inspection diagnosis | At most one new alternative per selected node |
| Strong Workflow Executor | Claude Sonnet | Headless CLI subprocess per path | Candidate workflow prompts and isolated task environment | Final environment state and execution trace |
| Stage | Component | Gate or budget |
|---|---|---|
| 1 | Internal construction | Positive acceptance ; adversarial rejection . |
| 1 | Post-hoc admission | External agreement for admission to the standardized Stage 2 study. |
| 2 | Workflow search | Five paths per round; candidate concurrency ; at most rounds. |
| 2 | Candidate resources | Candidate wall-time limit seconds; token budget K; ReAct limit at most by default and at the framework cap. |
| 2 | Strong executor | At most turns and seconds per candidate. |
| 2 | Round timeout | One hour per round subprocess (Filesystem GLM-5.2 and PostgreSQL campaigns); a round that exceeds it ends the run, which is counted as unsolved. |
| Environment | Materialized candidate | Evaluator-visible state | Principal limitation |
|---|---|---|---|
| Filesystem | Isolated directory tree | Paths, file contents, directory structure, and supported metadata | Volatile backup paths and duplicate artifacts require conservative canonicalization. |
| PostgreSQL | Fresh isolated database clone | Canonical schema, relation, and row snapshots | Some object classes and large relations are not fully represented in the internal snapshot. |
| Playwright | Isolated browser execution | Tool transcript and selected browser-state signals | Some tasks lack independent factual ground truth or an observable post-condition. |
| Notion | Duplicated workspace | Canonical page, block, database, and row snapshots | Linked views and serialization changes can obscure or alter the graded state. |
| GitHub | Isolated repository | Repository contents and supported issue, pull-request, and history state | Tool-surface and verifier-environment limitations block broad standardized coverage. |
| Case | Label | Type | Targeted requirement |
|---|---|---|---|
| correct_full_mirror | Positive | Complete transformed mirror. | |
| mirror_dir_missing | Clean negative | Required mirror root is absent. | |
| no_processed_suffix | Adversarial | Digit-containing names are not transformed. | |
| discarded_dir_present | Adversarial | A directory with more than two direct files is retained. | |
| missing_placeholder | Adversarial | A mirrored empty directory lacks its placeholder. |
| Step | Evaluator | Newly exposed difference | New evaluation evidence | Promoted check | Weak-state outcome |
|---|---|---|---|---|---|
| Initial | – | Five initial Stage 1 cases | Presence, renaming, discard, and placeholder checks (5 listed directories) | : | |
| Round 1 | Empty-directory, missing-directory, and missing-file clusters | Six paired counterfactual cases | Three placeholder paths added; regression rejects | : | |
| Round 2 (excluded) | Duplicate directory created by file synchronization | Reproduce/remove pair | Extra-structure absence check | (not counted) |
| Task | Cases (P/N/A) | External agreement | Evaluator SHA | Refinement |
|---|---|---|---|---|
| author_folders | 4 (1/3/3) | 4/4 | cadf0721 | – |
| budget_computation | 6 (1/5/4) | 6/6 | 3ffc73ef | – |
| code_locating | 4 (2/2/2) | 4/4 | af458c70 | – |
| contact_information | 6 (1/5/2) | 6/6 | 31564641 | – |
| dataset_comparison | 4 (1/3/3) | 4/4 | 71bb6f84 | – |
| debugging | 4 (1/3/3) | 4/4 | 06c927a2 | E1 |
| GLM-5.2 (weak) | Claude CLI (strong) | GLM-5.2 loop | |||||
|---|---|---|---|---|---|---|---|
| Task | Seed (Int/Ext) | Evolved (Int/Ext) | Seed (Int/Ext) | Evolved (Int/Ext) | Final round | Best score | Tokens (M) |
| author_folders | / | / | ✓/✓ | ✓/✓ | 14 | 0.00 | 2.70 |
| budget_computation | / | / | / | ✓/✓ | 14 | 0.40 | 2.80 |
| code_locating | ✓/✓ | ✓/✓ | ✓/✓ | ✓/✓ | 0 | 1.00 | 0.09 |
| contact_information | / | / | ✓/✓ | ✓/✓ | 14 | 0.40 | 2.47 |
| dataset_comparison | / | ✓/✓ | ✓/✓ | ✓/✓ | 12 | 1.00 | 2.61 |
| Executor | Verdict | Seed | 95% CI | Evolved | 95% CI | Gained | Lost | |
|---|---|---|---|---|---|---|---|---|
| GLM-5.2 | external | 6/30 | [0.10, 0.37] | 18/30 | [0.42, 0.75] | 12 | 0 | <0.001 |
| GLM-5.2 | internal | 8/30 | [0.14, 0.44] | 21/30 | [0.52, 0.83] | 13 | 0 | <0.001 |
| Claude | external | 27/30 | [0.74, 0.97] | 30/30 | [0.89, 1.00] | 3 | 0 | 0.25 |
| Claude | internal | 24/30 | [0.63, 0.90] | 30/30 | [0.89, 1.00] | 6 | 0 | 0.031 |
| Int/Ext | |||||||||
| Executor | States | / | / | / | / | Agr. | Prec. | Rec. | Spec. |
| All retained round states | |||||||||
| GLM-5.2 (all) | 203 | 18 | 3 | 1 | 181 | 98.0 | 85.7 | 94.7 | 98.4 |
| GLM-5.2 (distinct) | 85 | 18 | 3 | 1 | 63 | 95.3 | 85.7 | 94.7 | 95.5 |
| Claude (all) | 55 | 30 | 0 | 16 | 9 | 70.9 | 100.0 | 65.2 | 100.0 |
| Claude (distinct) | 44 | 30 | 0 | 5 | 9 | 88.6 | 100.0 | 85.7 | 100.0 |
| Task | States | / | / | / | / |
|---|---|---|---|---|---|
| author_folders | 2 | 1 | 0 | 0 | 1 |
| budget_computation | 4 | 1 | 0 | 0 | 3 |
| code_locating | 2 | 2 | 0 | 0 | 0 |
| contact_information | 4 | 1 | 0 | 0 | 3 |
| dataset_comparison | 10 | 2 | 0 | 0 | 8 |
| debugging | 2 | 1 | 1 | 0 | 0 |
| Task | Diff-exposed constraint | Revision | Outcome |
|---|---|---|---|
| uppercase | Exact text and terminal-newline fidelity | (1) | FP removed; final |
| debugging | Presence of the required fixed code pattern | (3) | FP removed; final |
| structure_mirror | Missing nested directories and leaf placeholders | (1) | FP removed; next state |
| Task | Provenance class | Evaluators | Final Int./Ext. | Terminal | Key result |
|---|---|---|---|---|---|
| uppercase | Primary refinement run | E0 E1 | / | stabilized (r1) | Original false positive removed (exact-match check replaces .strip() tolerance). |
| debugging | Primary refinement run | E0 E1 | / | stabilized (r1) | Original false positive removed (require-fix-present check via paired contrast). |
| structure_mirror | Primary refinement run | E0 E1 (E2 excluded) | ✓/✓ after r1 | stabilized (r2) | Original false positive removed; the weak state under E1 is externally valid (hash 80aeae4e ). Round 2 was triggered by a file-synchronization artifact and is excluded. |
| structure_mirror | FP exposure (development case study) | E0 E1 | ✓/ | semantic convergence | Extra-structure blind spot: E1 accepts a state with eleven extra placeholder files, which fails external verification. |
| structure_mirror | Separate controlled run (external pass) | E0 E1 E2 | ✓/✓ | stabilized (r2) | Round 2 targets genuine extra structure (plus a synchronization artifact); final state hash 80aeae4e , identical to the primary run’s round-1 state. |
| Environment | Stage 1 evidence | Stage 2 evidence | Stage 3 disposition |
|---|---|---|---|
| PostgreSQL | 18/21 evaluators successfully constructed over 120 calibration states (22 positive / 98 negative), with 115/120 internal–external agreement; 15/21 meet the Stage 2 admission threshold | 15 matched pairs run to the configured limits; both executors solve three tasks. The strong executor succeeds at round 0 on all three, while the weak executor succeeds after rounds 11, 2, and 7; neither converges on the remaining 12 tasks (8 weak-executor runs end at the one-hour round timeout) | No agent-produced state across the 30 Stage 2 conditions; refinement not triggered |
| Playwright | Four evaluators over 88 generated cases; two correctness evaluators and two format-contract-only evaluators | Two valid pairs: both executors pass extraction_table ; both fail r1_arxiv | No eligible false positive; two tasks formally excluded |
| Notion | Two loop-native evaluators calibrate at agreement ; one additional evaluator is blocked by the observation interface | One historical matched pair on remove_osaka : strong condition , weak condition | No completed eligible refinement pair; outer refinement not run |
| GitHub | One full calibration at ; additional Stage 1 evaluators remain incomplete, divergent, or blocked by the observation interface | Corrected canonical-snapshot scoring yields one provenance-valid strong-executor on find_salient_file ; a corrected weak-executor matched run was not completed | No corrected pair; refinement not triggered |
| Campaign | Executor | Workflow and evolver | Seed Ext. | Final Ext. |
|---|---|---|---|---|
| Historical | Claude | Task understanding plus ReAct execution; only the ReAct prompt evolved by an interactive Claude Code outer loop | 17/30 | 30/30 |
| Primary | Claude | Five-node persistent multi-alternative workflow; headless Workflow Evolver | 27/30 | 30/30 |
| Primary | GLM-5.2 | Same five-node representation and task-specific evaluators | 6/30 | 18/30 |
| Environment | Tasks | Usable | Int | |
|---|---|---|---|---|
| Filesystem | 30 | 30 | 0 | 0 |
| PostgreSQL | 15 | 3 | 0 | 12 |
| Playwright | 2 | 1 | 0 | 1 |
| Notion | 1 | 0 | 1 | 0 |
| GitHub | 1 | 1 | 0 | 0 |
| Total | 49 | 35 | 1 | 13 |
| Trigger rule (weak vs. strong accepted state) | Flagged | FPs caught | Correct states flagged |
|---|---|---|---|
| Any difference | 13/21 | 3/3 | 10/18 |
| Structural difference (missing/extra/empty) | 4/21 | 1/3 | 3/18 |
| Missing structure only (strong has it, weak lacks it) | 2/21 | 1/3 | 1/18 |
| Content difference (excluding newline-only) | 10/21 | 1/3 | 9/18 |
| Any difference, newline-only differences ignored | 12/21 | 2/3 | 10/18 |
| Analysis | Finding | Interpretation |
|---|---|---|
| PostgreSQL numeric type | An evaluator rejects valid Decimal values because it tests only int and float ; the external verifier accepts the state | Evaluator type mismatch rather than executor failure; corrected by a type-equivalence update before the final campaign. |
| PostgreSQL Stage 2 non-convergence | Neither executor converges on 12/15 Stage 2-eligible tasks despite evaluators that cleared the admission threshold | A usable fitness signal does not guarantee task completion; workflow search, executor capability, and interaction budget remain limiting. |
| Playwright observability | Turnstile exposes no stable transcript-visible success signal; another task lacks independently grounded factual truth | Formal exclusions rather than task failures. |
| Notion serialization | Agreement falls from to when people and date fields change serialization | A real evaluator disagreement compounded by backward-incompatible state representation. |
| GitHub scoring interface | Historical in-loop evaluator calls queried the live backend inside a short sandbox timeout, producing vacuous zero scores; canonical snapshot scoring restores valid internal evaluation | Historical non-convergence is excluded from performance claims; corrected strong-executor execution demonstrates feasibility, while the standardized matched pair remains incomplete. |
| Experiment | Tasks/runs | Executor tokens | Evolver cost | Recorded wall | Qualification |
|---|---|---|---|---|---|
| Filesystem Stage 1 | 30 | – | – | – | Interactive accounting not recorded. |
| Filesystem Stage 2, Claude | 30 | 575,739 | $1.74 | 5.3 task-hours | Primary strong campaign; executor tokens exclude prompt-cache reads. |
| Filesystem Stage 2, GLM-5.2 | 30 | 33,176,550 | $31.24 | 43.5 task-hours | Primary weak campaign; tasks executed across parallel lanes. |
| Filesystem Stage 3 | 3 | 8,100,868 | $3.49 | h actual | Primary refinement runs; TSG and VE additionally use 37,031 and 27,235 Sonnet tokens. |
| PostgreSQL matched pairs | 30 conditions | M | $41.88 | h loop wall | Full 15-pair Stage 2 campaign over all eligible tasks. |
| Playwright matched pairs | 4 conditions | 1,062,274 | $1.71 | 94 min | Two valid matched pairs. |
| Phase | Technically enforced controls | Procedural restrictions | Audit evidence |
|---|---|---|---|
| Interactive Stage 1 | No hard filesystem-level isolation is proven by retained artifacts | Workspace policy prohibits reading verifier source; external calibration occurs after evaluator construction | External fields appear only in post-construction calibration artifacts. Claims for this phase are procedural, not technical. |
| Automated Stage 2 | Workflow-Evolver inputs are constructed only from internal scores, failed checks, traces, and alternative statistics; executors are restricted to isolated task environments | Prompts prohibit reference to external verifier logic | Source/input hashes, routing policies, and run manifests are retained. |
| Stage 3 TSG and VE | Packet-only temporary working directory outside the repository; shell, search, write, web, and task tools disabled; packet allowlists and forbidden-token scans; tool-access logging and run-aborting outside-access checks | Read access is additionally restricted by the packet contract | Per-round packet hashes and access-decision records; primary runs contain no information-boundary violation. |
| Post-hoc verification | Separate subprocess with provider credentials stripped; bounded output capture; invoked only after internal termination | External result cannot be routed back into a model role | External records contain invocation status and return code and are stored outside model packets. |
Self-Evolving Agents
Self-evolving agents improve their skills, memory, tools, policies, or environments by learning from interaction and evaluation feedback.
See all 421 papers