|
| 1 | +--- |
| 2 | +title: "Customize LLM-as-a-Judge Output Schemas" |
| 3 | +slug: customize-llm-as-a-judge-output-schemas |
| 4 | +date: 2025-11-10 |
| 5 | +tags: [v0.62.0] |
| 6 | +description: "Learn how to customize LLM-as-a-Judge evaluator output schemas with binary, multiclass, or custom JSON formats. Enable reasoning for better evaluation quality and structure feedback to match your workflow needs." |
| 7 | +--- |
| 8 | + |
| 9 | +import Image from "@theme/IdealImage"; |
| 10 | + |
| 11 | +The LLM-as-a-Judge evaluator now supports custom output schemas. You can define exactly what feedback structure you need for your evaluations. |
| 12 | + |
| 13 | + |
| 14 | +<div style={{display: 'flex', justifyContent: 'center', gap: '24px', margin: '20px 0'}}> |
| 15 | + <Image |
| 16 | + img={require('/static/images/changelog/changelog-llm-as-a-judge-response-1.png')} |
| 17 | + alt="Custom output schemas in LLM-as-a-Judge - Example 1" |
| 18 | + style={{width: '48%', minWidth: 0}} |
| 19 | + /> |
| 20 | + <Image |
| 21 | + img={require('/static/images/changelog/changelog-llm-as-a-judge-response-2.png')} |
| 22 | + alt="Custom output schemas in LLM-as-a-Judge - Example 2" |
| 23 | + style={{width: '48%', minWidth: 0}} |
| 24 | + /> |
| 25 | +</div> |
| 26 | + |
| 27 | +## What's New |
| 28 | + |
| 29 | +### **Flexible Output Types** |
| 30 | +Configure the evaluator to return different types of outputs: |
| 31 | +- **Binary**: Return a simple yes/no or pass/fail score |
| 32 | +- **Multiclass**: Choose from multiple predefined categories |
| 33 | +- **Custom JSON**: Define any structure that fits your use case |
| 34 | + |
| 35 | +### **Include Reasoning for Better Quality** |
| 36 | +Enable the reasoning option to have the LLM explain its evaluation. This improves prediction quality because the model thinks through its assessment before providing a score. |
| 37 | + |
| 38 | +When you include reasoning, the evaluator returns both the score and a detailed explanation of how it arrived at that judgment. |
| 39 | + |
| 40 | +### **Advanced: Raw JSON Schema** |
| 41 | +For complete control, provide a raw JSON schema. The evaluator will return responses that match your exact structure. |
| 42 | + |
| 43 | +This lets you capture multiple scores, categorical labels, confidence levels, and custom fields in a single evaluation pass. You can structure the output however your workflow requires. |
| 44 | + |
| 45 | +### **Use Custom Schemas in Evaluation** |
| 46 | +Once configured, your custom schemas work seamlessly in the evaluation workflow. The results display in the evaluation dashboard with all your custom fields visible. |
| 47 | + |
| 48 | +This makes it easy to analyze multiple dimensions of quality in a single evaluation run. |
| 49 | + |
| 50 | +## Example Use Cases |
| 51 | + |
| 52 | +**Binary Score with Reasoning:** |
| 53 | +Return a simple correct/incorrect judgment along with an explanation of why the output succeeded or failed. |
| 54 | + |
| 55 | +**Multi-dimensional Feedback:** |
| 56 | +Capture separate scores for accuracy, relevance, completeness, and tone in one evaluation. Include reasoning for each dimension. |
| 57 | + |
| 58 | +**Structured Classification:** |
| 59 | +Return categorical labels (excellent/good/fair/poor) along with specific issues found and suggestions for improvement. |
| 60 | + |
| 61 | +## Getting Started |
| 62 | + |
| 63 | +To use custom output schemas with LLM-as-a-Judge: |
| 64 | + |
| 65 | +1. Open the evaluator configuration |
| 66 | +2. Select your desired output type (binary, multiclass, or custom) |
| 67 | +3. Enable reasoning if you want explanations |
| 68 | +4. For advanced use, provide your JSON schema |
| 69 | +5. Run your evaluation |
| 70 | + |
| 71 | +Learn more in the [LLM-as-a-Judge documentation](/evaluation/configure-evaluators/llm-as-a-judge). |
0 commit comments