Back to All Posts
Jun 9, 2026 3:22:30 PM

What is prompt injection and how do I defend against it?

By dotsquares 1 minute read

Prompt injection is when malicious user input manipulates the model into ignoring its system prompt instructions. Defences: clearly delimit untrusted input in the prompt (XML tags, explicit labelling), instruct the model to treat user content as data not commands, validate outputs, and use least-privilege tool access.

Add Comment