Skip to content

Rebuild Evaluations page around runs with detailed history and scoring - #471

Merged
TonsOfFun merged 3 commits into
mainfrom
claude/awesome-gauss-ebky6n
Sep 21, 2026
Merged

TonsOfFun merged 3 commits into
mainfrom
claude/awesome-gauss-ebky6n

Conversation

@TonsOfFun

Copy link
Copy Markdown
Contributor

Summary

This PR restructures the Evaluations page to make runs the primary organizational unit, with full run history, detailed scoring breakdowns, and improved cost tracking. The changes separate sampling evaluations from scenario suites in the UI while sharing common run list and scoring components.

Key Changes

Frontend Architecture

  • New shared vocabulary module (evaluationRuns.mjs): Centralized definitions for criteria types, run scoring, cost calculations, and run metadata. Pure functions with no dependencies enable reusable logic across components and testability.
  • Component extraction: Split monolithic EvaluationsView.jsx into focused modules:
    • EvaluationForm.jsx: Creation form with criteria selection
    • EvaluationRunDetail.jsx: Sampling run detail page with scorecard per model, verdict, criteria matrix, and fix recommendations
    • RunsList.jsx: Shared run history list showing pass rates, movement vs previous run, and costs
    • ModelScorecard.jsx: Per-model cohort summary (passed/total, scores, tokens, cost)
    • SpendStrip.jsx: Cost breakdown (agent operating cost vs judge evaluation cost)
    • CriteriaFooter.jsx: Evaluation configuration display
  • URL routing: New paths for sampling evaluations (/evaluations/:id/runs/:runId) and suite runs, with browser history support

Backend Enhancements

  • Cohort summaries: Evaluation runner now records per-model statistics (_cohorts) for sampling runs, enabling "5/12 passed" display per model without re-reading generations
  • Judge usage tracking: Separate _judge_usage field records judge model's calls, tokens, and cost, distinguishing evaluation overhead from agent operating cost
  • Run numbering: Runs numbered oldest-first; API returns run count and the previous run for delta display
  • API pagination: GET /api/evaluations/:id returns latest 20 runs with total count

Data Model

  • EvaluationRun gains cohorts and judge_usage accessors for structured score metadata
  • Criteria now support llm_judge type with custom prompts alongside rule-based and telemetry criteria
  • Run scores payload standardized: flat stats or cohort maps, with _-prefixed metadata fields

UI/UX Improvements

  • Runs list shows movement: +3 passed vs #2, partial run, #1 failed
  • Failed runs display gracefully with dashes for missing metrics
  • MetaStrip component ensures columns align across rows with varying data
  • Sampling evaluation runs open to dedicated detail page; suite runs stay in expandable panel
  • Cost display separates agent (operating) from judge (evaluation) spend with per-interaction rates

Notable Implementation Details

  • Pure vocabulary module: evaluationRuns.mjs imports nothing, enabling node tests without browser dependencies
  • Backward compatibility: Existing result and report URLs continue working; older runs without cohort data degrade gracefully
  • Flexible criteria: Supports rule-based (response_present, latency, tokens), telemetry (error_rate, latency), and LLM judge criteria in one evaluation
  • Cohort detection: Automatically detects per-model cohorts from run data or evaluation config; scenario suites use _models field
  • Cost accounting: Agent cost priced at provider rates; judge cost tracked separately with call-type breakdown (score, verdict, etc.)

https://claude.ai/code/session_01QmHbHdDkfVrg3WX95CnFhd

Ports the MetaStrip from #470 so the evaluation runs list can keep its
cost, movement and status columns aligned on every row — a failed run with
nothing to put in a column prints a dash there rather than sliding its
neighbours over. The trace and interaction lists take the same strip, as
that change has it; the source is identical to the branch so it no-ops once
#470 merges.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QmHbHdDkfVrg3WX95CnFhd
Every client wants to know what operating an agent will cost, and an
evaluation run is the closest thing to a controlled measurement: a suite's
replays are simulated user–agent interactions, a sampling run's cohorts are
real ones. But the run also asks a judge model to score, recommend and rule,
and a run that reported that spend in the same number overstated the first.

The runners now meter every judge call under what it was for, through the
`kind:` keyword ActiveAgent::Evals::Judge hands a block that accepts it, and
persist the total as scores["_judge_usage"] — calls, tokens, estimated cost,
model and a by-kind tally. A generation-sampling run records
scores["_cohorts"] beside it: per model, how many generations were sampled,
how many cleared every criterion, their latency and tokens, and what those
interactions cost to serve. EvaluationRun#usage reports both sides, the
agent's with a per-interaction rate, and nil for a run that recorded neither.

The API numbers runs oldest-first (`number`), reports `run_count` and a
`previous_run` summary per evaluation, so the dashboard can say "Run #3" and
"+3 passed vs #2" without a request per evaluation.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QmHbHdDkfVrg3WX95CnFhd
Implements the "Evaluations Redesign v2" design (its REVIEW EVALS RUNS
section) in the engine, where the platform's earlier implementation was
lost when it swapped its own dashboard for this one. Evaluations are the
top level; every run is kept and listed with its movement against the run
before it; a sampling evaluation's run opens to a page of its own — a
scorecard per model cohort, the judge's verdict, the criteria × models
matrix and what the run asks to fix — at /evaluations/:id/runs/:run_id. A
scenario suite's runs are the same list, full width, and a row selects the
run its model scorecards, fix items and scenario matrix show; the deep link
selects it too.

What a run cost is shown as two figures everywhere it appears — on the run
row, on the run page, on a page tile and in the footer: the agent's spend
with its per-interaction rate, the operating figure a budget is set
against, apart from the judge's own offline calls.

The shared vocabulary (criterion labels and expectations, cohorts,
scorecards, movement, spend, the sampling run's fix items) lives in
utils/evaluationRuns.mjs, pinned by node tests. The report route, the
?evaluation= links and the e2e hooks (evaluation-card, data-telemetry,
score-source-telemetry) are kept.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QmHbHdDkfVrg3WX95CnFhd
@TonsOfFun
TonsOfFun requested a lite review from Copilot September 21, 2026 20:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@TonsOfFun
TonsOfFun marked this pull request as ready for review September 21, 2026 20:39
@TonsOfFun
TonsOfFun merged commit 6fb8816 into main Sep 21, 2026
8 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.

3 participants