Defending Against Prompt Injection
Recognize and mitigate prompt injection attacks where retrieved or user content hijacks your LLM instructions.
What Is Prompt Injection?
Prompt injection is when text the model reads contains instructions that override your own. In RAG, malicious content can hide inside the very documents you retrieve.
Direct vs. Indirect
Direct injection comes from the user input. Indirect injection is hidden in retrieved documents, web pages, or files the model ingests later.
All lessons in this course
- Data Privacy and PII Handling
- Mitigating Hallucinations and Bias
- Responsible AI Practices for RAG
- Defending Against Prompt Injection