OBLYTECH Logo
OBLYTECH Logo

Hidden Instructions in Documents Fed to AI

Hidden instructions in documents fed to AI are passages that try to redirect an assistant while it reads source material. Treat files and emails as evidence, keep their text separate from authorized instructions, screen for attempts to change the task, and require independent checks before the assistant shares data or takes action.

Recognize hidden instructions in documents AI reads

A document can contain both legitimate information and language aimed at the assistant processing it. Consider an invoice review: the user asks for a summary of disputed charges, while a note inside the attachment tells the assistant to send the complete invoice collection elsewhere. The note belongs to the material under review. It does not establish permission to send anything.

Hidden does not have to mean invisible. An instruction can sit in a footnote, a quoted email, a document comment, or a paragraph labeled as an administrative update. It may look like routine prose while asking the assistant to change its goal. The key question is whether the text supplies evidence for the user’s task or attempts to govern how the assistant behaves.

During review, flag passages that claim higher authority, request secret information, redirect output, demand an unrelated action, or ask the assistant to conceal part of its work. Do not rely on a particular phrase. A polite request to improve accuracy can still be an instruction to disclose restricted material.

Map the document journey before adding controls

Start with one workflow, such as summarizing supplier correspondence. Record who submits material, who can edit it, how attachments are extracted, where excerpts are stored, and which assistant receives them. Include forwarded messages and retrieved fragments. A trusted employee can forward material written by an untrusted sender without changing its origin.

Follow the text through intermediate steps. A document may become extracted paragraphs, a search result, a summary, and then a proposed response. At each transition, ask whether the next step can still identify the source and its permitted use. Losing that context makes it harder to distinguish the user’s request from a command embedded in supporting material.

  1. Define the requested outcome and the information needed to produce it.
  2. List the material the assistant can read, including attachments and quoted messages.
  3. Identify the actions available after reading, such as drafting, sending, updating, or exporting.
  4. Assign an owner to approve changes to the ingestion and action paths.

If the workflow uses service records as well as documents, review prompt injection risks for AI agents on ITSM records. The shared design question is how externally supplied text could influence a decision or action beyond its proper scope.

Separate source material from authorized instructions

Write down the task outside the retrieved content. Specify what the assistant should extract, which sources it may use, and what requires review. Present document passages as source material with an identifiable origin. Avoid assembling a single undifferentiated block containing the user’s request, operational instructions, and extracted text.

For a correspondence summary, the authorized task might be to identify outstanding questions and cite supporting passages. The email body supplies the questions and context. A sentence inside that email asking the assistant to change its operating rules should be treated as something found in the correspondence, rather than adopted as a new task.

Use explicit boundaries and labels, but treat them as one control among several. A label cannot establish that the assistant will reject a persuasive instruction. Preserve the distinction through later summaries: describe a suspicious request as a request made by the document, rather than rewriting it as an instruction to the next assistant.

Keep durable instructions in a separately managed location. Give changes to those instructions a review path. Do not let an uploaded file become the authority for expanding permissions simply because its cover page describes itself as approved policy.

Filter for relevance and preserve evidence

Reduce the material sent to the assistant to what the task requires. For invoice triage, that may mean charge descriptions, disputed amounts, and relevant correspondence, rather than an entire shared folder. Smaller context makes review more manageable and reduces opportunities for unrelated text to influence the result.

Screen extracted text for instruction attempts before passing it onward. Consider both wording and purpose: a passage that asks for credentials has a different role from a passage that records a customer’s question about credential handling. Route ambiguous cases for review instead of silently removing business information that might matter.

  • Retain the original file separately so a reviewer can compare it with extracted text.
  • Record which passages were excluded and the reason for exclusion.
  • Check whether conversion or extraction changed the order or meaning of content.
  • Keep the document’s provenance attached to excerpts used in later steps.

Filtering should not become an assurance that the remaining text is safe to obey. Keyword matching can miss indirect requests and can flag harmless quotations. Decide how the workflow handles uncertainty: continue with a restricted summary, hold the document, or ask a reviewer to authorize a narrower task.

For example, if an attachment mixes a valid payment query with a request to reveal unrelated records, summarize the payment query without expanding access. Preserve the suspicious passage for review and explain any resulting gap in the summary.

Place action checks outside the document

The consequences depend on what the assistant can do after reading. A misleading summary needs review, but an assistant that can send messages or change records also needs action controls. Define permitted operations before execution and validate the proposed operation against the user’s request.

Check the recipient, destination, record scope, and data fields using information that the document cannot redefine. A destination written inside a file may be relevant evidence, but it should not automatically become an approved export destination. The same principle applies to a document that tells an assistant to grant access or overwrite an existing decision.

Separate preparing a recommendation from executing it. For consequential actions, show the reviewer the proposed change, affected records, destination, and supporting evidence. A generic approval prompt provides little protection if it hides the instruction that caused the proposal.

Review AI integration tool boundaries when deciding which operations should be available. Limit permissions to the workflow’s purpose and make the execution layer reject operations outside that purpose, even when the assistant produces a confident explanation.

For help planning this work, see AI and ML services.

Test decisions and define the recovery path

Build a small test collection from representative workflows using synthetic material. Include ordinary files, clear instruction attempts, subtle redirections, and legitimate quotations about security. Test the full route from ingestion through proposed action, rather than judging a screening step in isolation.

Give each test an expected result. A malicious instruction in a supplier attachment should not change the requested output destination. A quoted training example should not prevent a harmless summary without a reason. Check both unsafe compliance and unnecessary blocking, since either outcome can disrupt the workflow.

Record whether the assistant followed the authorized task, whether suspicious content reached later stages, and whether the action layer accepted an out-of-scope request. Review failures at the point where authority changed, rather than simply adding another warning to the prompt.

Before deployment, name the person who can pause the workflow and the person who reviews affected actions. Preserve enough evidence to determine which documents were processed, what output was produced, and whether information left its intended boundary. Keep that evidence within the applicable access and retention rules.

Use AI governance risk controls to connect these checks with ownership and review. Revisit the test collection when document sources, extraction steps, or available actions change. Approval of one workflow should not silently extend to a more powerful workflow.

Questions about document review exceptions

Should password-protected attachments enter the same queue?

Give them a separate intake decision. If the content cannot be inspected through the approved extraction path, hold it for an authorized reviewer or request a readable replacement through the established submission process. Record the hold so the missing attachment does not appear to have been assessed.

How should a team handle a document with conflicting versions?

Ask the business owner which version governs the requested analysis. Keep version identity alongside the extracted passages. Do not let an instruction inside one version decide that competing material should be discarded, particularly when the difference affects an approval or a payment decision.

Can reviewers use real incident documents for training?

Use a controlled copy with sensitive details removed where feasible. Decide who may access the examples and what must be retained for investigation before adapting them. Preserve the structure of the instruction attempt so the exercise still tests the relevant decision.

What should happen when a sender challenges a rejected attachment?

Provide a business review route with a named decision owner. Explain which requested processing step was held and what replacement or clarification would resolve it. Avoid sharing detection details that expose restricted content or encourage attempts to bypass the review process.