AISim › Chapter 1: Getting it working
The refund trick
Level 5. "Ignore previous instructions and…"
Your assistant is public. 15% of traffic is now people trying to make it leak the system prompt, insult customers, or promise refunds it can't give. A screenshot is already on social media.
Goals
- prompt-injection success at most 3%
- hallucination rate at most 7%
- accuracy at least 70%
Concepts: Prompt injection, Guardrails.
Hint
No single defense is enough. What checks the input? What checks the output? Watch the accuracy cost of being too strict.
What you learn
Safety is layered. An input classifier catches most attacks cheaply, an output judge catches what slips through (and many hallucinations too) — but each layer has false positives, and the judge must see the full answer, which breaks streaming. Defense in depth is a trade-off, not a checkbox.
More in this chapter
- The store chatbot (Level 1)
- The wrong error code (Level 2)
- The holiday rush (Level 3)
- Where's my order? (Level 4)
- Launch week (Chapter 1 boss)
This interactive level needs JavaScript. Built by Joshua Paul (cybernerdie).