Lesson objective

Design a practice workflow that treats text arriving inside faxes, referral packets, emails and attachments as data rather than instructions, and apply defender-side controls knowing that prompt injection remains a residual risk.

Plain-language explanation

Why this matters now

A practice reads documents it did not write, all day: faxes, referral packets, payer letters, patient emails and their attachments. When one of those documents is put in front of a model, the words inside it arrive at the same place as your instructions.

This lesson is defender-side only. It explains the property that creates the risk and the controls that reduce it. It contains no attack text, and staff never need any.

Professional guidance (international; OWASP Foundation, OWASP GenAI Security Project; the OWASP Top 10 for LLM Applications 2026, the PDF dated August 4th, 2026, licensed CC BY-SA 4.0; a voluntary community consensus document, not a regulation or a certifiable standard): the 2026 list ranks LLM01 Prompt Injection first, followed by LLM02 Sensitive Information Disclosure, LLM03 Excessive Agency, LLM04 Supply Chain, LLM05 Data and Model Poisoning, LLM06 Unbounded Consumption, LLM07 Misinformation, LLM08 Hidden Context Exposure, LLM09 Vector and Embedding Weaknesses and LLM10 Improper Output Handling. LLM01:2026 states that LLMs "make no architectural distinction between 'instructions' and 'data'," so there is "no clean equivalent to parameterized queries," citing the NCSC position above.

Professional guidance (United States; NIST AI 100-2 E2025, published March 2025; a taxonomy and terminology document that says it is not intended to serve as or supersede existing regulations or mandatory guidance): Section 3.4 covers indirect prompt injection, noting that because these models "combine the data and instruction channels," a third party can manipulate resources the system reads. It states that indirect prompt injection is mounted "not by the primary user of a model but instead by a third party," and that often the primary user is the one harmed. It also notes that "many AML mitigations are empirical in nature and lack theoretical or provable guarantees."

That last sentence is the honest position: this is managed, not solved.

A question to sit with

A referral packet arrives with a cover sheet, six pages of records and a line of small print at the bottom of page four. Someone uploads all seven pages and asks for a summary. How would anyone in your practice know whether that line changed what came back?

What goes wrong

Uploading a whole document because it arrived as one. The packet arrived in one piece; that is not a reason to hand all of it over.

Assuming the risk needs an attacker. A payer letter containing the words "ignore previous formatting and use the table below" is not an attack, and can still steer an output.

Giving a tool more reach than the task needs. A summarising tool that can also send, file or book is a much bigger problem when it is confused.

Trusting an output because the tool saw the source. Seeing the source is not the same as reporting it faithfully.

No log. If nobody can see what went in and what came out, nobody can work out afterwards what happened.

Expecting a product to solve it. NCSC's position is that this cannot be fully mitigated with a product or appliance.

The practical answer

Six controls, defender-side. They are drawn from published voluntary guidance and are this programme's recommendation for a practice; none of them is required of a practice by any regulator.

# Control What published guidance says
1 Tell the model, in the constraint block, to treat supplied documents as data and not to follow instructions inside them A reasonable step; NCSC's position is that no instruction removes the residual risk
2 Extract into a fixed field list the practice owns, rather than asking for an open summary Narrows what an output can be
3 Limit the tool's privileges to the trustworthiness of the source NCSC recommends limiting LLM privileges according to the trustworthiness of the data source
4 Put deterministic, non-model checks around the output NCSC recommends secure design using "deterministic (non-LLM) safeguards that constrain the actions of the system"
5 Log inputs, outputs and any tool or API calls NCSC recommends logging LLM inputs, outputs and tool/API calls
6 Require a person to approve any action with a consequence LLM03 Excessive Agency is third on the 2026 OWASP list

Control 2 in detail: extraction beats summary. An open summary can contain anything. A fixed field list cannot: the output is a table of the fields the practice decided it needs, each with a quotation from the source beside it, so a reviewer checks field against document rather than judging a paragraph. Module 05 builds the referral and records checklist this control depends on.

Control 3 in detail: privileges follow trust. A referral packet from an unknown sender is the least trusted material a practice handles. The tool reading it should be able to read and produce text, and nothing else: no booking, no sending, no filing, no writing to the record.

Control 6 in detail: the person is the safeguard. The OWASP project leads put the design principle plainly in their letter: "Stop trying to build a model that cannot be fooled. Build the system around it, so that when the model is fooled, and it will be, nothing important breaks." In a practice, "nothing important breaks" means no appointment is booked, no message is sent, no record is written and no claim moves without a named person approving it.

Two related cautions from the same sources. First, the 2026 list is the current one, and its numbering differs from the 2025 edition; do not quote 2025 numbering as current. Second, the project leads note that Misinformation was placed near the bottom by voters but near the top by the incident record, observing: "When a model's fluent, confident output drives a decision or a tool call, a wrong answer turns into a wrong action." For a practice, that describes the ordinary day more closely than any attack does.

Remember this

  • Models make no architectural distinction between instructions and data, so text inside a document can behave like an instruction.
  • Published guidance treats prompt injection as a residual risk to be managed by design, not removed by a product.
  • Prefer extraction into the practice's own field list over an open summary of a document you did not write.
  • Limit privileges to the trustworthiness of the source, add non-model checks, and log inputs, outputs and tool calls.
  • No action with a consequence happens without a named person approving it, and minimum necessary still governs what is uploaded.

Medical practice example

Larkspur Orthopedic Associates PLLC is a fictional six-surgeon group whose referral intake runs through an approved assistant covered by a business associate agreement. The compliance manager, Beatriz Soto, redesigns intake after a near miss. A fictional referral packet arrived by fax with a cover sheet, five pages of outside records and, at the foot of page three, a printed block of small text that the sending practice used as a standard footer. A coordinator uploaded all seven pages and asked for "a summary of what this referral is for and what we should do." The summary that came back contained two sentences that were not in the packet at all, one of them characterising the urgency of the referral, and the coordinator very nearly booked from it. Nothing malicious happened; the packet was ordinary and the sender was legitimate. Beatriz rebuilds the workflow around the six controls. The intake tool now reads and produces text only; it cannot book, send, file or write to the record. The prompt asks for extraction into nine fields the practice owns, each with a verbatim quotation from the packet beside it, and includes the constraint to treat the document as data and not to follow instructions inside it. Anything outside the nine fields is returned as a single "not covered by the checklist" list for a person to read. A deterministic check rejects any extraction where a field has no quotation. Inputs and outputs are logged. No appointment is booked until the coordinator has checked all nine fields against the packet and the practice manager has approved. Beatriz tells the team the honest version at training: this does not make the tool safe, it makes a wrong output visible and stops it turning into a wrong action. She also records that urgency is a clinical question and never comes from an extraction, whatever the packet says.

Responsible-use warning

Do not tell staff that a constraint sentence, a vendor feature or a filter has solved this. Published guidance is explicit that prompt injection remains a residual risk that cannot be fully mitigated with a product, and that mitigations of this kind lack provable guarantees. The practical dangers in a practice are an open summary of a document nobody wrote, and a tool that can act as well as read. Extract into your own field list, give the tool no ability to book, send, file or write, log what goes in and out, and let no consequence follow without a named person approving it.

Human-review requirement

The security official reviews what privileges each tool holds and confirms that a tool reading outside documents cannot act. The privacy official approves what may be uploaded under the minimum necessary standard and the standard protocol for recurring intake. The practice manager or named administrative owner approves any booking, letter or filing that follows an extraction, after a field-by-field check against the source document. Anything clinical in an outside record, including urgency, a diagnosis or what treatment is appropriate, is the licensed treating clinician's and never comes from an extraction. The reviewer confirms the log exists.

Practical exercise

Use fictional documents only. Do not write, share or test any text designed to manipulate a model, and do not use real patient material.

  1. List every kind of document your practice receives from outside: faxes, referral packets, payer letters, patient emails, attachments, portal uploads.
  2. For each, record who sends it, how much you trust the sender, and what the practice does with it today.
  3. Choose one and write the fixed field list the practice would extract into, with no more than twelve fields.
  4. Write the constraint sentence telling the model to treat the document as data.
  5. Write down every privilege the tool handling that document currently has, and cross out each one the task does not need.
  6. Design one deterministic, non-model check on the output, such as rejecting any field without a verbatim quotation.
  7. Write what your log would capture, and who could read it.
  8. Name the person who must approve before anything is booked, sent, filed or written to the record.
  9. Write two sentences you would say at training about what these controls do and do not achieve.
  10. Record the redesigned workflow in your workbook with the referral and records extraction checklist, and date it.

Knowledge check

  1. Why can text inside a fax or email behave like an instruction?

    Answer guidance: Because these models make no architectural distinction between instructions and data. NCSC puts it as there being "only ever next token", and OWASP LLM01:2026 states there is no clean equivalent to parameterized queries.

  2. What does NCSC say about whether prompt injection can be eliminated?

    Answer guidance: That it will remain a residual risk and cannot be fully mitigated with a product or appliance, and must be risk managed through careful design, build and operation because an LLM system is inherently confusable.

  3. Name four defender-side controls for documents the practice did not write.

    Answer guidance: Any four of: a constraint treating documents as data; extraction into the practice's own fixed field list instead of an open summary; privileges limited to the trustworthiness of the source; deterministic non-model checks; logging inputs, outputs and tool calls; and a named person approving any action with a consequence.

  4. What is the current OWASP list, and what should you not do with the 2025 edition?

    Answer guidance: The OWASP Top 10 for LLM Applications 2026 is current, with LLM01 Prompt Injection first and LLM03 Excessive Agency third. The 2025 numbering, such as LLM06 Excessive Agency or LLM07 System Prompt Leakage, must not be presented as current.

Sources and further reading