When to use
- Outputs are subjective or long-form (essays, reports, explanations)
- Exact match and semantic similarity are too coarse for your quality bar
- You need nuanced grading with a written explanation per result
How it works
- Your system prompt (context for the judge)
- Your judge prompt with the original input and engine output wrapped in XML tags
- Instructions to return JSON:
{"score": <0.0–1.0>, "reasoning": "<explanation>", "confidence": <0.0–1.0>}
Supported judge providers
LLM judge evals support all four providers: AWS Bedrock (default), Anthropic, OpenAI, and Ollama. The judge provider can differ from the primary engine provider.Configuring an LLM judge eval
1
Open the Eval Studio
Click the Flask icon in the sidebar, then click + New in the left panel.
2
Select LLM Judge type
Click the LLM Judge type card.
3
Enter a name and system prompt
Give the eval a name. The System Prompt sets the judge’s persona, e.g.:
4
Write the judge prompt
The Judge Prompt describes what to grade. Instruct the judge to return JSON with
score (0.0–1.0), reasoning, and confidence. Example:5
Set the pass threshold
Scores ≥ threshold count as a pass. Default: 0.70 (on a 0–1 scale).
6
Select the judge provider and model
Choose the provider and enter the model ID. A capable model produces more reliable grading.
The default is
anthropic.claude-3-5-haiku-20241022-v1:0 via Bedrock (cost-effective and fast).7
Test and activate
Enter a sample input and output in the inline tester, run the test, and click Activate once a test passes.
Scoring
The judge’s
reasoning and confidence are stored for each run and are visible in the run detail view.
Cost implications
Each LLM judge eval triggers an additional API call to the judge provider. For high-volume eval captures, this can be significant. Consider:- Using a smaller/cheaper model for the judge (e.g.
claude-3-5-haikuorgpt-4o-mini) - Enabling Local-Only Mode in Settings → Evals to suspend LLM judge evals when not needed
Edit this page — Open a pull
request