A customer said 'ignore everything' and the support bot cursed back: four injection entry points and four layers of defense
Prompt injection is shipping to production inside real products, and a readable instruction can turn a customer-service bot into one that abuses users. The concrete numbers here show that prompt tweaks are weak; any team serving LLM outputs to end users needs code-side guards even when it costs latency.
A support bot followed an injected instruction and verbally abused a customer. The team then ran 120 injection samples through its pipeline and measured what each defense layer actually stops.
Four entry points matter differently: direct override prompts, role-play bypasses, indirect injection through uploaded documents, and encoding tricks like base64. Direct attacks hit 85% with no defense; document-based indirect injection hit only 40%, but it is the hardest to stop because the text looks exactly like a normal user question.
Hardening the system prompt brought the overall hit rate from 59.2/% to 31.7%, but did almost nothing against indirect injection. Real improvements came from tagging input sources, validating structured output against a schema, and whitelisting tools in code. The final four-layer setup left 3 of 120 samples (2.5%) getting through, at the cost of 1.4% false positives on normal queries and roughly 460 ms added to P95 latency.
The 59.2% unhardened hit rate is startling in itself: most simple prompt architectures already execute hostile instructions most of the time, and the incident only became visible because the output was abusive and got screenshotted.
Indirect injection through documents is the lockpick of this set: prompt hardening changed almost nothing because the model cannot see where a token came from, and the numbers show that only source tagging and business rules close that gap.
The 460 ms latency and 1.4% false positives reveal a real tradeoff hidden in most LLM security advice: hard defenses cost user experience, and teams building streaming or agentic products must decide whether to block content before or after emission.
The tool whitelist is the only defense that gives the model no opportunity to escalate: code never forwards the call, which turns prompt jailbreaks into harmless text rather than real actions.