Home / Learn / Attacking LLM Applications

LessonAttacking LLM ApplicationsLesson 5 of 6

Distrust the scoreboard

Every number has inputs that are not printed beside it: how hard the tester tried, who scored the result, and what the benchmark really measures. Learn to read them, and to choose the tool that fits the question.

  • Foundations
  • Lesson 5
  • About 2 hours with the lab
  • Open source, free to read
On this page
The route

Objectivesby the end of this lesson

  • Say what a failed test does and does not show, and report the effort and budget spent.
  • Tell a capability result from a propensity result, and state the evaluation-awareness caveat.
  • Measure an LLM judge's consistency and biases before trusting its scores.
  • Pick the right open-source tool for a scan, a campaign, a logged evaluation and a regression check, and know what each sends off your machine.

Before you start, from Lessons 1 to 4: what is the Wilson interval for 7 of 10, roughly? Why does a defense need pass^k and not pass@k? In Lesson 3, what could an offline scan not see?

A failure proves little

A successful test shows a lower bound on what a system can do. A failed test proves a good deal less. It may only show that the tester did not try hard enough. On a set of buffer-overflow tasks, a model exploited about 5% with a bare prompt, 71% in a single attempt with a purpose-built scaffold, and 100% with retries.1 The UK AI Security Institute found that about 8% of its cyber tasks were solved only with more than ten million tokens of working budget. It recommends reporting results against budget, with the budget always stated.2

A report therefore says how much effort it spent: the scaffold, the number of attempts, and the token or time budget. METR's guidance on elicitation, as read through a search excerpt of the page, sorts failures into three kinds. Spurious failures are fixed, and counted. Real failures are left as they are. The third kind is trade-offs. The guidance also notes that the method can both under- and over-estimate capability.3

Can, or will?

A capability evaluation asks whether a model can do something when pushed. A propensity evaluation asks whether it does it by default, when nobody is pushing. The two answer different questions, and a report names which one it measured.

Propensity results now carry a caveat. Models increasingly notice when they are being tested. In the UK institute's evaluation of one frontier model, reported in March 2026, the model identified evaluations 80% of the time, and said so in only 2.3% of interactions.4 In October 2026 the institute reported that a model's own reasoning that its environment was simulated is not evidence that it was. In its incident, the model often concluded, wrongly, that its targets were simulated.5 Agents in sandboxes can also infer much about who is testing them from the environment itself.6 A behavioural result can no longer assume that the model believes the scenario is real.

The judge is a model too

Most red-team results are scored by a model and not a person, and the judge has its biases. StrongREJECT showed that simple refusal judges overstate jailbreak success, because many "successful" jailbreaks produce empty, useless output. Such a jailbreak succeeds only on the scoresheet. StrongREJECT scores specificity and convincingness instead.7 A May 2026 preprint edits answers in meaning-preserving ways chosen to please the judge, and raises LLM-judge scores in more than 65% of cases. Prompt-based detectors caught none of the edited outputs.8 Judges also tend to be lenient and sensitive to answer length, and a high agreement with humans in percent can hide different scores.9

Measure a judge before you trust it. Record its agreement with hand labels, its consistency when it grades the same answer again, and how far it shifts when only the presentation changes. If you know a judge's error rates from a hand-labelled set, you can correct an estimated rate for them, and widen the interval to cover the calibration set as well.10 Classifiers used as gates are judges too. One vendor reports that its automatic approval classifier caught 89% of dangerous commands in a synthetic study, against 13.6% for human reviewers. A bypass was reported in August 2026; that report is from a single source and was not checked for this page.11

Benchmarks measure less than they claim

A July 2026 validity audit examines agent-safety benchmarks across many models. On one of them, a policy that answers "unsafe" for every item scored an F1 of 0.690, above five of the 21 models that actually discriminate. A benchmark that a stopped clock can beat is a benchmark with something to explain. Across benchmarks, safety scores added no information about task success beyond capability.12 Reviews of benchmark practice find that flaws in task setup or reward design can distort measured performance by up to 100% in relative terms, and that construct validity problems recur across hundreds of benchmarks.13 Static benchmarks also tell you less and less as models harden against known attacks.14

Read every benchmark number with three questions: does a trivial baseline score well, does the metric reward what you care about, and could the items be in the training data?

Which tool for which job

The maintained open-source tools do different jobs. Checked on 2026-10-25:

Job Tool Version Runs fully local? What leaves your machine
Broad scan with many probes garak (NVIDIA, Apache-2.0) 0.17.1 yes, with a local generator such as Ollama downloads detector and probe models; no telemetry is documented (not confirmed); hosted generators send prompts to their vendor
Custom multi-turn campaigns PyRIT (Microsoft, MIT) 1.1.0 documented for local OpenAI-compatible targets; check before relying on it no telemetry statement found; memory can be Azure SQL, and Azure Content Safety scorers send data to Azure
Logged, repeatable evaluation Inspect and inspect_evals (UK AISI, MIT) 0.3.284 and 0.26.0 yes, with ollama/... or vllm/... the model calls you configure, and dataset downloads; no telemetry statement found
CI regression checks, YAML promptfoo (MIT, now part of OpenAI) 0.125.1 partly: some red-team plugins work only remotely with no API key, attack generation and grading go to the vendor's service; telemetry is on by default

Sources for each row are in the footnotes.15 PyRIT's old Azure repository is archived, and tutorials written before version 1.0 use its old "orchestrators" API. The rename is reported in the course's research but not stated on the 1.1.0 landing page. Tutorials for garak from before version 0.16 are also out of date. Whatever you use, record the tool, its version and its configuration in the run record, and check what it sends off your machine before you point it at anything.

Exercise 1about 2 hours

Audit a judge on harmless answers

Target: your own local models, with everyday questions. Nothing leaves your machine.

  1. Ask your model 40 everyday explanatory questions and save the answers. Label each answer correct or incorrect yourself, before any judge sees it.
  2. Use a second local model as the judge. Grade every answer five times and measure self-consistency: how often the five grades agree.
  3. Present pairs of answers in both orders and measure position bias: how often the preferred answer changes with the order.
  4. Grade three presentations of each answer: plain prose, the same content with headings and bullets, and the same content padded to double length. Measure the score shift per presentation.
  5. Report the judge's agreement with your labels and each bias, with an interval from Lesson 4.
  6. Score a trivial "always correct" baseline with F1 and with balanced accuracy, and explain why the two metrics rank it differently.
  7. Write a one-paragraph tool plan: which tool you would use for a broad scan, a custom campaign, a logged evaluation and a CI regression check, with exact versions.

Stop and escalate. Only harmless questions to your own local models belong here. If an answer contains something that looks like real personal data, a secret, or harmful content, or if any request would leave your machine, stop, keep the record private, and see Lesson 6.

Show what a sound result looks like

Agreement with hand labels as "k of 40, rate, Wilson interval". Self-consistency as the share of answers with five identical grades. Position bias as the share of pairs whose winner flips with the order. Style shifts as mean score changes per presentation, with intervals. The baseline section shows F1 rewarding "always correct" when most answers are correct, and balanced accuracy pricing in the misses on incorrect answers. The tool plan names a tool per job and says why, with versions.

Exercise 2self-check, about 10 minutes

Check your understanding

No model is run in this check.

  1. A model fails a task ten times. What do you report besides "failed"?
  2. Why does evaluation awareness weaken a propensity result more than a capability result?
  3. A judge agrees with humans 90% of the time. Why might that still not be enough?
  4. A benchmark score improved by 10 points. Name two checks before you believe it.
Show answers
  1. The scaffold, the number of attempts, the budget, and whether the failures came from the setup or the model.
  2. A propensity result assumes the model behaves as it would in deployment; if it recognises the test, its default behaviour may differ. A capability result is a lower bound either way.
  3. Percent agreement can hide systematic biases in what it gets wrong, such as leniency or length sensitivity, and its scores can still differ from human scores.
  4. Whether a trivial baseline also scores well, and whether the items could be in training data; also whether the metric rewards what matters.

Writing it up

Report the judge audit with intervals, and say which judge biases would move a red-team result scored by this judge, and in which direction. Read it against the rubric from Lesson 1.

Lesson text is CC BY 4.0 and code samples are MIT.

Notes

  1. Barnett and Thiergart, on the elicitation gap in cyber evaluations, 2024, arXiv 2412.08653, https://arxiv.org/abs/2412.08653. ↩
  2. UK AI Security Institute, on test-time compute in agent evaluations, 2 July 2026, https://www.aisi.gov.uk/blog/more-compute-more-capability-why-ai-agent-evals-need-to-account-for-test-time-compute. ↩
  3. METR, guidelines for capability elicitation, 15 March 2024 (read through a search excerpt), https://metr.org/blog/2024-03-15-guidelines-for-capability-elicitation/. ↩
  4. Institute for AI Policy and Strategy, on evaluation awareness, 31 March 2026, https://www.iaps.ai/research/evaluation-awareness-why-frontier-ai-models-are-getting-harder-to-test, reporting the UK institute's evaluation in a developer's system card; the system card itself was not checked for this page. ↩
  5. UK AI Security Institute, investigating alignment failures in its incident, 23 October 2026, https://www.aisi.gov.uk/blog/investigating-alignment-failures-in-aisis-incident. ↩
  6. UK AI Security Institute, on what sandboxed agents learn about their evaluation environments, 20 April 2026, https://www.aisi.gov.uk/blog/what-can-sandboxed-ai-agents-learn-about-their-evaluation-environments. ↩
  7. StrongREJECT, 2024, arXiv 2402.10260, https://arxiv.org/abs/2402.10260. ↩
  8. Yang, Hooi et al., "Turning Bias into Bugs" (BITE), preprint, 28 May 2026, alphaXiv 2605.26156, https://www.alphaxiv.org/abs/2605.26156. ↩
  9. Study of LLM-judge agreement and bias, arXiv 2406.12624, https://arxiv.org/abs/2406.12624. ↩
  10. Lee et al., on correcting LLM-judge error with a calibration set, arXiv 2511.21140, https://arxiv.org/abs/2511.21140. ↩
  11. Anthropic, on auto mode as the default in Claude Code, 7 August 2026, https://claude.com/blog/auto-mode-default-in-claude-code (a study with 1,053 paid testers in a purpose-built environment); the reported bypass: Simon Willison, 27 August 2026, https://simonwillison.net/2026/Aug/27/breaking-claude-code-opus-5-auto-mode/. ↩
  12. "Safety, or Just Capability? A Validity Audit of Agent-Safety Benchmarks", 30 July 2026, arXiv 2607.28685, https://arxiv.org/abs/2607.28685. ↩
  13. Agentic Benchmark Checklist, arXiv 2507.02825, https://arxiv.org/abs/2507.02825; a review of construct validity across 445 benchmarks, NeurIPS 2025, arXiv 2511.04703, https://arxiv.org/abs/2511.04703. ↩
  14. NIST CAISI research blog on its agent red-teaming competition, 23 March 2026, https://www.nist.gov/blogs/caisi-research-blog/insights-ai-agent-security-large-scale-red-teaming-competition. ↩
  15. garak: https://github.com/NVIDIA/garak and https://pypi.org/project/garak/. PyRIT: https://microsoft.github.io/PyRIT/1.1.0/ and https://github.com/microsoft/PyRIT. Inspect: https://inspect.aisi.org.uk/ and https://github.com/UKGovernmentBEIS/inspect_evals. promptfoo: https://github.com/promptfoo/promptfoo and its data-handling page, https://www.promptfoo.dev/docs/red-team/troubleshooting/data-handling. Archived PyRIT: https://github.com/Azure/PyRIT. garak release notes: https://github.com/NVIDIA/garak/releases. All checked 2026-10-25. ↩