Repository navigation
feat: average eval scores across independent runs - #229
Merged
mattrossman merged 18 commits intoAug 26, 2026
Merged
mattrossman merged 18 commits into
mattrossman merged 18 commits into
Conversation
…verage-eval-scores-over-3-runs-with-parallel-sandboxes
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Preview build already covers the partial refresh; keep results untouched here so the diff stays focused on the run-averaging feature.
…verage-eval-scores-over-3-runs-with-parallel-sandboxes
mattrossman
marked this pull request as ready for review
August 25, 2026 19:15
barryroodt
approved these changes
Aug 26, 2026
barryroodt
left a comment
Contributor
There was a problem hiding this comment.
Apologies for the commit, my agent got a bit enthusiastic and applied the fix instead of leaving a review comment.
The review found that the completeness check accepted {1,2,4} when three runs were expected. Commit 29dddd8 now validates the exact run set and adds coverage.
Typecheck, all 20 tests, and GitHub checks are green. READY.
Collaborator
Author
|
Results refreshing in #248 |
mattrossman
added a commit
that referenced
this pull request
Sep 11, 2026
) (#241) This is stacked on #240. Review that first; this diff is against it. No results are touched. ## Problem We wrote our own system prompt into every eval run, for all four agents: > You are an agent solving a Supabase eval task in a Linux workspace. Use the provided tools to inspect and modify the workspace and run commands. When you are done, end your turn with a short summary of what you did. - Claude Code, Codex and OpenCode ship their own system prompt. Ours was layered on top, and Codex and OpenCode have no system-prompt flag, so for them it went onto the user prompt. - It described `bash` and `files_read`, which only the in-process `ai-sdk` agent has. - "End your turn with a short summary" shapes `agentReport`, which the LLM judge reads. That is a scoring change. - It says Supabase, and "project". An agent that would otherwise pick a database has been handed the answer (#164). ## Changes | Agent | Before | After | |---|---|---| | `ai-sdk` | framing + tool list + skills list | one neutral line + tool list + skills list | | `claude-code` | ours appended to its own | nothing | | `codex` | ours prepended to the user prompt | nothing | | `opencode` | ours prepended to the user prompt | nothing | - CLI agents take no system prompt at all. `createCliAgent` no longer stages a system-prompt file or passes a path to the runner; `--append-system-prompt-file` and the Codex/OpenCode prepend are gone. A non-empty `systemPrompt` for a CLI agent throws. - The `ai-sdk` base prompt is now `You are an agent. Use the provided tools to complete the task.` It is the same in both modes. No Supabase, no project, no stopping instructions. - `buildToolSurfaceAddendum` and `buildSkillsPrompt` return `''` for every CLI agent. The bare sandbox no longer takes an `agent` or returns a `promptAddendum`. - Prompt assembly moves out of `run-eval.ts` into `system-prompt.ts` so it can be unit tested. - `run-eval.ts` only starts a run when it is the entry point. It used to call `main()` on import, which the harness unit tests now trigger. - Each run records `systemPrompt` in its raw `result.json`. `export-results` drops it, so nothing reaches the site. Since the first review: the system-prompt-file plumbing for CLI agents is deleted rather than made optional, and the ai-sdk base prompt is rewritten for #164. The branch is re-applied on the current #240 (the retry loop is gone there), so the commits are new. #240 now has `main` merged in, which brings the usage and duration fields from #270. ## Testing - `pnpm --filter @supabase-evals/core test`, `pnpm --filter @supabase-evals/sandbox test`, `pnpm --filter @supabase-evals/framework test`, `pnpm --filter @supabase-evals/web test`: all pass locally. - `typecheck` for framework, sandbox and web passes. `biome check .` is clean. - Unverified against real CLIs since the deletion. The earlier sandbox runs (Claude Code [32785480269](https://github.com/supabase/evals/actions/runs/32785480269), Codex [32880822811](https://github.com/supabase/evals/actions/runs/32880822811), OpenCode [32880839623](https://github.com/supabase/evals/actions/runs/32880839623)) recorded an empty prompt and still loaded the Supabase skills, and the path they exercised (no flag, task alone) is the one that remains. ## Score movement Full benchmark on both branches before this revision, artifact only, nothing published. Both used `runs=2`. | | #240, no prompt change | #241, prompt removed | | |---|---|---|---| | all pairs | 86.0% | 84.7% | 21 flips, 12 down 9 up | | `claude-code` | 92.3% | 92.3% | no change | | `codex` | 81.5% | 75.0% | down 6.5 points | | `opencode` | 82.6% | 89.1% | up 6.5 points | This looks like run-to-run variability. Once #229 lands and scores average across runs, the numbers should settle. ## Follow-ups - Re-run the benchmark comparison once #229 lands and the numbers can carry attribution. - Drop the "end your turn with a short summary" line from `evals/resolve-performance-001-slow-query-cpu-spike/PROMPT.md:15`, the last one left. It sits in the task text so it hits every agent equally, and removing it invalidates that eval's recorded results, so it should be a separate change. Ref AI-1034 --------- Co-authored-by: Matt Rossman <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's inside
I intentionally omitted results from the final diff and made UI changes backwards compatible so we can do the refresh in a follow-up PR, to reduce review surface area.
I considered stacked PRs, but there's not a clean way to incrementally add just the framework changes without breaking our
--runsinterpretation or adding pointless backwards compat temp fluff.Problem
Runs aren't sufficiently reliable. We assign a binary
Pass/Failon eachexperiment x evalpair, which means results can shift significantly across refreshes.Today we partly denoise failures by giving agents 1 extra attempt upon failure, but that biases our results and forces more work in serial (since runs can be conditional on the prev running passing or not).
Changes
Each
experiment x evalpair now runs multiple times, in parallel (in CI). Website averages results across runs. Both benchmark and regression results use this strategy.I'm picking 3 runs because it's the smallest starting point that gives us tie breakers. Based on how CI handles the significant increase in Sandboxes, we can re-evaluate from there.
Framework
--runs Nnow means exactly N independent scored runs. Removes stop-on-pass and--run-all-attempts.Each run writes
results/<experiment>/<eval>/run-<n>/result.json, resumable per run index with--skip-existing.$ tree results/codex-gpt-5.4-mini results/codex-gpt-5.4-mini └── resolve-security-002-rls-cross-tenant-leak ├── run-1 │ └── result.json ├── run-2 │ └── result.json └── run-3 └── result.jsonExport emits one row per run with optional
"run"index.export-results --runs Nskips + warns about pairs whose set of runs is incomplete (example), so a partial refresh can't publish a differently-weighted average.UI
%for multi-run results"run"index fall back to existingPass/Failrendering (so that we can refresh results after merging this)Workflow
Sandboxes tags are updated to trim less useful ones (attempt, runner label) to make room for the more useful run index, since we can only have <=5 tags (proof).
See new
run_index:tag from screenshot of sample inflight sandbox:How to review
Look at the preview build from a (now reverted) commit that includes partially refreshed results w/ the new run strategy.
Notice the eval table now shows a
%for certain cells instead of justPass/Fail.Click into those cells and notice the new nested
Run Nsections which shows the per-run details (example).Look at this sample run which refreshed the Claude Code / Sonnet 5 pairs at a 35 concurrency limit across 69 sandboxes spawned (i.e. 2 waves to complete) which took 17m 40s. When scaling up to our full benchmark refresh (690 sandboxes at a 250 concurrency limit) it extrapolates to around 20-30 min for the workflow.
If you'd like to try the new behavior locally, try the following and look at the
results/it produces:pnpm eval --runs 3 --experiment codex-gpt-5.4-mini --eval investigate-security-010-sql-row-injection-dropFollow up tasks
resume_run_idworkflow input to assist in resuming a failed refresh.Ref AI-1027