A bank's research agent answers each analyst question from k = 20 retrieved web chunks and produces 500,000 answers a month. Assume 1% of retrieved chunks contain an injection, a detector removes injected chunks with recall 0.90, and chunks are independent. What share of answers is built on at least one undetected injected chunk, and how many answers a month is that?
Show the answer and explanation
Correct answer: A, About 2.0%, from 1 − (1 − 0.01 × 0.10)^20, or roughly 9,900 answers a month, since an answer is unaffected only if each of its 20 chunks is either clean or caught by the detector.
Explanation Prompt Injection
Per chunk, an injection gets through when the chunk is injected and the detector misses it: q = p × (1 − r) = 0.01 × 0.10 = 0.001.
An answer is unaffected only if none of its k chunks lets an injection through, so:
P(at least one undetected injection) = 1 − (1 − q)^k = 1 − 0.999^20 ≈ 0.0198, about 2.0%, or ≈ 9,900 of 500,000 answers a month.
For small q this is close to k × q = 0.02. The lesson is in how it scales:
| Recall r | q = p(1 − r) | Answers affected (k = 20) | Per month |
|---|---|---|---|
| 0.90 | 0.001 | ≈ 2.0% | ≈ 9,900 |
| 0.99 | 0.0001 | ≈ 0.2% | ≈ 1,000 |
| 0.999 | 0.00001 | ≈ 0.02% | ≈ 100 |
Even a 99%-recall detector lets an injected chunk into about 1,000 answers a month at this volume, and an adaptive attacker tunes payloads against the detector, so the real miss rate is likely higher than the benchmark suggests. Detection lowers the frequency; the control has to be limiting what an injected answer can do: no unapproved tools, egress limits, confirmation for actions.
Why the distractors fail: 0.1% ignores that each answer draws on 20 chunks. 20 × 0.01 × 0.90 uses recall (the share caught) where the miss rate belongs. 1 − 0.90^20 drops the 1% prevalence and treats every chunk as an attack.
Interview tip: write down 1 − (1 − p(1 − r))^k and turn it into a monthly count; it makes the case for capability limits better than any adjective.