Treat retrieved documents, web pages and tool results as untrusted data, never as instructions.
Layer defenses: input moderation, output moderation, a policy engine that validates tool calls, least-privilege tools, and a sandbox for code execution.
Never let the model decide permissions: the application checks the user's rights for every action.
Keep system instructions separate from user and retrieved content, flag instruction-like text in documents, and require confirmation for sensitive actions.
Red-team regularly with known injection prompts, and log safety decisions for audit.
Loading…