Welcome!

Unlock your personalized experience.
Sign Up
Tag

Prompt injection examples Articles, Guides & Tutorials

2 posts

Prompt Injection in Generative AI: How It Works and How to Defend

Prompt injection is an attack in which text supplied to a large language model (LLM) makes it ignore its intended instructions and follow the attacker's instead. In direct injection, a user types the malicious instructions. In indirect injection, the instructions are hidden in content the AI reads, such as a web page, email, document or code comment, so the user may never see them.

What Is a Prompt Injection Attack? Prompt Injection in AI Explained

A prompt injection attack happens when text given to a large language model changes its behaviour in ways the developer did not intend. In direct injection, a user types instructions that override the system's rules. In indirect injection, the instructions are hidden in content the model reads, such as a web page, email, document or code comment.