feat(frontend): Pareto frontier card behind a per-user Eval toggle - #1099
feat(frontend): Pareto frontier card behind a per-user Eval toggle#1099pfbyjy wants to merge 1 commit into
Conversation
Add an automatic cost/quality Pareto frontier card to the experiment page: one point per agent cohort plotting pass@1 (the shared per-task estimator the leaderboard ranks by) against average cost per trial, with toggles for cost per success, tokens, time, steps, and tool calls — each metric re-derives its own frontier. Non-dominated agents are joined by a dashed frontier curve and direct-labeled (labels flip inward near chart edges); hiding an agent via the shared legend re-derives the frontier, and cost values carry the existing ~/* estimated-cost marks. lib/pareto.ts holds the aggregation (metric-extractor table, one loop) and the generic weak-dominance frontier; the card reuses the shared agent grouping, colors, legend, and hover cross-highlight, so all cards describe the same cohorts. The card sits behind a new header Eval toggle (flask icon) whose button renders only for accounts allowed by lib/eval-graphs (EVAL_GRAPHS_USER_ALLOWLIST, currently meji@abundant.ai) — other users and public share views see neither the button nor the card. The Graphs button (renamed from "Pass/k graph"; it already revealed the leaderboard too) keeps its exact previous behavior. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BzsxcETgi6UjLtCnety4sQ
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8a73e5f. Configure here.
| if (getY(point) > bestY) { | ||
| frontier.push(point); | ||
| bestY = getY(point); | ||
| } |
There was a problem hiding this comment.
Tied agents drop from frontier
Low Severity
paretoFrontier only keeps a point when y is strictly greater than the best so far. Two agents with identical (x, y) do not weakly dominate each other, so both belong on the frontier, but only the first survives. The other still plots as a scatter point yet never gets the frontier label or “on frontier” tooltip mark.
Reviewed by Cursor Bugbot for commit 8a73e5f. Configure here.




Stack 2/4 — based on #1098 (merge that first; after its squash-merge this PR retargets to
stagingand needs a rebase/update-branch).Adds an automatic cost/quality Pareto frontier card to the experiment page: one point per agent cohort plotting pass@1 (the shared per-task estimator from #1098, so the y-axis always agrees with the leaderboard) against average cost per trial, with toggles for cost per success (total spend over priced trials ÷ passes among them), tokens, time, steps, and tool calls — each metric re-derives its own frontier, since an agent can be non-dominated on cost yet dominated on time.
~/*estimated-cost marks; the tooltip notes per-metric coverage (e.g. "4/6 trials reported").lib/pareto.tsholds the aggregation (a metric-extractor table + one loop — adding a metric is one entry here plus one compiler-enforced display entry in the card) and a generic weak-dominance frontier function.Feature gate: the card sits behind a new header Eval toggle (flask icon) whose button renders only for accounts allowed by
lib/eval-graphs.ts(EVAL_GRAPHS_USER_ALLOWLIST, currently meji@abundant.ai) — other users and public share views (no signed-in viewer) see neither the button nor the card. The Graphs button (renamed from "Pass/k graph"; it already revealed the leaderboard too) keeps its exact previous behavior for everyone.Verified with
tsc --noEmit, ESLint,next build, and rendered screenshots (light + dark, all metric toggles, hover/tooltip, frontier recompute on hide).🤖 Generated with Claude Code
https://claude.ai/code/session_01BzsxcETgi6UjLtCnety4sQ
Generated by Claude Code
Note
Low Risk
Frontend-only visualization behind a hardcoded email allowlist; no API or auth changes for the Pareto feature itself.
Overview
Introduces experimental eval analytics on the experiment page: a new header Eval toggle (only for emails in
EVAL_GRAPHS_USER_ALLOWLISTviauseEvalGraphsEnabled) reveals a Pareto frontier card alongside the existing pass/k graphs row. The main Graphs toggle label changes from "Pass/k graph" to Graphs; its behavior for pass@k and the leaderboard is unchanged.The Pareto card plots one point per agent cohort with pass@1 on the y-axis (same per-task
passAtOneFractionmean as the leaderboard) and a selectable x-axis: average cost per trial, cost per success, tokens, time, steps, or tool calls.lib/pareto.tsaggregates trial metrics by experiment agent key and computes a per-metric weak-dominance frontier; hiding agents in the shared legend recomputes the frontier. The UI (CostParetoGraph) adds metric toggles, tooltips (including cost estimate~/*and partial metric coverage), dashed frontier labels, and shared colors/legend/hover with the pass@k graph.Public share views and non-allowlisted users see neither the Eval button nor the card.
Reviewed by Cursor Bugbot for commit 8a73e5f. Bugbot is set up for automated code reviews on this repo. Configure here.