Strategic System Prompt Embedding

These canaries are hidden within the LLM's system prompt or other trusted context, often with explicit instructions for the model to never echo them, placing them in a context only accessible during a malicious prompt injection attempt.

The top 3

  1. Top 3 Strategic Placement Zones for System Prompt Canaries: Effective system prompt canaries are often placed at the beginning or end of the system prompt to detect direct leaks, or embedded contextually within instructions to catch more subtle extraction attempts. A stricter variant involves instructing the model to append a token to every response.
  2. Top 3 Obfuscation Tactics for Stealthy Prompt Canaries: To make canary tokens undetectable by attackers, key obfuscation tactics include generating high-entropy, unique strings; employing zero-width Unicode characters for visual invisibility; and using homoglyph encoding to substitute Latin characters with visually identical Cyrillic counterparts.
  3. Top 3 Metrics for Evaluating Canary Evasion Resistance: To assess the robustness of system prompt embeddings against prompt injection, critical metrics include a 0% System-Prompt Exfiltration rate, a low Attack Success Rate (ASR) for adversarial payloads, and a near-zero False Positive Rate (FPR) to ensure legitimate usage isn't flagged.

Sources

Open the full topic