Why AI systems need their own testing
A language model receives instructions and data through the same channel: text. Anything it reads, whether a user message, an uploaded document, a web page or an email, can carry instructions that change its behaviour. When the model can also call tools, query databases or send messages, those instructions can turn into actions.
What to test
- Prompt injection: direct, from the user, and indirect, hidden in documents, pages or emails the system processes.
- Jailbreaks: attempts to make the model ignore its rules or produce content it must not.
- Sensitive data disclosure: whether the model reveals system prompts, other users' data or records retrieved from your knowledge base.
- Excessive agency: whether an agent can be manipulated into using its permissions, such as sending, deleting, paying or changing records, beyond what the task needs.
- Improper output handling: whether model output is passed unchecked into browsers, databases or other systems.
- Supply chain: the models, plugins and data sources the system depends on.
The OWASP Top 10 for LLM Applications groups these risks and is a sensible checklist to map findings against.
Controls that make attacks harder
- Least privilege for agents: only the tools and records the task needs, with scoped credentials.
- Approval gates on consequential actions.
- Separating instructions from untrusted content, and treating everything retrieved as untrusted.
- Validating output before it reaches another system.
- Logging prompts, tool calls and decisions, so incidents can be investigated.
None of these is enough on its own, which is why testing has to confirm that they hold together.
Make it continuous
Models, prompts, data sources and tools change often, so a test from three months ago says little about today's assistant. Run AI attack suites on every significant change, the way you run regression tests, and retest after each fix.
Regulation is catching up
The EU AI Act sets accuracy, robustness and cybersecurity requirements for high-risk AI systems, and NIS2 and DORA expect AI features to fall under the same risk management as any other system. Evidence from real tests is the most convincing way to show those controls work.
Rainted builds AI agents and attacks them too: our AI red team tests models and agents for prompt injection, jailbreaks, data leakage and agent abuse, mapped to the OWASP LLM Top 10.