引导式测验 · 硬 等级

提示泄漏和系统提示提取测验

测试提示泄漏的工作原理、它与提示注入有何不同,以及为什么安全应用程序在系统提示之外保守秘密和执行。

问题 1 的 8

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

预览每个问题8 问题

当您参加测验时,就会出现答案和解释。

  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?
    • 它们是完全相同的东西
    • 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
    • 模型的训练数据
  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
    • GDPR
    • The HTTP specification
    • The Unicode standard