What Distinguishes Prompt Leaking from Prompt Extraction
Prompt leaking and prompt extraction are frequently used interchangeably in enterprise AI security discussions, but they describe different failure modes with different root causes and different mitigations. Prompt leaking refers to a model unintentionally revealing system prompt content, internal instructions, or agent configuration through its output. It typically results from model behavior, formatting artifacts, or insufficient separation between system-level instructions and user-facing responses rather than from a deliberate attack.
Prompt extraction, by contrast, is a deliberate adversarial technique. An attacker crafts or iterates inputs specifically designed to reconstruct hidden system instructions, often through repeated probing, edge-case phrasing, or multi-step manipulation of reasoning behavior. The distinction matters operationally: leaking is a defect to be corrected through better output handling, while extraction is an adversarial technique that requires detection, rate limiting, and incident response. Treating both as the same risk category leads security teams to apply the wrong control to the wrong problem.
Key Dimensions
The table below summarizes how the two risks differ across intent, root cause, detection posture, and primary mitigations.