How We Build a Custom WordPress Theme, From Design to Launch

By the LaunchLen Web Solutions Team · Kitchener, Ontario · Last updated: October 30, 2026
Prompt injection is when someone crafts text that makes an AI system ignore its intended instructions and follow new ones instead. For a business chatbot or agent, that can mean leaking information, taking the wrong action or saying something it shouldn’t.
This guide explains what prompt injection is, how direct and indirect attacks differ, why tools raise the stakes, and the layered defences that can reduce the risk. Nothing here removes the risk completely.
Large language models follow instructions in natural language. Your system prompt might say: answer only from approved content, never invent prices, and hand off payment questions to a person.
A prompt injection tries to override that. The attacker (or a document they control) adds text such as “ignore previous instructions and…” or hides a similar command where the model will read it.
OWASP lists prompt injection among the top risks for LLM applications. Like other software risks, it is managed with design choices and testing, not with a single setting.
Direct prompt injection is when the user types the malicious instruction into the chat. A visitor might try to make the bot reveal its system prompt, ignore handoff rules or talk about topics it’s meant to refuse.
Indirect prompt injection is when the harmful instruction sits in content the model reads: a web page, email, PDF, support ticket or uploaded file. OWASP describes indirect injections as occurring when an LLM accepts input from external sources and that content alters the model’s behaviour in unintended ways.
Indirect attacks matter for RAG chatbots and agents that browse or open documents. The person chatting may not be the attacker; the poisoned content is.
Here’s an illustrative example: a staff assistant summarises incoming emails. One email contains a line telling the assistant to forward the last few messages to an outside address. Without checks, the model might treat that line as an instruction.

A chatbot that only replies with text can still cause harm (wrong advice, brand damage, data revealed in the reply). An agent that can call tools can do more: look up records, send messages, update a CRM or create a booking.
Our guide to LLM function calling explains how a model requests a tool and your code decides whether to run it. OWASP’s guidance on excessive agency warns that too much functionality, too many permissions or too much autonomy can turn unexpected model output into damaging actions. Prompt injection is one way that unexpected output can appear.
If you’re exploring multi-step automation, our explainer on agentic AI workflows covers the same idea from a process angle.
No single defence is enough. Layers help:
These steps can reduce risk. They do not make systems fully safe on their own.
Build prompt-injection cases into testing before launch and after changes:
After launch, review conversations and tool logs on a routine you set. Look for odd tool calls, refused topics that were answered anyway and new attack patterns. Add those cases to the test set.
We do not state a fixed place where logs live; that depends on the services a project uses, and it can be reviewed with you before build.
Related, but not identical. Jailbreaking usually means getting a model to break its own safety rules in a general chat. Prompt injection is broader: it includes steering a business app’s instructions, often through content the model reads, not only through the chat box.
No. RAG can reduce made-up answers by grounding replies in your content, but that same retrieved content can carry injected instructions. Treat retrieved text as untrusted for control decisions.
Stronger models and filters can help, but OWASP still treats prompt injection as a core risk. Design, permissions, confirmations and testing remain necessary.
Building a chatbot or agent that needs to stay within clear limits? We’re LaunchLen Web Solutions Inc.
Based in Kitchener, serving Waterloo Region and businesses across Ontario.
Our AI Solutions page explains how a RAG chatbot works in plain English, and the safeguards a build can include. Before any build, we can agree the scope, deliverables and reporting with you. Book a free consultation to get started.
Ready to take the first step towards unlocking opportunities, realizing goals, and embracing innovation? We're here and eager to connect.