Two Canary Output Scans: Passive Leakage vs. Active Adherence

Output scanning with canary tokens serves dual purposes: passively detecting system prompt leakage if the token is unexpectedly reproduced, or actively verifying model adherence by instructing the LLM to include a sentinel token in every response. The *absence* of this actively instructed token signals a potential prompt injection that overrides model instructions.

Sources

Open the full topic