100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Agent Evaluation & Observability
30 minadvanced

Adversarial and Red-Team Evaluation

Every eval built so far in this course asks a version of the same question: on a distribution of realistic, well-intentioned requests, does the agent do the right thing? That question has a blind spot. A production agent doesn't only receive requests from people trying to get their job done — it also receives text from tool results, retrieved documents, emails it summarizes, and web pages it fetches, any of which can be authored by someone whose entire goal is to make the agent do something it must never do. Measuring accuracy against benign traffic tells you nothing about what happens when the traffic is hostile.

This is a different kind of failure from the ones earlier lessons cover. A trajectory eval or an LLM judge is trying to catch the agent being wrong by accident — a bad tool choice, a hallucinated fact, an inefficient path to a correct answer. Adversarial evaluation is trying to catch the agent being wrong on purpose, because someone engineered an input specifically to produce that failure. The skill this lesson teaches is closer to security engineering than to product QA: you are not asking 'does this usually work,' you are asking 'can this be broken, and how would I know.'

That framing matters because it changes what 'good' looks like. A benign eval set you can grow organically from real user traffic. An adversarial eval set has to be built deliberately, because attackers do not show up in your logs until after they have already succeeded — and by the time you have absorbed the lesson, you want it sitting in a permanent regression suite, not written up in a postmortem and forgotten. This lesson covers threat modelling an agent, the parts of its attack surface that are unique to agents rather than to chatbots, how to build and score a permanent adversarial suite, what automated and human red-teaming each contribute, and the cost of defenses that the attack-success-rate number alone will never show you.

Analogy🏏Cricket
🏏 Think of it like cricket: a young India top-order batter spends an entire domestic season racking up hundreds on slow, low Chepauk-style tracks against tidy net bowlers who mostly just want to keep their rhythm, and every number in his stat sheet says he's ready for Test cricket. Then he's picked for a tour of Australia and walks out at the WACA in Perth, where the pitch has genuine pace and steepling bounce and the opening spell is Mitchell Starc and Pat Cummins bowling to hit the splice of the bat, not to be hit. His technique, built entirely against friendly bowling in friendly conditions, has never once been tested against someone actually trying to get him out, and the gap shows up in the first session, not gradually. His domestic average measured whether he could bat; it never measured whether he could survive an attack. The selectors who only looked at that average would have sent an unprepared batter into the one situation his whole career had never simulated. An agent evaluated only on ordinary, well-intentioned requests is that same batter: every benign eval it passes tells you it can do the job when nobody's trying to stop it, and tells you nothing about the first time someone is.
Lesson 17 of 35
0% complete