KatInterview

Build an AI Agent That Triages and Diagnoses Incoming Tickets

System DesignModel answer
HardModel answerSystem Designllm-agentsml-system-designincident-response

Last updated

Design an LLM-driven agent that triages tickets, gathers operational evidence, proposes a root cause and fix, and acts only within strict human-approval and safety boundaries.

Your organization receives a steady stream of support requests, on-call pages, and bug reports. You are asked to design an AI-driven agent that investigates each one with little manual effort.

For every incoming ticket, the system should:

  • Interpret the reporter's problem from the ticket text and any attachments.
  • Assign a category, an owning team, and a priority, and recognize duplicates.
  • Pull supporting evidence from internal sources: logs, metrics, traces, documentation, runbooks, deployment and config history, and earlier incidents.
  • Propose a most likely root cause, ideally with alternatives ranked by confidence.
  • Recommend a fix, an escalation route, or another next step.
  • Carry out low-risk remediation automatically when policy permits.
  • Require human sign-off for anything risky.

In your answer, cover:

  1. Requirements and assumptions, including volume, latency targets, and cost per ticket.
  2. The agent's reasoning loop and when it stops.
  3. Overall architecture and how tools are integrated.
  4. How evidence is retrieved and kept within the model's context limits.
  5. Safety controls, including action tiers and defenses against malicious ticket content.
  6. How you would evaluate quality offline and monitor the system in production.

State your assumptions explicitly and justify the trade-offs you make.

Hints

Hint 1

Separate the investigation (read-only, safe to automate broadly) from the action (side effects, needs gating). Different parts deserve different levels of autonomy.

Hint 2

A fixed investigation skeleton (scope, gather baseline evidence, form hypotheses, test the cheapest discriminating query, conclude) is usually more reliable than a free-form loop. Keep hypotheses and evidence in structured state instead of the raw chat history.

Hint 3

Route every tool call through a single gateway that enforces schemas, scoped credentials, rate limits, redaction, and audit logging. Treat ticket and log text as untrusted input that can never expand permissions.

Hint 4

For evaluation, build a replayable set of past tickets with human-verified root causes, and score triage accuracy, root-cause correctness, evidence quality, and cost. Then watch override rates and drift in production.