SevyDevy

Design an AI security detection pipeline

PremiumSecurity systemHard

  • Prompt injection
  • LLM agent triage
  • Least privilege tools

Quick answer

This security system interview question asks you to design an AI security detection pipeline. Aim for a design that protects users and data without blocking legitimate use, then explain the threats, controls, detection and trade-offs. Interviewers want to see how you model threats and layer defences.

The problem

Design an AI security detection pipeline: a stream of 1 TB of security events a day feeds detection services, and an AI agent investigates their alerts, gathers context and drafts a verdict for analysts. The hard parts are the volume, attackers who can write text into the logs the agent reads, and keeping the agent's powers small.

Sources are endpoint agents, identity provider sign-ins, cloud audit logs, and DNS and proxy logs. Detection services (rules and anomaly models) turn events into alerts. The agent uses a large language model with tools: search events, look up a user or host, check threat intelligence, write case notes and propose a response.

What must an AI security detection pipeline do?

  • Detect in the stream: Run detection services over every event and raise alerts within 2 minutes of event time.
  • Agent triage: For each incident, the agent gathers context with tools and writes a summary with evidence links and a verdict (malicious, benign or needs review) with a confidence.
4 more requirementsUnlock to see all

How well must it do it?

  • No silent misses: A critical or high incident reaches an analyst within 5 minutes even if the agent is down, slow or wrong.
  • Injection safety: Text inside events can never make the agent take an action, skip a step or change its verdict rules.
3 more requirementsUnlock to see all

What scale should you design for?

Use these numbers in your estimates.

The scale numbers unlock with this questionUnlock

Key concepts

  • Prompt injection
  • LLM agent triage
  • Least privilege tools
  • Alert grouping
  • Human approval
  • PII masking

How you’ll practise

6 short steps · save and come back any time
  1. Requirements and assets
  2. Threat model
  3. Identity and access
  4. Data protection
  5. Detection and response
  6. Wrap-up

Lala, personalized to you, gives a hint when you ask and reviews your design when you are ready.

What do interviewers look for?

In any security system design round.

  • Starts with a clear threat model
  • Layers defences instead of relying on one control
  • Covers authentication, authorisation and secrets
  • Plans detection, alerting and response
  • Protects data in transit and at rest
  • Balances security against usability and cost

Questions people ask about this interview question

Which design type is this question?
It is a security system question. You design an AI security detection pipeline and explain your choices the way you would in an interview.
Is this question asked at entry level?
It is marked Hard. It suits engineers preparing for senior interviews, where you are expected to drive the discussion and go deep on trade-offs.
What should I cover first?
Start with what must be protected, from whom and what a breach would cost. Agree on scope with the interviewer before you design anything.
Can I practise it for free?
It is a premium question. Sign up and unlock it once for 10 credits; it then stays unlocked. When you finish, Lala, your personalized AI mentor, can review your design for 30 credits.

Related questions

Updated · Written by the SevyDevy team

Premium questionSign up free, then unlock it