Guia de entrevista · Security

LLM security and prompt injection

do caderno de estudos · atualizado em 2 de outubro de 2026
Para quem vai encarar entrevista de Security2 min

Parece simples até o entrevistador perguntar "why?". Abaixo, uma estrutura de resposta que dá conta do follow-up.

A resposta, como você fala na entrevista

Prompt injection attempts to redirect model behavior through direct input or untrusted material such as retrieved pages, files, or tool output. A model can confuse data with instructions, so a prompt telling it to ignore attacks is not a reliable security boundary.
Limit retrieved data and tools to the caller's permissions. Validate tool names and arguments in application code, constrain destinations and resource use, and require appropriate approval for consequential operations. Test indirect injection and cross-user data access explicitly.
Improper output handling treats generated text as trusted code or data. Apply the same SQL parameterization, HTML safety, command restrictions, and business checks used for other untrusted input. Keep secrets out of prompts when the task does not need them, and restrict tracing access.

Source: OWASP prompt injection prevention.

Ler é o primeiro passo. No app, essa pergunta vira flashcard com repetição espaçada, e o módulo tem quiz e simulado para testar o que ficou.

Treinar essa pergunta no app