Judge rubric editorPro
An LLM judge rubric with weighted criteria, a scale, and a test on a sample.
On this page
ProWeighted criteria tested on a sample answer that gets the policy wrong.
Installation
Usage
import { JudgeRubricEditor } from "@/components/ui/chatcn/pro/judge-rubric-editor"
<JudgeRubricEditor value={rubric} onValueChange={setRubric} sample={sample} onTest={runJudge} />Weights show as shares of the total as you edit. Test the rubric on one sample before it grades a dataset: each criterion comes back with its score and the judge's reason.
Examples
States
ProPass or fail scale, and a judge that fails to answer.
Props
| Prop | Type | Notes |
|---|---|---|
value, onValueChange | Rubric | { criteria, scale } |
sample | { input, output } | What the test grades |
onTest | (rubric) => Promise<RubricTestResult> | Reject with a message to show it |
Accessibility
- Every field has a label; results are a polite live region.