Skip to main content

Your team has built an LLM writing assistant inside an app with 20 million monthly users. It works well in internal tests. Plan how you would roll it out safely to all users.

System design · Pro 3

Short answer

Pass offline evaluation and red-team tests first. Put the feature behind a flag with a kill switch, then go in stages: staff, 1 percent, 10 percent, everyone, with clear metrics and stop conditions at each step. Plan capacity, rate limits, fallbacks and a cost cap, monitor quality, safety, latency and cost, and keep rollback fast.

Deeper answer

Before any user: an evaluation set from realistic inputs, red-team tests for harmful output and prompt injection, a load test, and a cost estimate. If 5 percent of 20 million users make four requests a day, that is 4 million requests, so check provider rate limits and budget early.

Rollout: a feature flag controlled from the server, with a kill switch that does not need an app release. Stages go from employees to 1 percent, 10 percent, 50 percent and all users. Use an A/B comparison for product metrics such as retention and task completion. Define stop conditions in advance: error rate, p95 latency, rate of flagged outputs, complaint rate and cost per user. Pin model and prompt versions so behaviour does not change during the test.

Operations: per-user rate limits, queues or graceful degradation at peak, timeouts, a fallback model or a clear "try again later" state. Monitor with tracing, sampled quality scoring and user feedback buttons. Trade-off: a slow rollout delays value but limits harm. What breaks first is usually rate limits and tail latency, then cost.

What a strong answer covers

Answer it out loud in the mock interview about 3 min

Follow-ups to expect

Common mistakes

Learn it

Deploy and monitor an LLM app

Practice System design questions

More on this topic

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.