Skip to content
Minute Campus.

How AI gets attackedLesson 021 min

How do you trick an AI with one sentence?

In 2022, researcher Riley Goodside showed that an instruction to translate text into French could be overridden by text beginning with ignore the above directions. The app's instruction and the user's text are joined into one block of words, and nothing marks one as an order and the other as data. Simon Willison named this prompt injection. It is still an open problem, so the defence is limiting the damage.

Remember

Never let text from a stranger decide what an AI system may do.

Sources

Checked at the source.

Every claim in the lesson was checked against these before it was recorded.

  1. 1Prompt injection attacks against GPT-3Simon Willison · 12 Sep 2022 · read 4 Oct 2026Credits Riley Goodside's demonstration and proposes the name prompt injection by analogy with SQL injection.

Transcript

The lesson, word for word.

Read it at your own pace, or search the page for a term.

How do you trick an AI with one sentence? In twenty twenty-two, a researcher named Riley Goodside showed how. Picture an app built on a language model, with one instruction: translate the following text into French. He gave it a sentence that began: ignore the above directions. The model did. It dropped the translation and wrote what his sentence asked for instead. Here is why it works. The app's instruction and the user's text are joined into one block of words. To the model, both are just text. Nothing marks one part as an order and the other as data. Simon Willison named this prompt injection. It is still an open problem. No filter catches every case. So the real defence is to limit the damage: never let text from a stranger decide what an AI system is allowed to do. Next time: what if the stranger's text is hidden inside an email?

Questions? Comment on the lesson on YouTube

New lessons every day.

Follow Minute Campus where you already scroll.