Why “instructions for AI” are not evidence—and how publishers and RAG teams can protect the boundary.

Rod Stockebrand
Co-founder, Brandleap.ai
Key Takeaways
Short on time? Here are the top things to know.
Article framework
What is indirect prompt injection?
Are hidden instructions a legitimate AEO technique?
Can a publisher make every AI crawler immune to prompt injection?
Is a stronger system prompt enough to protect a RAG application?
A product page should explain what a product does. A support article should describe a policy. Neither should be able to tell an assistant to ignore its user, promote a vendor regardless of the evidence, or send private information somewhere else. Yet that is the boundary indirect prompt injection tries to cross: content supplied as evidence gets interpreted as authority.
For AEO teams, this is not only a security topic for engineers. Marketing teams commission pages, publish research, embed widgets, accept guest contributions, and increasingly feed those materials into their own research assistants. They help determine what enters the retrieval pipeline. The goal should be to make claims easier to verify—not to smuggle instructions into the documents being verified.
In a direct attack, a person addresses the assistant with an adversarial request. In an indirect attack, the legitimate user may ask an ordinary question, such as “Compare these vendors’ return policies.” The problematic instructions arrive inside a page, PDF, email, shared document, or tool response that the system consults while answering. Microsoft’s security guidance describes this as untrusted data being misinterpreted as instructions.
Those instructions can be visible or concealed through presentation. A page can contain useful product information and malicious directives in the same document. File format, professional design, a familiar domain, or relevance to the query does not establish that every string inside it deserves authority. A site can also be compromised after a source was originally approved.
Evidence versus an attempted instruction
✗ Un-optimized
A source contains a directive telling an assistant to favor this vendor and disregard contradictory evidence.
✓ Triple-rich rewrite
A source states a testable product capability, explains the conditions, and links to the supporting documentation. The application decides how to use that evidence under the user’s actual request.
Content optimization makes relevant information discoverable, readable, and useful. A hidden directive to recommend a brand does none of those things. It asks the system to bypass the evaluation it was supposed to perform. Even if a one-off demonstration appears to work, it does not establish durable inclusion, better retrieval, or a legitimate ranking signal.
There are ordinary reasons for a technical article to discuss model instructions. A tutorial can quote a prompt or explain an attack defensively. The distinction is context and intent: describing instructions as subject matter is different from attempting to execute them through retrieved content. Do not delete legitimate documentation merely because a keyword scanner finds the word “system.”
Review the rendered page and the content extracted from it. Include user-generated sections, third-party embeds, author-supplied HTML, downloadable files, and translations. Look for unexpected model-addressed directives, invisible text that has no accessibility purpose, unexplained character sequences, and content inserted outside normal review. A visual screenshot alone cannot establish what a text extractor receives.
These steps reduce what your organization contributes to the problem. They do not dictate how another company’s assistant processes the page. A publisher cannot guarantee that every crawler, retriever, and model will honor the same boundaries, and a robots rule is not an instruction-hierarchy defense.
OWASP’s RAG security guidance treats the pipeline as a series of control points, not just a prompt template. Start with provenance: where did each document come from, who approved it, which version is being used, and what access rules apply? Carry those rules through chunking and retrieval. An approved public document and a restricted customer contract must not become indistinguishable vectors in a shared index.
A digest can detect a change relative to an approved baseline when the baseline is protected separately. It cannot prove that the approved document is benign. If an attacker can modify both content and its recorded digest, the comparison provides little assurance. Review baseline updates under an authorization process distinct from ordinary document edits.
User request and application policy
|
Authorized retrieval + source provenance
|
External passages marked as untrusted evidence
|
Model proposes an answer or action
|
Independent output and tool-policy checks
|
Validated answer / explicitly authorized actionAt the model boundary, keep retrieved passages distinct from trusted application instructions. Preserve source identifiers and constrain context size. Test delimiters and instruction placement with your actual models rather than assuming a particular prompt layout is universally safe. Pattern detectors can help triage suspicious content, but they will produce misses and false positives.
A model that only drafts a comparison has a different risk profile from one that can email files, modify accounts, execute code, or publish content. Microsoft distinguishes probabilistic defenses, which reduce the likelihood of failure, from deterministic restrictions that can block a particular class of action regardless of what the model says. Design the application so a bad answer does not automatically become an authorized action.
For example, keep a public-web research assistant separate from private customer records unless that access is genuinely required. Apply authorization again at tool execution, validate arguments, restrict destinations where appropriate, and require meaningful approval for consequential external actions. A source page must not be able to grant permissions merely by describing them in natural language.
Output handling matters too. Treat generated HTML, links, and image URLs as untrusted output. An unexpected remote resource can cause an outbound request when rendered. Apply rendering and egress controls appropriate to the application rather than assuming that text generation ends the security boundary.
In a controlled environment you own, build fixtures containing benign facts alongside clearly labeled adversarial instructions. Use synthetic records and harmless markers. Check whether the system keeps answering the legitimate question, respects document permissions, avoids unauthorized tool calls, and preserves usable citations. Include attacks in both relevant passages and irrelevant material so the test covers more than one retrieval pattern.
Record both security outcomes and task quality. A defense that rejects every document prevents useful work; a detector that passes a simple test has not proven immunity. Retest after changes to parsers, chunking, retrievers, models, permissions, and tools. Keep enough privacy-safe evidence to reproduce failures without turning the test logs into another sensitive dataset.
No hidden website directive, special file, or system-prompt sentence makes this problem disappear. Publishers control their content; application owners control authorization and execution. Both need evidence-based review.
The practical AEO principle is straightforward: make your page worth citing, not capable of issuing orders. Clear claims, visible conditions, attributable sources, secure publishing, and bounded retrieval workflows improve the quality of the information environment without confusing persuasion with permission.