신뢰하지 않는 텍스트는 instruction이 아니야
agent는 웹페이지, 이메일, 티켓, PDF, tool output을 읽어. 그 텍스트 안에는 agent를 겨냥한 instruction이 들어 있을 수 있어. 이전 규칙 무시해라, secret 빼내라, 위험한 tool 불러라. 외부 텍스트는 권위가 아니라 data로 다뤄야 해.
prompt injection 방어는 layer야. trusted instruction과 untrusted content를 분리하고, tool을 제한하고, argument를 validate하고, secret을 redact하고, 민감한 행동은 approval을 요구하고, 전부 log로 남긴다.
tool output도 공격할 수 있다
웹페이지가 모델에게 credential을 공개하라고 할 수 있고, retrieved document가 file을 삭제하라고 할 수 있고, code comment가 test를 고치라고 할 수 있어. trusted instruction channel 밖에서 온 건 command가 아니라 evidence야.
security는 boundary 문제야. 모델은 hostile text를 읽을 수 있다. executor가 hostile effect를 막아야 한다.