Repository navigation
Production Recap 5 · Proving it: golden sets, judge bias and trajectory eval #28
akash-coded
started this conversation in
Exercises
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Exercise 5: Proving it, validation and QA
Language: Python, concept, diagrams Topics: golden set and scoring, LLM-as-judge bias, trajectory eval, red-team, cost and TRIM, the go/no-go gate Level: applied (predict, trace, debug)
Fifth foundation. You predict eval scores, trace judgement, and fix broken checks. Predict-output answers are the exact printed result.
Q1. Predict the exact output.
1.0then0.331.0then0.670.67then0.331.0then0.5Show answer
A) First passes all three. Second fails grounded (no
[source:) and in_scope (containsceo), passes has_options, so 1 of 3 is 0.33.Q2. Predict the pass rate.
0.50.6670.8331.0Show answer
B) Case scores are 1.0, 0.5, 0.5. Mean is 2 of 3, which prints
0.667.Q3. A judge model keeps scoring longer answers higher regardless of correctness. This bias, and its guard, are:
Show answer
C) The symptom is length. The other three are real judge traps, but not what is happening here.
Q4. This trajectory checker passes a wrong-order path. Predict its output, then read the fix.
False, and the fix is to compare lengths as wellTrue, and the intended fix is to sort both sequences before comparing themFalse, and the code is already correctTrue, and the fix isactual == expectedto respect orderShow answer
D)
set()throws away order, so a scrambled path passes. Comparing the ordered lists (actual == expected) is the fix. Sorting would also lose the order, so it is not the fix.Q5. Haiku scores below the acceptance bar; Sonnet clears it. The program concludes, and the switch is cheap because:
Show answer
A) The eval, not preference, picks the model, and the model is a single swappable string. Re-running until it passes is gaming the test.
Q6. An agent gives the right rebooking answer, but the trace shows it never called
lookup_booking. Why does this fail a trajectory check?Show answer
B) It got lucky by assuming the tier. Change the passenger and the same path returns the wrong answer.
Q7. A red-team prompt defeats a guardrail during testing. Which are the right follow-ups? (select all that apply)
Show answer
A and B. Patch it, then make the failure a permanent case. Removing the feature or blanket-lowering the threshold trades one problem for another.
Q8. Complete the validate pipeline. Bank: a) all bars cleared b) a bar failed c) in progress d) timed out
flowchart LR B["New build or prompt change"] --> E["Golden set + trajectory"] E --> R["Red-team"] R --> C["Cost and latency"] C --> G{"Gate"} G -->|"blank 1"| S["Sign-off, ship"] G -->|"blank 2"| H["Hold, log failures as cases, fix"] H --> BShow answer
blank 1 = a (all bars cleared, ship), blank 2 = b (a bar failed, hold and loop back).
Q9. Match each LLM-as-judge trap to its guard. Bank: a) use a judge from a different model family b) reward grounding, not length c) anchor each score with a concrete example d) give the judge the source and score only agreement
Show answer
1 = a, 2 = b, 3 = c, 4 = d.
Q10. This scope scorer lets an off-scope answer pass. Which line is wrong?
anyshould beallShow answer
C) As written, containing a banned phrase returns 1 (pass). Flip it: return 0 when a banned phrase appears.
Q11. True or False: an answer that is correct but reached by the wrong path still passes a trajectory check, because trajectory only cares about the final answer.
Show answer
B) False. Trajectory asserts on the path. A right answer by the wrong path is a latent failure that fails the check.
Q12. Match each scorer line to its effect. Bank: a) rewards a cited source b) fails an off-scope answer c) turns the checks into a partial-credit fraction
Show answer
1 = a, 2 = b, 3 = c.
Q13. The golden set passes and guardrails hold, but cost is over budget. Everything else is green. The verdict is:
Show answer
D) A cost-only miss with everything else green is CONDITIONAL: ship with a named limit, for example scope reduced or approval kept on.
Q14. Which set of levers is TRIM, the program's cost checklist?
Show answer
A) Tier, Reuse, Idle-to-batch, Minimize. Sonnet where the eval demands it, Haiku on the cheap steps, cache the policy that repeats.
Q15. True or False: LLM-as-judge scores should be treated as evidence and spot-checked against human labels, not accepted as final verdicts.
Show answer
A) True. A judge is a force multiplier and a liability in one tool. Treat its scores as evidence, and audit a sample.
All reactions