Skip to content
ML Academy

LLMs, GenAI, RAG, agents, evaluation · insight-0532

Separate instructions from pasted data with clear delimiters, but do not call it security

Evidence type
practitioner heuristic
Difficulty
easy
Roles
Applied AI, ML engineer
Industries
aviation

Summary: situation, action, reason, boundary

  1. Situation

    A prompt mixes instructions with a pasted customer email, and the model sometimes follows sentences inside the email as if they were instructions.

  2. Action

    Wrap each data block in labelled delimiters or tags, refer to them by name in the instructions, and handle hostile content with the controls taught on Days 47 and 53 (least-privilege tools, output validation, human approval).

  3. Reason

    Clear structure helps the model tell instructions from material, but text-level separation cannot guarantee that injected instructions are ignored.

  4. Boundary

    Any prompt that includes user-supplied or retrieved text.

Symptom or risk

Outputs drift with whatever the data says, and the team assumes delimiters will also stop deliberate attacks.

Exceptions

Prompts with no external content need little structure.

Trade-offs

Tags add tokens and must be kept consistent across prompt versions.

Pitfalls

Shipping a tool-using feature whose only defence is a delimiter.

Lessons and concepts

Claims and their sources