Phoenix Judge Alignment
ASecurityCheck and improve an LLM-as-a-judge evaluator against human labels in Phoenix. Turn human annotations into a labeled dataset, measure how often the judge catches real failures and how often its flags are wrong, read the disagreements, revise the judge prompt, and decide whether the judge is trustworthy enough to block, alert, or gate on. Use for "can we trust this judge", "does the eval agree with our reviewers", "improve the judge prompt", "the judge flags too many good answers", "validate t...
- 12,550 stars
- 0 votes
- 1 copy
- 5 views
- Added November 26, 2026
Works with
Security analysis
100/100Pro scans all 5 files and shows the line behind each finding
npx -y skills add Arize-ai/phoenix --skill phoenix-judge-alignment --agent claude-codeAre you the author of Phoenix Judge Alignment?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/arize-ai-phoenix-judge-alignment)---
name: phoenix-judge-alignment
description: Check and improve an LLM-as-a-judge evaluator against human labels in Phoenix. Turn human annotations into a labeled dataset, measure how often the judge catches real failures and how often its flags are wrong, read the disagreements, revise the judge prompt, and decide whether the judge is trustworthy enough to block, alert, or gate on. Use for "can we trust this judge", "does the eval agree with our reviewers", "improve the judge prompt", "the judge flags too many good answers", "validate the evaluator", "build a golden dataset from human annotations", or "should we turn this eval on". To write a new judge use phoenix-evals.
license: Apache-2.0
compatibility: Requires a Phoenix server with human annotations or a labeled dataset. Python needs arize-phoenix-client and arize-phoenix-evals. TypeScript needs @arizeai/phoenix-client 8.x, @arizeai/phoenix-evals, and Node.js 22.15 or later.
metadata:
targets: "agents mcp"
author: oss@arize.com
version: "1.0.0"
languages: "Python, TypeScript"
---
# Phoenix judge alignment
A judge's numbers mean something only if the judge agrees with the people whose
judgment it stands in for. This skill measures that agreement and improves it.
Related skills: **phoenix-evals** writes and runs judges; **phoenix-experiments**
runs and compares experiments; **phoenix-cli** reads annotations from the terminal.
## Terms
Treating the failure as the positive class is a useful default when the judge's job
is to find failures. Follow the user's convention when they define another positive
class. Every rate has a different denominator, so name it.
| Term | Formula | Answers |
| ---- | ------- | ------- |
| Recall (true positive rate) | TP / (TP + FN) | Of the real failures, how many did the judge flag? |
| False-positive rate (1 - true negative rate) | FP / (FP + TN) | Of the good records, how many did the judge flag anyway? |
| Precision | TP / (TP + FP) | Of the records the judge flagged, how many were real failures? |
| False-discovery share | FP / (TP + FP) = 1 - precision | Of the records the judge flagged, how many were wrong to flag? |
Map the user's words to the right row before computing anything:
- "Wrongly blocks X% of what it blocks", "of the alerts it raises, how many are
noise", "how often is a flag wrong": false-discovery share (1 - precision).
- "Flags X% of good answers", "how often does it bother us on fine traffic":
false-positive rate.
- "Catches X% of the failures", "misses": recall.
When the judge will block, page, or gate anything, report precision as well as
recall. People act on its flags, and precision is how often those flags are right.
Give the counts behind each rate, starting with how many labels are failures and how
many are good. Accuracy alone hides a judge that flags almost nothing when failures
are rare. On 70 good records and 10 failures, a judge that flags nothing is 88%
accurate and catches no failures.
## Workflow
1. **Collect the human labels.** Read human annotations from Phoenix, or a labeled
dataset the user names. Join labels and judge results on the same record (trace,
session, or span), even when the judge annotated a child span and reviewers
annotated the root span or the trace. Keep one current human label per record,
the most recent one. See [labels-python](references/labels-python.md) or
[labels-typescript](references/labels-typescript.md).
2. **Map labels to pass and fail** on both sides. Write the mapping down, because
label names often differ: `bad`, `fail`, `unhelpful`, `violates`. If the latest
label isn't a verdict, such as "unsure", the record is unsettled. Leave it out
rather than falling back to an older verdict.
3. **Choose the job.**
- **Assessing a judge as it is:** use the verdicts it already logged, on every
labeled record. Don't rerun it or hold out a subset; you aren't tuning
anything.
- **Improving a judge:** separate tuning records from the final check before you
inspect judge output. A 20% to 33% stratified holdout is common when the dataset
is large enough. For a small dataset, consider cross-validation instead.
4. **Measure and read the disagreements.** Compute the rates. Read every
disagreement, or a sample of each kind, with the judge's explanation and any
reviewer comment. See [agreement-python](references/agreement-python.md) or
[agreement-typescript](references/agreement-typescript.md).
5. **When improving, write the rubric from the spec, then refine it.** Start from
the full policy or requirements, including rules no labeled record happens to
exercise, and give the judge the evidence each rule needs, such as tool results,
retrieved documents, and earlier turns. Use disagreements to sharpen definitions
and decided cases. If few-shot examples help, draw them only from tuning records
and keep the held-out records out of the prompt.
6. **Measure the final judge on records it wasn't tuned on.** For a holdout, score it
once and report that result beside the tuning result. For cross-validation,
aggregate the out-of-fold results and report the spread across folds.
7. **Decide.** Compare the rates with what the user can tolerate (below), and say
what the judge's numbers can and can't be used for.
## Deciding whether to trust a judge
- **Use the user's tolerance when they state one,** such as "flags should be wrong
at most 5% of the time" or "catch at least three quarters of failures". Match it
to the right denominator. Report an interval with the point estimate. If the user
requires statistical confidence, apply the tolerance to the conservative end of
the interval.
- **Without a stated tolerance,** choose a bar from the cost of misses and wrong
flags. Recall and precision of 80% on held-out records can be a starting benchmark,
not a universal gate. Reviewer agreement and label quality provide useful context.
- **Small samples decide little.** With 10 labeled failures, one miss moves recall by
10 points. About 30 records per class is a useful minimum for a first estimate,
but the interval and the decision's risk matter more than a fixed count. Say how
many more labels would narrow the interval enough to decide.
- **People disagree too.** Reviewer agreement is a benchmark for label ambiguity,
not a mathematical ceiling on judge agreement. Prefer adjudicated labels for
records reviewers split on.
- **Label a fair sample.** Records chosen because they looked suspicious overstate
how common failures are and flatter precision. Sample at random, or stratify with
known weights and reweight when estimating rates.
- **"Not yet" is a valid answer.** A judge that misses many failures or flags many
good records shouldn't gate releases or page anyone. It can still sort records for
human review.
- **Revalidate** after any change to the judge's prompt, model, or criteria. A switch
to a cheaper model counts as a change.
With known recall and false-positive rate, you can estimate the true failure rate
behind the judge's observed rate. The formula is in the agreement references.
Files in this skill
- SKILL.md
- references/agreement-python.md
- references/agreement-typescript.md
- references/labels-python.md
- references/labels-typescript.md
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.