概念
Prompt risks and limits
Exposure, poisoning, hijacking and jailbreaking: how prompts get attacked and how to defend.
本课尚未翻译,暂以英文显示。
Exposure
- What happens
- The prompt or private data leaks in a reply.
- Defense
- Keep secrets out of prompts. Filter outputs.
Poisoning
- What happens
- Bad data skews training or retrieval.
- Defense
- Use trusted, reviewed data sources.
Hijacking
- What happens
- Hidden instructions override the app.
- Defense
- Separate instructions from user input. Guardrails.
Jailbreaking
- What happens
- Tricky wording beats safety rules.
- Defense
- Guardrails and testing with attack prompts.
| Risk | What happens | Defense |
|---|---|---|
| Exposure | The prompt or private data leaks in a reply. | Keep secrets out of prompts. Filter outputs. |
| Poisoning | Bad data skews training or retrieval. | Use trusted, reviewed data sources. |
| Hijacking | Hidden instructions override the app. | Separate instructions from user input. Guardrails. |
| Jailbreaking | Tricky wording beats safety rules. | Guardrails and testing with attack prompts. |
1 / 2
Exposure
- What happens
- The prompt or private data leaks in a reply.
- Defense
- Keep secrets out of prompts. Filter outputs.
Poisoning
- What happens
- Bad data skews training or retrieval.
- Defense
- Use trusted, reviewed data sources.
| Risk | What happens | Defense |
|---|---|---|
| Exposure | The prompt or private data leaks in a reply. | Keep secrets out of prompts. Filter outputs. |
| Poisoning | Bad data skews training or retrieval. | Use trusted, reviewed data sources. |
2 / 2
Hijacking
- What happens
- Hidden instructions override the app.
- Defense
- Separate instructions from user input. Guardrails.
Jailbreaking
- What happens
- Tricky wording beats safety rules.
- Defense
- Guardrails and testing with attack prompts.
| Risk | What happens | Defense |
|---|---|---|
| Hijacking | Hidden instructions override the app. | Separate instructions from user input. Guardrails. |
| Jailbreaking | Tricky wording beats safety rules. | Guardrails and testing with attack prompts. |
- 1The attacker sends a harmful prompt.
- 2Safe prompts pass to the model.
- 3Harmful prompts are blocked.
是什么
Prompts can be attacked, and prompt engineering has limits. Four risks are named in the exam guide.
Exposure means the prompt or private data in it leaks out, for example when the model repeats its hidden instructions. Poisoning means harmful or false data gets into the data a model learns from or retrieves, so its answers shift. Hijacking, also called prompt injection, hides new instructions in the input so the model follows the attacker instead of the app. Jailbreaking uses clever wording to push a model past its safety rules.
是什么
Defend in layers: keep secrets out of prompts, check and filter inputs and outputs, use trusted data sources, and give the app only the permissions it needs. Amazon Bedrock Guardrails can block unwanted inputs and outputs. Prompts also cannot fix everything: a model can still hallucinate or ignore instructions.
要记住
- Exposure: prompt or private data leaks out.
- Poisoning: bad data corrupts what the model learns or retrieves.
- Hijacking (prompt injection): hidden instructions override the app's goal.
- Jailbreaking: tricking the model into breaking its safety rules.
- Defenses: guardrails, input and output checks, trusted data, least privilege.
要记住
- Never put passwords or secrets in a prompt.
考试中
- “Input text that tells the model to ignore its instructions” is hijacking (prompt injection).
- “Clever wording to bypass safety rules” is jailbreaking.
- “Block harmful prompts and replies” points to Amazon Bedrock Guardrails.
别和这些弄混
- AI security threats and defensesThe main ways an AI application can be attacked or leak data, and what defends against each.
- Amazon Bedrock GuardrailsSafeguards that check what goes into a generative AI application and what comes out.
- Prompt best practicesHabits that raise answer quality: be specific, keep it short, give examples, test and add guardrails.