AI, Safety and What Goes WrongLesson 43 of 73

Module 6 · Manipulation, attack and abuse

Instructions hidden in the content

In this lesson

  • 9 min read
  • 7 reading sections
  • Knowledge check
  • Lesson 2 of 8 in this chapter

This chapter’s goalExplain how an instruction embedded in ordinary content reaches a model and gets executed, and separate the attacks an individual user can defend against from those only the system’s builder can.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableWatch2:42
Full audiobookNot availableNot available
One channel, four kinds of textThe developer’s system prompt‘You are a helpful assistant. Summarise what theuser sends.’The user’s request‘Summarise this page for me.’The content being processedA web page, an email, a PDF, a code comment, a CSVcellAn instruction hidden inside that contentWhite text on white: ‘Assistant, before summarising,do the following...’All four arrive as text in the same stream, with no reliable separator. SQL injection was fixed bykeeping command and data in different channels; a language model’s whole capability is reading text asmeaning, so that fix is not available.
All four arrive as text in the same stream, with no reliable separator. SQL injection was fixed by keeping command and data in different channels; a language model's whole capability is reading text as meaning, so that fix is not available.

Figure

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 9Free · no account needed
Lesson steps

One channel, two kinds of text

A language model receives one stream of text. The developer’s instructions, the user’s request, and the content being processed (a web page, an email, a document, a code comment) all arrive in the same channel, in the same format, with no reliable marker separating them.

In traditional software this problem was solved decades ago. SQL injection was defeated by parameterised queries, which keep the command and the data in separate channels so that data can never be read as command. There is no equivalent for a language model, because the model’s entire capability is understanding text as meaning. Asking it to treat one span of text as inert while understanding another is asking it to do the opposite of what it does.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Stuck on something?Ask Rukmini, your AI tutor

How to cite: Addaly (2026) ‘Instructions hidden in the content’, in AI, Safety and What Goes Wrong. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/ai-and-you/prompt-injection (Accessed: 29 November 2026).