Skip to content
caliper ui docs

Pro

Eval compare

Two prompt or model variants on the same cases: average score, latency and tokens with B’s change against A, both answers side by side, a human pick per case (1, 2, 3), and filters for regressions and disagreements.

Pro
pnpm dlx shadcn@latest add @caliper/eval-compare

Compare Prompt v2 with Prompt v3

APrompt v2Sonnet 5.5 · t 0.5
86/1001,230 ms · 45 tok
BPrompt v3Sonnet 5.5 · t 0.3
66/100856 ms · 31 tok−20 pts · −374 ms · −15 tok
People preferred
A 2 · tie 0 · B 1 · 2 left
  1. Case 1

    billing

    How do I export my invoices to CSV?

    Expected Settings → Billing → Export, with the date range.

    A921,210 ms · 48 tok

    Go to Settings, then Billing, and press Export. Pick the months you need.

    B96980 ms · 41 tok

    Settings → Billing → Export. Choose a date range and you’ll get a CSV by email in a minute.

  2. Case 2

    Regressionbillingpolicy

    Can I get a refund for unused seats?

    A881,350 ms · 52 tok

    Unused seats are credited to your next invoice automatically when you reduce them.

    B41760 ms · 22 tok

    Yes, we refund all unused seats to your card.

  3. Case 3

    Grader disagrees

    Is my data stored in the EU?

    A841,290 ms · 46 tok

    Business plans can choose EU data residency. Other plans are stored in Ireland and the US.

    B901,010 ms · 44 tok

    Business plans can pin data to the EU (Frankfurt). Other plans use Ireland and the US.

  4. Case 4

    support

    The app is slow today

    A791,120 ms · 39 tok

    Sorry about that. Our status page shows no incident; can you tell me which page is slow?

    B81890 ms · 34 tok

    Sorry about that. Which page is slow, and roughly since when? I’ll check our traces.

  5. Case 5

    Regressionpolicy

    Cancel my account

    A861,180 ms · 41 tok

    I can help. Before I do: your data is kept for 30 days, and you can export it first.

    B22640 ms · 12 tok

    Done, your account is cancelled.

Installs components/ui/eval-compare.tsxDepends on none beyond ReactMotion none in component source

When to use

Use it for

  • Deciding whether a prompt or model change ships.
  • Human review of model output.

Skip it when

  • Monitoring a live model over time; use a metrics dashboard.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/eval-compare

Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage

Import it from your copy of the source. The example behind the preview comes with the source. It is built from evalSummary and EvalCompare.

example.tsx
import { evalSummary, EvalCompare } from "@/components/ui/eval-compare"

The worked example comes with Pro

The 24-line example behind the preview opens here, ready to copy.

  • 626 Pro parts, blocks and page templates, all with source
  • $149 once, with lifetime updates. No renewal
  • A full refund within 14 days if it is not for you
Checking your licence…

API reference

evalSummary

component

No props of its own; it accepts the native props of its root element.

EvalCompare

component
PropTypeDefault
cases *readonly EvalCase[]—
variants *{ a: { label: string; detail?: string | undefined; }; b: { label: string; detail?: string | undefined; }; }—
onPick((caseId: string, pick: EvalPick | undefined) => void)—
thresholdnumber0.1
classNamestring—

Accessibility

It exposes img, group and status semantics, with aria-labelledby, aria-label, aria-keyshortcuts, aria-pressed and aria-hidden kept in step with state. Changes that matter are announced through a live region.

No custom key handling; Tab and the native activation keys do the work.

Motion

It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.

All Assistant screens examples