Prompt injection is an attack that embeds instructions in material processed by an AI model to make it depart from its intended task. Unlike an ordinary prompt that asks the model to perform a task, it aims to make the model obey instructions in content it should not trust.
When the instructions are hidden in material the model retrieves or reads, such as a webpage, document or search result, the method is called indirect prompt injection.