Eval suite
Test a candidate agent version against the baseline, case by case, before you ship it.
What a block is
A block is a kit component for a whole area of a screen, built only from other kit components and tokens. You import it like any component; nothing is copied into your app. Put it inside your page’s <main>: it brings no header or nav of its own.
When to use
- a new prompt, model or tool change must not break cases that passed before
- a person decides whether to promote a candidate agent version
- each failing case needs both outputs side by side
When not to use
- a live traffic split between variants — ExperimentCard
- reviewing the files an agent changed — ChangeReview
- one run's steps and metrics — RunDetail
Usage
Pass rate, cost and latency sit side by side and each change says Better or Worse, regressions come first, and each case opens with its input, both outputs as a split diff and the grader's note. Promote stays disabled, with the reason beside it, until every regression is reviewed.
Layout
- header with the versions line, then the Scoreboard full width, the view and filters, the cases table and the Promote footer
- the block is its own inline-size container and takes the full width; the DataTable scrolls sideways inside its frame on narrow screens
Props
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| title | string | No | Eval run | Pass a real title, e.g. "Dunning agent: v3 vs v2"; the default is a fallback. |
| baseline | object | Yes | — | { label, metrics: { passRate (0–1), avgCost, p50LatencyMs } }, e.g. label "v12". |
| candidate | object | Yes | — | Same shape as baseline, e.g. label "v13". |
| cases | array | Yes | — | { id, name, tags?, dataset?, input, baseline: { result: "pass" | "fail" | "error", output, score?, cost? }, candidate: same, graderNote?, accepted?, flagged? }[]. A regression passed in baseline and not in candidate; accepted or flagged counts it as reviewed. Rows show Score change as "−0.42 of 1" (scores are 0–1), Cost change in currency and a Review column (To review / Accepted / Flagged) for regressions. Tags filter and show in the Drawer, not as a column. |
| view | regressions | improvements | all | No | — | Uncontrolled (starts on regressions) when omitted. Each view label carries its count. Rows sort regressions, errors, improvements, rest. |
| onViewChange | function | No | — | — |
| onPromote | function | No | — | Promote <candidate>, the one solid primary; disabled while running, after an error or while regressions are unreviewed, with the reason as the footer text beside it ("3 cases that passed in v2 don't pass in v3. Accept the new output or flag each one to promote."). |
| onRerun | function | No | — | Re-run, outline. |
| onAcceptExpected | function | No | — | (id) => void from the case Drawer. Set accepted on the case. |
| onFlag | function | No | — | (id) => void from the case Drawer. Set flagged on the case. |
| status | running | done | error | No | done | running shows a Progress with "Running n of N cases"; error a danger Alert. |
| progress | number | No | 0 | 0–1 while running. |
| errorMessage | string | No | The run stopped before every case finished. | — |
| currency | string | No | USD | — |
Built from
Related
- Component
ExperimentCard
A compact A/B or A/B/n experiment: status in words, the metric and traffic split under each variant's value ("paid within 7 days · 50%"), a confidence note in plain words and one decision (Ship winner, Stop, Extend, Start).
- Block
Change review
Review an agent's change file by file, then accept or reject each file, or the rest at once.
- Block
Run detail
One agent run on one screen: clock, cost, pending approval and every step, all following the step you pick.
- Component
Scoreboard
Metrics strip of kit Scorecards: two to six figures, and the only metric picker.