0Pricing
AI Prompt Engineering · Lesson

Measuring Robustness

Scoring resistance to attacks.

Robustness as a Measurable Quantity

Robustness is the system's resistance to adversarial input, expressed as numbers you can track, compare, and gate on. 'It seems safe' is not measurement; an attack-success rate with a confidence interval is.

This lesson turns red-team findings into rigorous metrics.

Attack Success Rate

The headline metric is Attack Success Rate (ASR): the fraction of attack cases that defeat your defenses. Lower is better. Report it overall and broken down by category and technique so you know where you are weak.

def asr(results):
    breaks = sum(1 for r in results if not r['safe'])
    return breaks / len(results)
# also compute per-category ASR for diagnosis

All lessons in this course

  1. LLM Red-Teaming Basics
  2. Jailbreak Techniques
  3. Building an Attack Suite
  4. Measuring Robustness
← Back to AI Prompt Engineering