Search the Atlas

Search risks, controls, and glossary terms

Non-AgenticSecurity

Prompt Leakage

Explanation

Prompt leakage checks whether an AI system can be coaxed into revealing its hidden system prompt or instructions — the confidential text that defines its guardrails, business rules and sometimes embedded secrets. In BFSI this matters because a leaked prompt for a RAG or chat assistant can expose internal policies, exploitable guardrail logic, or data-source details that help an attacker craft further attacks. It is measured by the Prompt Leakage Score, defined as Prompt Leakage Risk = Similarity(leaked prompt, original prompt): the closer a model's output (under adversarial extraction attempts) matches the original hidden prompt, the higher the leakage risk, with a similarity near zero meaning nothing meaningful was disclosed. To implement and operate it, run a suite of prompt-extraction and jailbreak probes against the deployed model, compute the similarity between any extracted text and the true system prompt using a text-similarity measure, and log each probe, the response, and the resulting score as evidence; instrument this both in pre-release testing and ongoing production monitoring. The threshold is < 0.2 acceptable, < 0.1 recommended for critical systems, so general systems must keep the similarity below 0.2 while critical banking systems should stay under 0.1. Exceeding the threshold is an immediate-priority breach that triggers prompt hardening, output filtering and review before the system continues to serve.

Metric calculation

$$ \text{Prompt Leakage Risk} = \text{Similarity}(\text{leaked prompt}, \text{original prompt}) $$

Risks mitigated

8