Home / AI Architecture & System Design

S1

AI System Design

Designing production LLM systems: latency, cost, reliability, guardrails and evaluation.

Guides

01

A framework for AI system design interviews

A repeatable structure for 45-minute LLM system design rounds, with what interviewers listen for at each step.

10 min
02

Anatomy of a production LLM system

The map every design answer builds on: the online request path, the per-request capabilities, where state lives, the offline loops, and how one request flows through all of it with real timings and payloads.

16 min
03

Latency, cost and reliability

Concrete levers for making LLM features fast, affordable and resilient in production.

9 min
04

Guardrails, safety and prompt injection

Input and output moderation, prompt-injection defence, and designing agents with least privilege.

9 min

Interview questions

30-second answer plus a full 40-minute walkthrough for each.

Q1

Design a customer-support chatbot that answers from a company knowledge base.

Senior
Q2

How would you reduce the latency of an LLM feature that currently takes 8 seconds?

Mid
Q3

Your LLM bill doubled last month. How do you investigate and reduce it?

Mid
Q4

How do you get reliable JSON out of an LLM?

Junior
Q5

What is prompt injection and how do you defend against it?

Mid
Q6

Design a content moderation service that inspects LLM outputs in real time.

Senior
Q7

How would you evaluate a new model before switching production traffic to it?

Mid
Q8

When should you NOT use an LLM?

Junior
Q9

Explain semantic caching and its risks.

Mid
Q10

How would you design a model router?

Senior
Q11

What would you log for an LLM request, and what would you avoid logging?

Mid
Q12

What is the 'lethal trifecta' for AI agents?

Senior
Q13

Design an LLM inference service that serves open-weight models on your own GPUs to internal teams.

Staff
Q14

Design a multi-tenant platform where customers fine-tune and serve their own LoRA models.

Staff
Q15

Design a ChatGPT-style conversational assistant for 10 million daily users.

Senior
Q16

Design an inline code-completion assistant like GitHub Copilot.

Senior
Q17

Design a real-time answer engine like Perplexity that answers questions from the live web with citations.

Senior
Q18

Design long-term memory for a chat assistant, so it remembers users across conversations.

Senior
Q19

Design an autonomous coding agent that takes an issue and opens a pull request.

Staff
Q20

Design a real-time voice agent that handles customer-support phone calls.

Senior