Lab 2: Check your checks
Your criteria from Lab 1 become checks now. But before you let them grade a real agent, you prove that they work: you give them answers whose verdict you already know, and see whether they agree with you. You’ll find that the starter checks have a blind spot, and you’ll fix it.
- changed
- seen before, different here
- You do
- Feed four known answers to your checks, find their blind spot, and fix it with a negative check.
- Under test
- Your checks: do they pass the good answers and fail the bad ones?
- Checked by
- Code checks on the answer: contains CT-101, contains CT-103, and, new, doesn't contain CT-102
- Task changed Four known answers, written as prompts
- Agent changed Mock executor: no model; the prompt becomes the answer
- Environment Not used here
- Trials 1 per answer: a mock never varies
- Checks changed
output-contains, positive and negative - LLM judge Not used here
- Results Terminal,
--verbose, trial records, dashboard
vally eval -e evals/release-notes-control.eval.yaml - changed
- seen before, different here
- You
- Vally the eval runner
- Mock executor no model
- Checks three per answer
- Results
vally-results/
- You to Vally: Starts the run Four tasks, each with a known answer, one trial each.
- For each of the 4 known answers
- Vally to Mock executor: Sends the prompt changed The prompt is the known answer, word for word.
- Mock executor to Vally: Returns the prompt as the answer changed No model, no tokens, the same every time.
- Vally to Checks: Hands over the answer changed Contains CT-101 and CT-103? And, once you add it, leaves out CT-102?
- Checks to Vally: Pass or fail, with evidence The good and the alternative answer should pass; the wrong and the empty one should fail.
-
- Vally to Results: Writes the results The pattern of verdicts shows whether your checks tell good from bad.
The pieces you’ll work with
Section titled “The pieces you’ll work with”- Control new
-
An answer whose verdict you already know: a known-good answer must pass, a known-bad answer must fail. Controls test your checks, not the agent.
- Mock executor new
-
An executor that calls no model. It returns each stimulus's prompt text as the "answer", so the checks grade exactly the text you wrote. Free, fast and the same every time.
- Stimulus new
-
One task. With the mock executor, its
promptis your known answer, word for word. - Grader
output-containsnew -
A code check that passes when the answer contains a text. Case-insensitive by default.
- Negative check new
-
The same check, inverted: passes when the text is absent.
- Threshold new
-
The score a trial needs to pass. Each trial's score is the average of its checks' scores; with
threshold: 1, every check must pass.
Why a mock executor?
Section titled “Why a mock executor?”In this lab, you don’t want an agent to write the answers: you want your answers, good and bad, so you know what the checks should say. The mock executor makes that possible. It skips the agent entirely and hands the prompt text straight to the graders:
- Normal trial executor: copilot-sdk (from Lab 3)
- Prompt "Write the release notes …"
- Agent works Copilot reads files, writes an answer
- Checks Grade the agent's answer
- Control trial executor: mock (this lab)
- Prompt Your known answer, word for word
- No model The prompt text becomes the answer
- Checks Grade your known answer
That gives you four things a real agent can’t:
- Certainty about the cause. If a control gets the wrong verdict, the check is wrong, because nothing else was involved. Later, when a real trial fails, you’ll know it’s the agent, not the check.
- No cost. No model, no tokens, no Copilot requests.
- Speed. Without a model there’s nothing to wait for: a control run takes a few seconds, so you can edit a check and rerun it twenty times.
- The same result every time. Controls are deterministic, so a change in their result always means a change in your checks.
What it doesn’t do is tell you anything about the agent. It tests your measuring instrument. The agent comes in Lab 3.
-
Open
evals/release-notes-control.eval.yamlin the editor. It has four stimuli, each a known answer:Stimulus The answer It should known-good-answerCT-101 and CT-103, with a summary sentence pass acceptable-alternativeThe same items in another order, other wording pass wrong-answerCT-101, CT-102 and CT-103: announces unfinished work fail empty-answer“Nothing new to announce in this release.” fail Each stimulus has two checks so far: “contains CT-101” and “contains CT-103”. Look at the top of the file too:
executor: mock,runs: 1(a mock answer never changes, so one trial is enough) andthreshold: 1. -
Check the file for mistakes, without running it:
Terminal window vally lint -e evals/release-notes-control.eval.yaml --strict✔ evals/release-notes-control.eval.yaml is validvally lintcatches errors such as a misspelled field or two checks with the same name.--stricttreats warnings as errors. -
Predict before you run: which of the four answers will pass with these checks? Then run the eval:
Terminal window vally eval -e evals/release-notes-control.eval.yamlLoaded 4 stimuli from release-notes-check-controls · 4 workersrelease-notes-check-controlsFAIL empty-answer · 0/2 graders · 0.0s✘ empty-includes-search 'CT-101' NOT found in output✘ empty-includes-dark-mode 'CT-103' NOT found in output· score 0.0% < threshold 100.0% · trial 1score: 0.0% · threshold: 100.0%────────────────────────────────────────────────────────Summaryrelease-notes-check-controls ✘ 3/4 (score 75% < 100%)✘ empty-answer 2 graders failed· empty-includes-search 'CT-101' NOT found in output · trial 1· empty-includes-dark-mode 'CT-103' NOT found in output · trial 1· score 0.0% < threshold 100.0% · trial 1Saved /workspaces/agent-evals-workshop-starter/vally-results/2026-11-19T09-54-58-895Z/Run ID 2d473096-412c-4eae-af7c-3e4ed0d126b4Vally lists only the stimuli that failed, each with the checks that failed and their evidence:
'CT-101' NOT found in output. 3 of 4 passed, and one of them is the wrong answer. The checks only ask whether CT-101 and CT-103 are present. The wrong answer has both, so it passes, even though it announces CT-102. Your eval is blind to the exact bug you care about. -
Fix the blind spot: add a negative check to every stimulus. In the file, replace each whole
# TODO (Lab 2, step 4)line, including its leading spaces, with a check like this one. The names must be unique in the file, so use the prefix of the stimulus’s other checks:good-,alt-,wrong-andempty-:- type: output-containsname: good-leaves-out-exportconfig: { substring: CT-102, negate: true }Keep the indentation: the
-lines up with the other checks’-. -
Lint again, then run again:
Terminal window vally lint -e evals/release-notes-control.eval.yaml --strictvally eval -e evals/release-notes-control.eval.yamlLoaded 4 stimuli from release-notes-check-controls · 4 workersrelease-notes-check-controlsFAIL wrong-answer · 2/3 graders · 0.0s✘ wrong-leaves-out-export 'CT-102' found in output· score 66.7% < threshold 100.0% · trial 1score: 66.7% · threshold: 100.0%FAIL empty-answer · 1/3 graders · 0.0s✘ empty-includes-search 'CT-101' NOT found in output✘ empty-includes-dark-mode 'CT-103' NOT found in output· score 33.3% < threshold 100.0% · trial 1score: 33.3% · threshold: 100.0%────────────────────────────────────────────────────────Summaryrelease-notes-check-controls ✘ 2/4 (score 75% < 100%)✘ wrong-answer wrong-leaves-out-export · 'CT-102' found in output· score 66.7% < threshold 100.0% · trial 1✘ empty-answer 2 graders failed· empty-includes-search 'CT-101' NOT found in output · trial 1· empty-includes-dark-mode 'CT-103' NOT found in output · trial 1· score 33.3% < threshold 100.0% · trial 1Saved /workspaces/agent-evals-workshop-starter/vally-results/2026-11-19T09-55-31-609Z/Run ID 78ca45aa-f8cd-42c2-b500-7e609d5572a1Vally reports a failed eval again, and this time that’s the result you want: see What just happened.
-
Judge the result yourself. The terminal showed only what failed. To see the answers behind the verdicts, run the eval once more with
--verbose: for each failing stimulus, Vally then also prints the answer it graded, underagent output. It’s free, so rerun as often as you like:Terminal window vally eval -e evals/release-notes-control.eval.yaml --verbosePart of the output:
FAIL wrong-answer · 2/3 graders · 0.0s✘ wrong-leaves-out-export 'CT-102' found in output· score 66.7% < threshold 100.0% · trial 10 turns · 0 tools · 0 tok · mock0 in · 0 outscore: 66.7% · threshold: 100.0%agent output- CT-101: Search across all projects- CT-102: Export reports to CSV- CT-103: Dark mode for the dashboard0 turns · 0 tools · 0 tok · mock: no model was involved. For all four answers, passing ones included, look into the trial records, with the samejqcommand as in Lab 0:Terminal window RUN=$(ls -d vally-results/*/ | tail -1)jq 'select(.type == "trial-result") | {stimulus, answer: .trajectory.output, passed: .gradeResult.passed, score: .gradeResult.score}' "$RUN/results.jsonl"For every stimulus, check: is the verdict the one you expected, and does the evidence of each failing check point at the right reason?
-
Look at the run’s summary table: in the Explorer, right-click
eval-results.mdin the newest run folder and select Open Preview. The Tokens column says0for every answer: the mock executor never called a model.Stimulus Graders Pass Rate Verdict empty-answer ❌ empty-includes-search 0/1
❌ empty-includes-dark-mode 0/1
✅ empty-leaves-out-export 1/10/1 ❌ wrong-answer ✅ wrong-includes-search 1/1
✅ wrong-includes-dark-mode 1/1
❌ wrong-leaves-out-export 0/10/1 ❌ acceptable-alternative ✅ alt-includes-search 1/1
✅ alt-includes-dark-mode 1/1
✅ alt-leaves-out-export 1/11/1 ✅ known-good-answer ✅ good-includes-search 1/1
✅ good-includes-dark-mode 1/1
✅ good-leaves-out-export 1/11/1 ✅ (Shortened: the real table also has the duration, tokens, turns and tool calls.)
-
Restart the dashboard, as in Lab 0: in its terminal, press Ctrl+C, then the Up arrow and Enter. Reload the page and select your newest run: a 50% pass rate, 4 outcomes, 0 tokens. Under Grader breakdown,
output-containspassed 9 times and failed 3 times: the three failures you expected, and nothing else.
What just happened
Section titled “What just happened”Vally says the eval failed, and that’s exactly the result you wanted. In a control eval, the known-bad answers are supposed to fail. Vally doesn’t know which answers you meant to be bad; it reports that 2 of 4 stimuli failed. (The score 75% in the summary is the average of the four answers’ scores, 100 + 100 + 66.7 + 33.3 percent; each answer’s own verdict depends on whether it reached the threshold. That step 3 also averaged 75%, with 100 + 100 + 100 + 0, is a coincidence.) What you check is the pattern: good ✅, alternative ✅, wrong ❌, empty ❌. That pattern proves three things:
- Your checks accept a good answer, even in another order and wording: they don’t depend on formatting.
- Your checks reject the bug you care about: an answer that announces CT-102.
- Your checks reject an answer that announces nothing.
In step 3 you saw why this matters: an eval with only positive checks would have scored the buggy skill as passing. You’d have trusted a broken measurement. Notice also that vally eval exited normally even though the eval failed: a failing verdict isn’t an error. Only with --require-pass does a failed verdict make the command exit with code 1, which is what you use in CI.
Check yourself
Section titled “Check yourself”Why did the wrong answer pass in step 3?
Because every check was positive: “contains CT-101”, “contains CT-103”. The wrong answer contains both. Nothing checked for what must not be there. Bugs often appear as something extra, so most evals need negative checks.
Why use the mock executor here instead of a real agent?
To test the checks, you need answers whose verdict you know. A real agent writes its own answers, varying from run to run, and costs tokens. The mock executor returns your known answer, free and the same every time, so a wrong verdict can only mean a wrong check.
Your known-good answer fails a check. What’s wrong: the answer or the check?
If you’re sure the answer is good, the check is wrong: too strict, or checking formatting instead of meaning. That’s the reason for the acceptable alternative: a check such as “the first bullet is CT-101” would fail it, although the answer is fine.
Solution
Section titled “Solution”Compare your file with ours. The highlighted lines are the ones you add in step 4: a negative check for every answer.
The finished control eval
# Lab 2 solution: a control eval. It tests the checks, not the agent.## The mock executor calls no model. It returns each stimulus's prompt text as the answer,# so every prompt below is a hand-written sample answer. That makes this eval free and# deterministic: run it as often as you like.## What you want to see: the two good answers pass, the wrong and the empty answer fail.name: release-notes-check-controlsdescription: >- Controls for the release-notes checks. A known-good answer and an acceptable alternative must pass; a wrong answer and an empty answer must fail. No model, no cost.defaults: executor: mock # no model, no cost: the "answer" is the prompt text itself runs: 1 # a mock answer never changes, so one trial is enough timeout: 60sscoring: threshold: 1 # a trial passes only when its score reaches 1, that is, every check passesstimuli: # Good: completed work only, with a summary sentence. - name: known-good-answer prompt: | This release makes finding and reading your work easier. - CT-101: Search across all projects - CT-103: Dark mode for the dashboard graders: - type: output-contains name: good-includes-search config: { substring: CT-101 } - type: output-contains name: good-includes-dark-mode config: { substring: CT-103 } - type: output-contains name: good-leaves-out-export config: { substring: CT-102, negate: true }
# Also good: different order and wording. Good checks don't depend on exact formatting. - name: acceptable-alternative prompt: | Dark mode and cross-project search are here. - CT-103: Dark mode for the dashboard - CT-101: Search across all projects graders: - type: output-contains name: alt-includes-search config: { substring: CT-101 } - type: output-contains name: alt-includes-dark-mode config: { substring: CT-103 } - type: output-contains name: alt-leaves-out-export config: { substring: CT-102, negate: true }
# Wrong: it announces CT-102, which is still in progress. This is the bug you'll meet in Lab 3. - name: wrong-answer prompt: | - CT-101: Search across all projects - CT-102: Export reports to CSV - CT-103: Dark mode for the dashboard graders: - type: output-contains name: wrong-includes-search config: { substring: CT-101 } - type: output-contains name: wrong-includes-dark-mode config: { substring: CT-103 } - type: output-contains name: wrong-leaves-out-export config: { substring: CT-102, negate: true }
# Wrong: it announces nothing. - name: empty-answer prompt: Nothing new to announce in this release. graders: - type: output-contains name: empty-includes-search config: { substring: CT-101 } - type: output-contains name: empty-includes-dark-mode config: { substring: CT-103 } - type: output-contains name: empty-leaves-out-export config: { substring: CT-102, negate: true }Stuck?
Section titled “Stuck?”- Behind?
scripts/catch-up.sh 2puts the finished control eval in place. It backs up your version first. duplicate-grader-name: every check name must be unique in the whole file. Use the stimulus’s prefix (good-,alt-,wrong-,empty-).- A YAML error after your edit: check the indentation. Each new
- type:line must start in the same column as the other checks.
Go further
Section titled “Go further”Add answer B from Lab 1 as a fifth control, named note-mentions-unfinished-item. Which verdict do your checks give it? Is that the verdict you decided on in Lab 1?
Next: Lab 3: Run the agent
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.