productinterview.tools
MenuClose

AI System Design: Designing LLM Products End to End

Designing an AI system end to end.

Core3 lessons5 questions

What this module covers

  • The standard components of an LLM-based system, and how a request flows through them
  • The levers for latency and cost: model choice, routing, caching, streaming
  • Guardrails, fallbacks and human hand-off: designing for the model being wrong
AI system design

Why it matters, by role

  • AI Platform PMProduct Manager. Decides what a product should do, for whom, and why. Read the full explanation: system design rounds are common, and platform choices shape every customer's design.
  • AI Infrastructure PM: latency and cost trade-offs are the job.
  • Forward Deployed EngineerForward Deployed Engineer. An engineer embedded with customers who scopes, builds and ships AI solutions into production. Read the full explanation: you'll design real systems inside customers' constraints.
  • Applied AI PM: you need enough design fluency to make sound trade-offs with engineering.

Lessons

  1. The shape of an AI system
  2. Designing for latency and cost
  3. Designing for failure

The shape of an AI system

Most LLMLarge language model. A model trained to predict the next token of text, used to generate and reason over language. Read the full explanation products share the same skeleton. A request flows through:

  1. Input checks: validate, check permissions, screen for abuse or prompt injection.
  2. Context assembly: gather what the model needs: instructions, conversation history, retrieved documents, user data, tool results.
  3. Model call: often through a router that picks a model by task difficulty, cost or latency.
  4. Tools and loops if it's an agent: the model asks for actions, your code runs them.
  5. Output checks: format validation, safety classifiers, grounding checks.
  6. Response, usually streamed to the user.
  7. Logging and evals across every step.

In an interview, draw this skeleton first, then spend your time on the two or three parts that matter most for the specific product. That shows you know the whole system and can prioritise.

Designing for latency and cost

Lever Effect Trade-off
Smaller or faster model Big cuts in cost and latency Lower quality on hard cases
Routing Cheap model for easy requests, strong model for hard ones Needs a reliable way to tell them apart
Shorter context Fewer input tokens; faster, cheaper Risk of dropping something needed
Caching Reuse results or shared prompt prefixes Only helps with repeated content
Streaming Users see the first words sooner Total time unchanged; output checks get harder
Batching offline work Much cheaper for non-urgent jobs Not for interactive use

Always tie the choice to the product: a coding assistant needs fast first tokens; an overnight report generator needs low cost, not speed.

Designing for failure

Assume the model will sometimes be wrong, slow or unavailable, and design for it:

  • Guardrails: input and output checks that block known-bad cases (unsafe content, invalid formats, ungrounded claims).
  • Fallbacks: if the main model times out or errors, retry, switch to a backup model, or return a simpler non-AI result.
  • Confidence and hand-off: when the system is unsure, or the stakes are high, route to a person instead of guessing.
  • Limits on actions: caps on what an agent can do without approval.
  • Graceful degradation: the product still works, in a reduced form, when the AI part doesn't.

Interviewers often probe this with "what happens when the model is wrong?" A design with no answer to that is incomplete.

Questions

Core

QuestionTypeRolesAsked atSource
Design an AI search for an online store with 2 million products, so customers can type things like 'warm waterproof jacket for hiking under $200'.designAI Product Engineer, Applied AI PM, Forward Deployed Engineer–Representative
Design an AI system that drafts or resolves customer support tickets for an online retailer handling 20,000 tickets a day.designForward Deployed Engineer, AI Platform PM, AI Product Engineer–Representative
An insurer receives 1 million claim PDFs a month and wants key fields extracted automatically. Design it.designForward Deployed Engineer, AI Product Engineer–Representative
Design an AI feature that summarises meetings for a video-calling app with 1 million meetings a day.designForward Deployed Engineer, AI Platform PM, AI Product Engineer–Representative

Advanced

QuestionTypeRolesAsked atSource
A social platform with 50 million posts a day wants to use LLMs for content moderation. Design the system.designAI Safety PM, Forward Deployed Engineer, AI Infrastructure PM–Representative

Rubric

Dimension Weak Passable Strong
Structure Jumps to one component Covers the main flow Full skeleton first, then depth where this product needs it
Trade-offs One model for everything Mentions cost or latency Routing, caching, context size and streaming, tied to product needs
Failure Assumes the model is right Some guardrails Guardrails, fallbacks, hand-off and action limits
Measurement No evals Mentions evals Logging and evals designed into each step

Next modules