Prompt Test Matrix
Every test case on one row with its status, score and time; open one for the variables, the expected output and the actual output side by side. Cases that passed last run and fail now are called out as regressions, counted at the top and listed first. Run one case or all of them through your own handler.
Ready for AI tools one file typed props installs by name prompt included
The decision inside it
Regressions come first
Before shipping a prompt change, the question is what broke. Cases that used to pass are badged, counted and sorted to the top, and the pass rate counts only the cases that ran.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Layro's Prompt Test Matrix for this.
Install it: npx shadcn@latest add @layro/prompt-test-matrix
Import it from @/components/ui/prompt-test-matrix.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @layro registry with your CLI token: see the Namespaced tab.
API
“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Prop | Type | Notes |
|---|---|---|
casesrequired | PromptTestCase[] | — |
prompt | { name: string; version?: string; model?: string } | The prompt under test. |
onRunCase | (testCase: PromptTestCase) => void | Promise<void> | Adds a Run button to each row. May return a promise. |
onRunAll | () => void | Promise<void> | Adds "Run all". May return a promise. |
onCaseSelect | (testCase: PromptTestCase | null) => void | — |
filter | PromptTestFilter | — |
defaultFilter | PromptTestFilter | — |
onFilterChange | (filter: PromptTestFilter) => void | — |
isRunning | boolean | A whole run is in progress, whatever the cases say. |
scoreLabel | string | What the score means: "LLM judge", "Exact match". |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLayro foundations, installed alongside it
layro-themebadgebuttonstatetabsLifetime access
Every component, and everything we ship next.
- All 112 components, source included
- The template, and everything released after you buy
- shadcn CLI or download — React 18/19, Tailwind v4
- One payment. No subscription.
More in RAG & Evals
All RAG & Evals componentsModel Comparison
PaidOne prompt, several models, answers side by side with time, tokens and cost.
Included with lifetime access
Context Window
FreeWhat filled a model's context, part by part, and what was cut.
Eval Leaderboard
PaidModels and prompts ranked on one evaluation, with the caveats on screen.
Included with lifetime access
Output Validator
PaidA model's JSON checked against its schema, with each problem on its field.
Included with lifetime access
Evidence Map
PaidClaims and sources joined by what supports, contradicts or only gives context.
Included with lifetime access
Data Lineage
PaidWhere an AI output came from, and which upstream data is stale or missing.
Included with lifetime access