What is prompt injection in an LLM application?
Show the answer and explanation
Correct answer: C, Untrusted text in the model's input that overrides or subverts the developer's instructions, so the model does something unintended.
Explanation Prompt Injection
Prompt injection happens because an LLM receives the developer's instructions and untrusted text (a user message, a web page, a document) in the same input and cannot reliably tell them apart. If the untrusted text contains instructions such as "ignore your previous instructions and…", the model may follow them instead of the developer's.
Why the other descriptions are different attacks:
- Planting trigger examples in training data is data poisoning (a backdoor), which changes the model itself, not the prompt.
- Flooding the endpoint with requests is a denial-of-service or resource-exhaustion attack.
- Rebuilding a model from its answers is model extraction (model theft).
Defences such as input filters, separating trusted and untrusted content, and least-privilege tools reduce the risk, but no known technique fully prevents prompt injection.
Interview tip: compare it to SQL injection (data being treated as instructions), then add that, unlike SQL, there is no reliable "escaping" for natural language.