Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Eval Matrix

ProNew

Every test case against every model as a grid of cells. Pointing at one lights its row and column and names the case below; each row ends in its pass rate.

Installation

pnpm dlx shadcn@latest add @viewport/eval-matrix

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
caption*string

What the grid shows, for screen readers, e.g. "Results of 12 test cases across 4 models".

—
subjects*string[]

The things under test, e.g. models or prompt versions. One row each.

—
cases*string[]

The test cases, in order. One column each.

—
results*EvalResult[][]

`results[row][column]` is the outcome of one case for one subject.

—
onSelect(subject: number, testCase: number) => void

Runs when a cell is pressed, e.g. to open that case's transcript.

—
classNamestring—

Accessibility

  • A table of buttons: arrow keys move between cells, with one Tab stop.
  • Each cell is named with its model, case and outcome.
  • Outcomes differ by shape as well as color: failures are hollow, partial passes split.
  • The detail line sits below the grid, so nothing covers neighboring cells.