Prompt injection — это состязательная техника, которая манипулирует языковой моделью путем размещения вредоносных или непредусмотренных инструкций во входе пользователя, документах, веб-страницах или другом контенте, который модель обрабатывает. Она может заставить модель игнорировать предыдущие инструкции, раскрывать ограниченную информацию, изменять выходные данные или запускать несанкционированные действия.
Prompt injection manipulates an LLM's behaviour (for example to alter response style, retrieve hidden or restricted data, or disrupt interactions) by embedding specific instructions within a prompt. This approach exploits the model's tendency to follow instructions within the prompt sequence, even if instructions are unintended or malicious.
Distinguish between Prompt Injection (hijacking model behavior via malicious input) and Jailbreaking (bypassing safety guardrails to produce restricted content). Both are LLM security threats but differ in mechanism and goal.
A side-by-side comparison of Prompt Injection and Data Poisoning. Understand how runtime instruction manipulation differs from attacks on training data or the training process.