Browse the site
Call Get a quote

What Is Prompt Injection?

Prompt injection is an attack in which text crafted by an attacker changes the behaviour of an artificial intelligence system, so the model follows the attacker's instructions instead of the operator's. It comes in two forms: direct, where a user types hostile instructions, and indirect, where the payload hides in content the model reads, such as a web page, a PDF, an email or a customer record. Because the model reads instructions and data through the same channel, it cannot reliably tell them apart. The defences are architectural: least privilege, output validation, human approval for actions, and monitoring.

Key takeaways

  • Direct prompt injection is a hostile instruction typed by a user; indirect prompt injection is a payload hidden in content the model reads, and the indirect form is the one that scales.
  • A retrieval-augmented system is exposed because a document the model reads can carry instructions, and the model may follow the document instead of the operator.
  • The root cause is that instructions and data share one channel, so no filter reliably separates them and the fix has to be architectural rather than a blocklist.
  • An AI system with a tool connection turns a bad answer into a real action, so restrict the tools, scope the credentials, and require approval for anything that changes data.
  • Treat every prompt as untrusted input and log it, because the payloads are the evidence you need when an agent does something you did not ask for.

As of 24 October 2026: the service descriptions, prices and turnaround figures on this page are current.

What is prompt injection and how does it differ from jailbreaking?

Prompt injection is any attempt to make the model behave in a way the operator did not intend by inserting crafted text into the interaction. A jailbreak is a special case: a set of instructions designed to get a model to shed its safety behaviour. Injection is broader, because the model may be following the attacker's instruction faithfully and still causing harm. A chatbot that writes a bad paragraph is an embarrassment. A model with a tool connection, a payment authorisation or access to a customer database is a security problem, and the injection becomes the delivery mechanism for a data breach or a fraudulent action.

What is the difference between direct and indirect prompt injection?

Direct injection comes from the person typing into the interface: they ask the model to ignore its instructions, to reveal its system prompt, or to act outside the intended scope. It is bounded by how many users you have. Indirect injection is embedded in content the model pulls in, such as a web page, a PDF, a shared document, an email body, a support ticket, a resume or a database row. The model reads the payload as instructions and acts on them. This is the version that matters for a business, because a single poisoned document can affect every user who queries the same knowledge base, and because the payload arrives through channels the security team already trusts.

Why is filtering not a reliable fix?

Filtering fails for a structural reason: the model has one input channel and no reliable way to distinguish an instruction from data. Filters work by pattern and by refusal training, and attackers adapt. Prompt variations, encoding tricks and multi-step instructions all exist to slip past pattern matching, and every model release invalidates some of the tuning. The durable defence is to change the design rather than the blocklist. Give the model the smallest set of tools it needs, with credentials scoped to the task, separate retrieved content from the instructions in a way the model can be tested against, validate the output before it reaches a system of record, and require human approval for any irreversible action.

What should an Indian company do before deploying an AI agent?

Run a specific assessment before the agent touches production data. Ask for the model, the system prompt, the tool list, the credential scope and the data retention position, and read the vendor's terms on training on your inputs. Then test the agent against indirect injection: feed it a document with a hidden instruction, a hostile web page, a support ticket that asks it to disclose data, and a tool call that would move money. Write the results down, because CERT-In's 28 April 2022 directions already expect an Information Security Management System, access control and audit trails. Under the DPDP Act 2023, personal data fed into a model still has to be protected and deletable.

Prompt injection attack types and the architectural control that limits each one
Attack typeWhere the payload sitsImpactPrimary control
Direct injectionTyped by the user into the interfaceConfused or unsafe responseScoped tools, output validation, user verification
Indirect injection in documentsA PDF, ticket or shared file the model readsData leakage, manipulated answersSanitised corpus, treated content as untrusted
Indirect injection on the webA page the agent fetchesAttacker-controlled instructionsFetch controls, allowlists, output checks
Tool misuseA connected tool invoked with attacker parametersReal actions, fraud, data lossLeast privilege, credential scoping, human approval
Memory and poisoningPersistent content in a store the agent reusesRepeated, hidden influenceWrite controls on the store, retention limits, review

What are the frequently asked questions?

What is prompt injection in artificial intelligence systems?
Prompt injection is an attack in which text crafted by an attacker changes the behaviour of an artificial intelligence system, so the model follows the attacker's instructions instead of the operator's. It comes in two forms: direct, where a user types hostile instructions, and indirect, where the payload hides in content the model reads, such as a web page, a PDF, an email or a customer record. Because the model reads instructions and data through the same channel, it cannot reliably tell them apart. The defences are architectural: least privilege, output validation, human approval for actions, and monitoring.
Does our chatbot need to worry about this?
Yes if it reaches anything beyond text. A chatbot that only answers questions can still be used to extract internal documents or to produce misleading output. A chatbot with a search tool, a database connector, a mail function or a payment integration can cause a breach or a fraud, and that is where the assessment is worth doing first.
Is RAG especially vulnerable?
A retrieval-augmented system is exposed through its documents. If the corpus contains a poisoned page, the model may follow instructions found in it. Sanitise the corpus, treat retrieved content as untrusted, and keep the actions the model can take limited and reviewable.
How do we test an AI system for injection?
Build a fixed set of adversarial inputs: hostile direct prompts, documents with embedded instructions, hostile web pages and records, and tool calls that would be destructive. Run them on every model or prompt change, record the outcome, and treat a regression as a release blocker.
What Indian law is relevant to an AI agent that acts on our systems?
The CERT-In directions of 28 April 2022 require an Information Security Management System, access control and audit trails, and they clearly expect logs of system activity. The DPDP Act 2023 applies to personal data the agent processes, and the IT Act, 2000 applies to any unauthorised access to a computer or data that results from the agent acting. Contractual obligations to clients and regulators sit on top of that.

Get a straight answer on this

Send us the AI tools your team has started using, and we will return a fixed-price prompt injection assessment with a test set and a least-privilege design for each agent.

Send us the details See pricing

Last reviewed: 24 October 2026. Information on this page is general guidance, not legal advice. Prices are indicative bands for a typical scope and are confirmed in a written quote before any work begins.