ADR-042: A Public Prompt-Injection Challenge
Context
Prompt injection is the defining security problem of applications built on language models. The site already defends the concierge against it (ADR-030) and tests that defence in the AI evals (ADR-038), but visitors never see it. People hiring for applied AI want to see that the builder understands the attack, the layered defences and their limits, and the most convincing way to show that is to let them attack something.
Decision
Add a prompt-injection challenge to the Demos page: an assistant, Vault, holds a passphrase and the visitor tries to make it leak. Three levels add one defence each.
1. Instructions only: the system prompt asks it to keep the secret.
2. Hardened: a strict system prompt plus an input filter, a keyword list that refuses obvious attacks before the model is called.
3. Defence in depth: level 2 plus an output filter that redacts the exact passphrase.
* Leaks are judged more broadly than the filter looks: as written, word by word, spelled out, reversed, base64 and ROT13, so a level-3 win shows why output filtering alone fails.
* Every outcome names the layer that stopped or failed, and the lesson.
* A toy secret: two random words per level, new per server instance, never logged; messages and replies are not stored or logged.
* Bounded: one Gemini call per attempt (none when the input filter refuses), 500-character messages, under /api/ai/ (rate limit, App Check, daily budget), and a demoRedTeam flag, on by default (ADR-016).
Consequences
Benefits:
* Visitors experience prompt injection and layered defences first-hand.
* The levels mirror the real hierarchy of defences and how each one fails.
Trade-offs:
* Winning is meant to be possible; it demonstrates limits rather than claiming to be unbreakable.
* Each attempt that reaches the model costs a call against the daily budget.
* The passphrase changes when an instance restarts or another instance answers, so a win is per attempt, not a score.
Alternatives considered
1. Using the concierge as the target: Rejected — it emails the owner and has tools; a game should not share them.
2. A model-as-judge for leaks: Rejected — deterministic checks over known encodings are cheaper, explainable and enough to make the point.
3. A persistent leaderboard: Rejected for now — it would mean storing visitor input or identities.