LearnQuestion bank

Threat-model an LLM application that reads customer emails and drafts replies.

AI leadershipTechnicalHard

Answer it yourself first, out loud or on paper, then compare.

Answer

Model answer, written in a candidate's voice

In short

  • Treat inbound email as untrusted input and map the full data flow.
  • Identify indirect prompt injection and exfiltration paths through drafts, links, images, and tools.
  • Minimise PII, set retention limits, and control access to mail, CRM, and internal systems.
  • Use least privilege, human approval, output filtering, redaction, and allowlisted destinations.
  • Pin and verify models and packages, keep provenance, and log decisions without storing secrets or excess PII.
  • Red-team with adversarial emails, monitor anomalies, and maintain an incident runbook.

In full

I would start by treating every inbound email as untrusted, attacker-controlled input and by mapping the full flow from mailbox ingestion through parsing, prompt construction, model inference, drafting, human approval, and any send or tool action. The main threats are indirect prompt injection in email bodies or attachments, data exfiltration through generated replies, links, images, or tool calls, and over-permissioned access to mail, CRM, or internal systems. I would require least-privilege access, sandboxed tools, allowlisted destinations, human approval before sending, output filtering and redaction, and short retention for raw emails and drafts with PII minimised and access-logged. I would also pin and verify models and packages, keep provenance, avoid sending secrets or raw customer data to third-party APIs, and log decisions without storing unnecessary PII. Finally I would red-team with adversarial emails and exfiltration attempts, monitor for anomalous drafts or tool use, and have an incident runbook for quarantine, rollback, notification, and review.

Corrected by an independent AI reviewer.

What a strong answer covers

  • Indirect prompt injection
  • Data-exfiltration paths
  • PII handling and retention
  • Access control and output filtering
  • Supply chain (models, packages) and logging
  • Red-teaming and incident response

Common mistakes

  • Treating it as purely an accuracy problem