Judge Bracket
An LLM judge picks the best of several answers, two at a time, as a tournament.
Answers meet in pairs; the one the judge prefers moves on and the winner's path through the bracket lights up. Open any match for both answers side by side, the scores and the judge's reasons.
PROGet Judge Bracket and 176 other Pro components with pro lifetime — Get Pro
- Category
- RAG & Evals
- Access
- ProPro · unlocked
- Source
- 392 lines · one file
- States
- 4 drawn
- Added
- 13 Nov 2026
The decision inside it
A pick that flips when the sides swap is not a win
Judges favour whichever answer they read first. Every match is judged in both orders, and when the pick flips the match is marked inconsistent and waits for a tiebreak instead of advancing a winner by position.
When to use it
Use Judge Bracket to show an LLM judge picking the best of several answers in pairwise matches, with both reading orders. For scores across a test set use Eval Leaderboard; for two models side by side use Model Comparison.
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 Liro's Judge Bracket for this.
Install it: npx shadcn@latest add @liro/judge-bracket
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/judge-bracket.
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 @liro registry with your CLI token: see the Namespaced tab.
Usage
import { JudgeBracket, type BracketMatch, type Contender } from "@/components/ui/judge-bracket";
export function BestOfN({ contenders, matches, tiebreak }: {
contenders: Contender[];
matches: BracketMatch[];
tiebreak: (matchId: string, winnerId: string) => Promise<void>;
}) {
return <JudgeBracket contenders={contenders} matches={matches} criteria="accuracy, then tone" onTiebreak={tiebreak} />;
}API reference
“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.
| Type | Notes | ||
|---|---|---|---|
contenders | Contender[] | Yes | – |
matches | BracketMatch[] | Yes | – |
criteria | string | No | What the judge scores: "Accuracy, then tone". |
onTiebreak | (matchId: string, winnerId: string) => void | Promise<void> | No | Settles an inconsistent match. May return a promise. |
defaultOpen | string | No | A match to open on mount. |
look | Look | No | – |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLiro foundations, installed alongside it
liro-themebuttonStates
All of them are drawn by the component. None is left for you to design.
- Final decided
- Judging
- Inconsistent match
- Tiebreak
Accessibility
- Keyboard reachable throughout, in visual order
- Focus trapped in overlays, Escape closes them
- Focus returns to whatever opened it
- Live regions announce what changed, not that something did
- Honours prefers-reduced-motion
Responsive behavior
- Sizes to its container, not the viewport
- Usable from 320px up
- Pointer-based interaction, so trackpad and touch both work
- No hover-only affordances