Guide-linked quiz · Hard Level

Prompt Leaking and System Prompt Extraction Quiz

Tests how prompt leaking works, how it differs from prompt injection, and why secure apps keep secrets and enforcement outside the system prompt.

Question 1 of 8

Why can't a system prompt be guaranteed to stay secret?

Preview every question8 questions

Answers and explanations appear as you take the quiz.

  1. Why can't a system prompt be guaranteed to stay secret?
    • System prompts are stored on public servers
    • The model reads it as ordinary text in its context, and keeping it private is only a learned tendency
    • All APIs publish system prompts automatically
    • System prompts are deleted after each message
  2. How does prompt leaking differ from prompt injection?
    • They are exactly the same thing
    • Leaking is about extracting hidden content, while injection is about making the model follow the attacker's instructions
    • Injection only affects images
    • Leaking only happens with open-source models
  3. What was revealed in the well-known Bing Chat leak in February 2023?
    • Microsoft's source code
    • User passwords
    • Instructions including the internal codename Sydney
    • The model's training data
  4. Which approach does the guide say is the safest way to handle an API key the app needs?
    • Put it in the system prompt with a note saying 'keep this secret'
    • Encode it in base64 inside the prompt
    • Keep it in server-side code or a secrets manager and give the model scoped tools
    • Split it across several messages
  5. Why can simple output filters fail to stop a leak?
    • Filters slow the model too much to be used
    • Attackers can ask for the prompt paraphrased, translated or extracted a piece at a time
    • Filters only work on images
    • Output filters block all responses
  6. What is the purpose of placing a canary string in a system prompt?
    • To make the model answer faster
    • To detect in logs when the prompt has been leaked
    • To encrypt the prompt
    • To prevent all injection attacks
  7. A support bot's refund limit is written in its prompt and also enforced in the backend. What happens if the prompt leaks?
    • Users can now issue unlimited refunds
    • The rule becomes known but cannot be bypassed because the backend still enforces it
    • The bot shuts down
    • The refund limit is automatically deleted
  8. Which document listed system prompt leakage as its own risk in its 2025 edition?
    • The OWASP Top 10 for LLM Applications
    • The GDPR
    • The HTTP specification
    • The Unicode standard

Keep testing yourself

More quizzes picked for your level.

View all quizzes