What is Prompt Injection Rate?
Prompt Injection Rate is the percentage of adversarial attempts to manipulate an AI system's behavior, by embedding hidden instructions in user input or retrieved content, that successfully override the system's intended behavior. It's a core security metric for any AI system that processes untrusted external text, such as documents, emails, or web pages.
TL;DR
Prompt Injection Rate is the share of attack attempts that successfully hijack an AI system's instructions. Lower is better, and zero is the goal.
Formula
Prompt Injection Rate = (Successful Injection Attempts / Total Injection Attempts Tested) × 100
Why It Matters
A single successful prompt injection can turn a helpful AI feature into a liability, leaking data, taking unintended actions, or ignoring the guardrails it was built with. Teams that never measure this rate have no idea whether their defenses actually work until an attacker finds out for them. Because attack patterns evolve constantly, a rate that looked safe last quarter can quietly rise as new techniques emerge, so tracking it continuously is what catches drift before it becomes an incident. It also gives security and product teams a concrete number to justify investment in input sanitization, sandboxing, or stricter system prompts. Any AI system that ingests untrusted external content, documents, emails, scraped web pages, is exposed, which makes this one of the few AI metrics that doubles as a security control.
Example
A security team runs 300 known prompt injection attack patterns against an AI system that summarizes uploaded documents, and 18 of them successfully cause the system to ignore its original instructions and follow injected commands instead. Prompt injection rate is 18 divided by 300, times 100, which equals 6%. Because any AI system that reads content from outside sources, like web pages or user-uploaded files, is a potential injection target, this rate is typically tested continuously as new attack patterns emerge, not measured once and assumed to stay constant.
Frequently Asked Questions