AI / LLM Basics Interview Questions
What is Prompt Injection?
Prompt injection is when malicious or unexpected instructions are hidden inside content a model processes, tricking it into behaving differently than the actual user intended.
- Can be hidden inside a webpage, document, or file that a model reads as part of completing a task
- Exploits the fact that a model can't perfectly distinguish between genuine instructions from its actual user and text that merely looks like instructions
- Becomes especially risky for models connected to tools or external actions, since a successful injection can trigger real, unwanted actions
This is one of the more actively studied security challenges in deploying LLMs, and current defenses focus on input sanitization, careful permission scoping, and guardrails, rather than any single complete fix.
More Related questions...