Prompt Injection and Untrusted Content

Prompt Injection and Untrusted Content

Key jargon

Term Plain-language meaning
Prompt injection Content crafted to redirect model behavior away from the application's intended instructions.
Direct injection Malicious instructions supplied directly through a user-controlled prompt.
Indirect injection Malicious instructions embedded in content the system retrieves or processes.
Instruction-data separation Treating external content as untrusted data while enforcing authority outside the model context.

Key concepts

Concept map

flowchart LR
    A["Receive untrusted content"] --> B["Label and isolate as data"]
    B --> C["Model proposes bounded result"]
    C --> D["Policy blocks unauthorized effect"]

Prompt injection occurs when crafted input changes model behavior contrary to the application’s intended instruction hierarchy. Indirect injection arrives through documents, webpages, email, tool results, images, or retrieved content.

Because models process instructions and data through the same language channel, delimiter wording alone is not a complete defense.

Control strategy

Exercise

In a synthetic document, include text asking the assistant to ignore its task. Verify that a read-only summarizer reports document content without treating it as authority or calling tools.

Rule

The goal is not to prove the model can never be influenced; it is to ensure influenced output cannot cross a consequential trust boundary unchecked.