QAShift is now part of Resolutex - stronger together · one platform, more muscleLearn more →
Testing glossary

What is prompt injection?

Prompt injection is an attack where crafted input tricks an AI model into ignoring its instructions or revealing data.

Direct injection comes from the user, for example “ignore previous instructions”. Indirect injection hides instructions in content the model reads, such as web pages, documents, emails or tool output.

It is the top risk in the OWASP Top 10 for LLM applications, and testing for it means running adversarial inputs through the real product, including its retrieval and tools.

Example

A document uploaded to a knowledge base contains hidden text telling the assistant to include a phishing link in every answer. An injection test catches the assistant obeying it.

Best practices

  • Test direct and indirect injection
  • Include injected content in documents and tool results
  • Check that sensitive data and tools stay protected
  • Rerun after every prompt or model change

Ship without fear.

Start testing free in minutes, or let a QAShift engineer deliver your first morning report within 5 days.