Skip to content

Lab 5: Add an LLM judge

  • Time 20 minutes
  • Model use 3 Copilot runs and about 11 judge calls, on your Copilot plan
  • Uses evals/judge-controls.eval.yaml, evals/release-notes-judged.eval.yaml

The peach robot, the LLM judge, reviews answer cards at a desk with a rubric clipboard, next to a magnifying-glass station for the code checks. Each card carries the judge's badge and the code check's badge: two pairs agree, two disagree. The teal robot waits with more cards.

A second model judges what code can’t check, once you’ve calibrated it on answers you know.

Two of your criteria from Lab 1 can’t be checked with a string: “starts with one short sentence that summarizes the release” and “is friendly and short”. For those you add an LLM judge: a second model that reads each answer and decides against a written rubric. Like your checks in Lab 2, you test the judge on known answers before you trust it.

This lab at a glance
new
first time in the workshop
changed
seen before, different here
You do
Write a rubric, calibrate an LLM judge on known answers, tighten the rubric, and add the judge to the real eval.
Under test
First the judge, with known answers; then the agent, with the calibrated judge
Checked by
Code checks for the facts, an LLM judge with a rubric for the qualities
  1. Task Known answers first, then the real task
  2. Agent changed Mock for calibration, then GitHub Copilot
  3. Environment The fixed skill and backlog.json
  4. Trials 1 per known answer; 3 in the real eval
  5. Checks The code checks, as before
  6. LLM judge new gpt-5.6-luna on Copilot, with your rubric
  7. Results changed The judge's verdict and reasoning per answer
What happens during the run vally eval -e evals/release-notes-judged.eval.yaml
new
first time in the workshop
  • You
  • Vally the eval runner
  • GitHub Copilot with the fixed skill
  • Code checks the five from Lab 3
  • LLM judge gpt-5.6-luna
  1. You to Vally: Starts the run Three trials; the judge model is a param, JUDGE_MODEL.
  2. For each of the 3 trials, in parallel
    1. Vally to GitHub Copilot: Sends the prompt In a fresh workspace with the fixed skill and backlog.json.
    2. GitHub Copilot to Vally: Answers Vally keeps the answer, the transcript and the workspace.
    3. Vally to Code checks: Hands over the evidence The facts: CT-101 and CT-103 in, CT-102 out, skill used, backlog unchanged.
    4. Code checks to Vally: Pass or fail, with evidence
    5. Vally to LLM judge: Sends the trajectory and your rubric new The agent's output, its metrics and the session timeline.
    6. LLM judge to Vally: Pass or fail, with its reasoning new The reasoning is the evidence: read it as you read a check's.
  3. Vally: Writes the results A trial passes only if every check and the judge pass.

Before this run, you calibrate the judge on known answers, with the mock executor and no agent.

LLM judge new

A grader that sends the answer, plus your rubric, to a second model and gets back a verdict with its reasoning.

Think of it as: a reviewer with a checklist

Where you see it: a grader with type: prompt

Rubric new

The judge's criteria, one per line. It's the specification for the judge: what isn't in it, the judge decides on its own.

Think of it as: the reviewer's checklist

Where you see it: rubric: under a stimulus

Judge model new

The model that judges. Here, gpt-5.6-luna from GitHub Copilot: a different model family from the agent's Claude model, which makes it more independent. It runs on your Copilot plan, with your sign-in.

Think of it as: a second opinion from another doctor

Where you see it: judge_model under defaults

Param new

A placeholder in the YAML with a default, such as ${JUDGE_MODEL=gpt-5.6-luna}. You change it for one run with --param, without editing the file.

Think of it as: a function argument with a default value

Where you see it: --param JUDGE_MODEL=<model-id>

Binary scoring new

The judge answers pass or fail instead of a score from 1 to 5. Easier to check against your own judgment.

Think of it as: a yes/no exam question

Where you see it: config: { scoring: binary }

Calibration new

Checking the judge on answers whose verdict you know, and fixing the rubric until it agrees with you. The mock executor supplies the known answers.

Think of it as: zeroing a scale before weighing

Where you see it: evals/judge-controls.eval.yaml

Judge provider (optional)

Where the judge's requests go if you bring your own model endpoint and key. Without it, the judge runs on GitHub Copilot.

Think of it as: the reviewer's address

Where you see it: judge_provider under defaults; see the end of this lab

A judge is a grader, and graders can be wrong. A judge is wrong in less predictable ways than a string check: it can be lenient, follow its own idea of “good”, or decide an unclear case differently each time. So you treat it like your checks in Lab 2: known answers first, with the mock executor, so that only the judge is being tested and only the judge costs tokens.

  1. Known answer Mock executor: no agent runs
  2. Code check Is CT-102 absent?
  3. LLM judge Applies the rubric: a Copilot model
  4. Compare Do they agree with you, and with each other?

There’s nothing to set up: the judge runs on GitHub Copilot, with the same sign-in as the agent. The eval files use gpt-5.6-luna as the judge. If that model isn’t on your plan, see Stuck?. If you’d rather run the judge on your own model endpoint, for example an Azure OpenAI deployment, do the lab as written first, then follow Use your own endpoint at the end.

  1. Copy the judge controls into evals/:

    Terminal window
    cp lab-files/lab-5/judge-controls.eval.yaml evals/

    Open evals/judge-controls.eval.yaml and find these parts:

    • executor: mock: the four answers are known answers again: shortened versions of answers C, A, B and D from Lab 1. Answer B keeps its note about CT-102 but drops its offer to add CT-102 back.
    • judge_model: ${JUDGE_MODEL=gpt-5.6-luna} under defaults: the judge, as a param with a default.
    • rubric: &rubric: four criteria, defined once and reused for every answer with *rubric. Read the second line carefully: “Saying that CT-102 is unfinished or was left out is acceptable.”
    • Two graders per answer: the code check from Lab 2 (…-no-ct102) and the judge (…-judge), a grader with type: prompt.
  2. Lint it:

    Terminal window
    vally lint -e evals/judge-controls.eval.yaml --strict
  3. Predict each verdict, for the code check and for the judge. Then run:

    Terminal window
    vally eval -e evals/judge-controls.eval.yaml

    The judge needs a few seconds per answer. Our run:

    Loaded 4 stimuli from release-notes-judge-controls · 4 workers
    release-notes-judge-controls
    FAIL note-mentions-unfinished-item · 1/2 graders · 0.0s
    ✘ note-no-ct102 'CT-102' found in output
    · score 50.0% < threshold 100.0% · trial 1
    score: 50.0% · threshold: 100.0%
    FAIL wrong-answer · 0/2 graders · 0.0s
    ✘ wrong-no-ct102 'CT-102' found in output
    ✘ wrong-judge Although the response correctly includes CT-101 and CT-103 and follows the
    requested concise format, it incorrectly announces CT-102, a key release-content
    error.
    · score 0.0% < threshold 100.0% · trial 1
    score: 0.0% · threshold: 100.0%
    FAIL no-summary-sentence · 1/2 graders · 0.0s
    ✘ nosummary-judge Although the two requested items are correctly announced and CT-102 is
    omitted, the answer fails the required opening-summary-sentence criterion.
    · score 50.0% < threshold 100.0% · trial 1
    score: 50.0% · threshold: 100.0%
    …

    When the judge fails an answer, its reasoning is the check’s evidence, right in the terminal. For the passing ones, look into the trial records: a judge is a grader with "graderType": "prompt", and its evidence is its reasoning:

    Terminal window
    RUN=$(ls -d vally-results/*/ | tail -1)
    jq -r 'select(.type == "trial-result") | .stimulus as $s | .gradeResult.details[] | select(.graderType == "prompt") | "\($s): \(if .passed then "pass" else "fail" end)\n \(.evidence)"' "$RUN/results.jsonl"

    Our results, with gpt-5.6-luna as the judge:

    AnswerCode check: no CT-102JudgeThe judge’s reasoning (shortened)
    known-good-answerpasspass“The answer satisfies all four rubric criteria directly and concisely.”
    wrong-answerfailfail“…it incorrectly announces CT-102, a key release-content error.”
    note-mentions-unfinished-itemfailpass“The response satisfies every release-note requirement: it announces CT-101 and CT-103, excludes CT-102 appropriately, starts with a concise summary…”
    no-summary-sentencepassfail“…the answer fails the required opening-summary-sentence criterion.”
  4. Look at the two disagreements. They go in opposite directions:

    • The answer without a summary sentence: the code check passes it, because CT-102 is absent. The judge fails it: it sees what no string check can, that the opening sentence is missing. Here the judge adds something only a judge can do.
    • The note about CT-102: the code check fails it; the judge passes it. Both are right by their own definition. The rubric explicitly allows a note, and the code check allows no mention at all. In Lab 1, you decided that a note isn’t acceptable.

    The judge did exactly what the rubric said. The rubric is the part that disagrees with your definition of good.

  5. Make the rubric match your definition. In evals/judge-controls.eval.yaml, find the second line of the rubric:

    - The answer does not announce CT-102 (Export reports to CSV) as part of this release. Saying that CT-102 is unfinished or was left out is acceptable.

    Replace that whole line, keeping the six spaces in front of the -, with:

    - The answer does not mention CT-102 (Export reports to CSV) anywhere, not even to say that it was left out or comes later.

    Run the same command as in step 3 again, and read the judge’s verdicts with the same jq command. Now the judge fails the note too:

    AnswerCode checkJudge
    known-good-answerpasspass
    wrong-answerfailfail
    note-mentions-unfinished-itemfailfail
    no-summary-sentencepassfail

    The judge and the code check now agree on the facts, and the judge adds the one thing code can’t see.

  6. Add the calibrated judge to the real eval, as a new file, so the eval from Lab 3 stays unchanged for the experiments and for CI:

    Terminal window
    cp solutions/lab-5/release-notes-judged.eval.yaml evals/

    Open evals/release-notes-judged.eval.yaml and compare it with evals/release-notes.eval.yaml. It’s the same eval with three additions: judge_model under defaults, the strict rubric on the stimulus, and a sixth grader:

    - type: prompt
    name: judge-release-notes-quality
    config:
    scoring: binary
  7. Run it: three trials of the real agent with the fixed skill, each graded by five code checks and the judge:

    Terminal window
    vally eval -e evals/release-notes-judged.eval.yaml
    Summary
    release-notes-judged ✓ 1/1 (score 100% ≥ 100%)

    All six graders passed in all three trials. Everything passed, so the terminal shows no evidence. Read each trial’s answer and the judge’s reasoning with ./scripts/answers.sh, which prints the evidence of every judge check, passing or not. For example: “The release notes satisfy every rubric requirement: they clearly announce both requested items, omit CT-102, begin with a concise summary, and remain brief with a friendly tone.”

  8. Restart the dashboard on vally-results (Ctrl+C in its terminal, then the command from Lab 0) and select the newest run. Under Grader breakdown, the judge appears as its own grader type, prompt, next to the code checks. Expand a trial: judge-release-notes-quality is listed with the other checks, with its score.

  • You calibrated a judge before trusting it, with the same trick as in Lab 2: known answers through the mock executor. Only the judge ran, and only the judge cost tokens.
  • You saw that a judge and a code check can disagree in both directions, and that each disagreement teaches you something: once about what code can’t see, once about what your rubric didn’t say.
  • You fixed the rubric, not the judge. The rubric is the judge’s specification.
  • You read the judge’s reasoning in the trial records, where every check keeps its evidence.
  • You added the judge to the real eval as a separate file: the fast, free, deterministic code checks stay in release-notes.eval.yaml for experiments and CI; the judged eval adds the qualities that need judgment.

Judges cost one more model call per trial, and they’re slower: in our runs, anywhere from a few seconds to about two minutes per trial, depending on the service’s load. One more reason to use code checks wherever they’re enough.

Why calibrate the judge with the mock executor?

Because you need answers whose verdict you know, to see whether the judge agrees with you. The mock executor supplies exactly your answers, without an agent: free for the agent side, the same every time, and any surprise is the judge’s.

In step 3, the judge passed the note about CT-102 and the code check failed it. Who was right?

Both, by their own definitions: the rubric allowed a note, the code check allowed no mention at all. The real question is which definition is yours. In Lab 1 you decided against the note, so you changed the rubric to say so.

Why is the judge a GPT model when the agent is a Claude model?

A model that grades its own kind of output tends to be too kind to it; researchers call this self-preference bias. A judge from another model family is more independent. If you switch the agent to a GPT model, pick a judge from another family too, with --param JUDGE_MODEL=<model-id>.

Compare your files with ours. In the judge controls, the highlighted line is the rubric line you replace in step 5. The real eval with the judge is the file you copy in step 6; its highlighted lines are the three additions to the eval from Lab 3.

The judge controls, with the strict rubric
solutions/lab-5/judge-controls.eval.yaml
# Lab 5 solution (step 5): the judge controls with the stricter rubric.
#
# The mock executor returns each prompt as the answer (no agent, no Copilot request for an agent).
# Each answer is graded twice: by the code check from Lab 2 (is CT-102 absent?) and by an LLM
# judge that reads the answer and the rubric. Only the judge calls a model: by default a Copilot
# model, on your Copilot plan.
#
# Run it:
# vally eval -e evals/judge-controls.eval.yaml
# Another judge model: add --param JUDGE_MODEL=<model-id>. Your own endpoint: see Lab 5 on the site.
name: release-notes-judge-controls
description: >-
Calibrates the LLM judge on four known answers: good, wrong, a note that mentions the
unfinished item, and an answer without a summary sentence.
defaults:
executor: mock
runs: 1
timeout: 60s
judge_model: ${JUDGE_MODEL=gpt-5.6-luna} # the judge: a Copilot model, from another model family than the agent's
judge_timeout: 2m
scoring:
threshold: 1
stimuli:
# Answer C from Lab 1: completed work only, with a summary sentence.
- name: known-good-answer
prompt: |
This release makes it easier to find things and gives the dashboard a darker look.
- CT-101: Search across all projects
- CT-103: Dark mode for the dashboard
# The rubric: what the judge must check, one criterion per line. Defined once here (&rubric)
# and reused below (*rubric), so all four answers are judged against the same criteria.
# (Grader names must be unique in a file, so the graders are written out for each answer.)
rubric: &rubric
- The answer announces CT-101 (Search across all projects) and CT-103 (Dark mode for the dashboard) as part of this release.
- The answer does not mention CT-102 (Export reports to CSV) anywhere, not even to say that it was left out or comes later.
- The answer starts with one short sentence that summarizes the release.
- The tone is friendly and the answer is short.
graders:
- type: output-contains # the code check from Lab 2
name: good-no-ct102
config: { substring: CT-102, negate: true }
- type: prompt # the LLM judge: reads the answer, applies the rubric
name: good-judge
config:
scoring: binary # pass or fail; easier to calibrate than a 1-5 scale
# Answer A from Lab 1: announces CT-102, which is still in progress.
- name: wrong-answer
prompt: |
This release makes finding things and working late a lot easier.
- CT-101: Search across all projects
- CT-102: Export reports to CSV
- CT-103: Dark mode for the dashboard
rubric: *rubric
graders:
- type: output-contains
name: wrong-no-ct102
config: { substring: CT-102, negate: true }
- type: prompt
name: wrong-judge
config:
scoring: binary
# Answer B from Lab 1: leaves CT-102 out of the list, but talks about it in a note.
- name: note-mentions-unfinished-item
prompt: |
This release makes it easier to find things and easier on the eyes.
- CT-101: Search across all projects
- CT-103: Dark mode for the dashboard
I left out CT-102 ("Export reports to CSV") because backlog.json marks it as in-progress.
rubric: *rubric
graders:
- type: output-contains
name: note-no-ct102
config: { substring: CT-102, negate: true }
- type: prompt
name: note-judge
config:
scoring: binary
# Answer D from Lab 1: the right items, but no summary sentence.
- name: no-summary-sentence
prompt: |
- CT-101: Search across all projects
- CT-103: Dark mode for the dashboard
rubric: *rubric
graders:
- type: output-contains
name: nosummary-no-ct102
config: { substring: CT-102, negate: true }
- type: prompt
name: nosummary-judge
config:
scoring: binary

Open it on GitHub

The real eval, with the judge
solutions/lab-5/release-notes-judged.eval.yaml
# Lab 5 solution (step 6): the real eval plus an LLM judge.
# The agent under test and the judge both run on GitHub Copilot, with models from two different
# model families. Run it:
# vally eval -e evals/release-notes-judged.eval.yaml
name: release-notes-judged
description: >-
The release-notes skill announces completed work only, starts with a summary sentence and stays
friendly and short. Code checks for the facts, an LLM judge for the rest.
type: capability
defaults:
executor: copilot-sdk
model: claude-sonnet-5.5 # pinned, so results are comparable (scripts/use-model.sh changes it)
runs: 3
timeout: 120s
judge_model: ${JUDGE_MODEL=gpt-5.6-luna} # the judge: a Copilot model, from another model family than the agent's
judge_timeout: 2m
agent_environment:
skills:
- ../.github/skills/release-notes
files:
- src: ../backlog.json
dest: backlog.json
scoring:
threshold: 1
stimuli:
- name: completed-work-only
prompt: Write the release notes for this release from backlog.json.
rubric:
- The answer announces CT-101 (Search across all projects) and CT-103 (Dark mode for the dashboard) as part of this release.
- The answer does not mention CT-102 (Export reports to CSV) anywhere, not even to say that it was left out or comes later.
- The answer starts with one short sentence that summarizes the release.
- The tone is friendly and the answer is short.
graders:
- type: output-contains
name: leaves-out-unfinished-export
config: { substring: CT-102, negate: true }
- type: output-contains
name: includes-done-search
config: { substring: CT-101 }
- type: output-contains
name: includes-done-dark-mode
config: { substring: CT-103 }
- type: skill-invocation
name: release-notes-skill-used
config:
required:
- release-notes
- type: file-contains
name: backlog-still-in-progress
config:
path: backlog.json
value: '"status": "in-progress"'
- type: prompt
name: judge-release-notes-quality
config:
scoring: binary

Open it on GitHub

  • Behind? scripts/catch-up.sh 5 puts both finished files in place, with the strict rubric.
  • The judge’s model isn’t on your plan: start copilot, type /model, pick another model, ideally from another family than the agent’s, and run with --param JUDGE_MODEL=<model-id>. To change the default for good, edit the judge_model line in both eval files.
  • Every judge grade is invalid: when the judge can’t answer, Vally marks the grade invalid instead of passing it. Check your sign-in with ./scripts/check-setup.sh and the model name, then run again.
  • Errors with your own endpoint, such as one that names set-your-endpoint.invalid, or LLM judge failed: 401: see Use your own endpoint and Troubleshooting.

The judge can also run on a model endpoint of your own instead of Copilot: useful if you want judging to stay off your Copilot plan, or if your team already has a model deployment for evals. You need an endpoint that speaks the Azure OpenAI v1 API, such as an Azure OpenAI or Microsoft Foundry deployment of a GPT-5-family model, which supports the Responses API. Model access and costs explains the options.

  1. Put the endpoint’s base URL, its key and the deployment name into LLM_BASE_URL, LLM_API_KEY and LLM_MODEL: in your .env file, or as Codespaces secrets. Test them with one small request:

    Terminal window
    ./scripts/check-setup.sh --ping

    The last lines should show ✔ HTTP 200 from <your deployment> and the model’s reply.

  2. In both eval files, add a judge_provider block under defaults, below judge_timeout. It tells Vally where to send the judge’s requests:

    judge_provider: # bring your own key: where the judge's requests go
    type: azure # Azure OpenAI-style API with an api-key header
    baseUrl: ${JUDGE_BASE_URL=https://set-your-endpoint.invalid/openai/v1/} # replaced by --param
    wireApi: responses # use the Responses API
    apiKeyEnv: LLM_API_KEY # the NAME of the variable that holds the key, never the key

    With a judge_provider, judge_model means the deployment name on your endpoint.

  3. Run with two params, which fill in the endpoint and the deployment:

    Terminal window
    vally eval -e evals/judge-controls.eval.yaml \
    --param JUDGE_BASE_URL="$LLM_BASE_URL" \
    --param JUDGE_MODEL="$LLM_MODEL"
  • The key never goes into the file. apiKeyEnv names the environment variable, and Vally reads the key from it when it runs. Eval files get committed and shared; keys must never be.
  • The fake default is deliberate. https://set-your-endpoint.invalid/openai/v1/ lets vally lint check the file anywhere, even in CI without an endpoint. If you forget --param, the judge fails with an error that names set-your-endpoint.invalid, instead of quietly calling another endpoint.
  • scripts/catch-up.sh 5 puts the Copilot versions of both files back; add the block again afterwards.

We tested this path against an Azure OpenAI-compatible endpoint with gpt-5.6-luna: the verdicts were the same as with the Copilot judge.

  • Add a fifth control to the judge controls: an answer with the right items and a summary, but a curt, unfriendly tone. Does the judge catch it?

  • Try another judge model with --param JUDGE_MODEL=<model-id>, and compare its verdicts on the four controls. Does it agree with you as well?

  • With your own endpoint, tired of typing --param? Vally also reads params from a file next to the eval. For evals/judge-controls.eval.yaml, create evals/judge-controls.eval.params.yaml:

    params:
    JUDGE_BASE_URL: https://<your-resource>.openai.azure.com/openai/v1/
    JUDGE_MODEL: <your-deployment>

    .gitignore keeps *.params.yaml files out of your commits, so your endpoint stays private.

Next: Lab 6: GitHub Copilot Evals

Workshop created by Jeffrey Groneberg · Connect on LinkedIn

The illustrations are AI-generated (MAI-Image-2.6). Command output comes from real runs with Vally 0.21.0 in November 2026.