AI

Prompt injection

An attack that hides instructions in text an AI reads, tricking it into ignoring its rules or leaking data.

By Nick Irmo · Updated

What Prompt injection means

If your chatbot or AI tool reads user messages, web pages or documents, someone can try to slip in commands like "ignore your instructions." This can expose data or cause harmful actions. Limit what the AI can access and do, and treat its outputs with caution.

Why it matters for your website

If you add an AI chatbot or assistant to your site, anyone can try to trick it with hidden or sneaky instructions. A successful attack could make it say harmful things, reveal private data or take actions it shouldn't. Planning for this protects your customers and your reputation.

Example

A hotel adds an AI chat assistant that reads guest messages. A user types instructions telling it to ignore its rules and list other guests' bookings, so the assistant must be built to refuse and must not have access to that data.

Tips

  • Limit what data and actions your AI tools can access.
  • Require human approval before an AI takes important actions like sending emails or payments.
  • Test your chatbot with tricky inputs before launching it publicly.

Common mistakes

  • Connecting a public chatbot directly to customer records with no access limits.
  • Assuming a system prompt alone will stop all misuse.

Questions about Prompt injection

What is Prompt injection?
An attack that hides instructions in text an AI reads, tricking it into ignoring its rules or leaking data.
Can prompt injection be fully prevented?
Not completely with current technology. The safest approach is layered defenses: limited access, input filtering, human review for risky actions and regular testing.
What is indirect prompt injection?
It's when harmful instructions are hidden in content the AI reads, like a webpage, email or document, instead of being typed by the user directly.

Tell us what the site needs to do.

Share a few details and a budget range. We reply within one business day with a plan, a platform recommendation and a fixed quote.