AppliedAIPrep logoAppliedAI/Prep

system design

Applied AI interview questions tagged system design, across every topic.

103 questions · 12 unlocked for you

Concepts behind "system design"

The curriculum that explains the ideas these questions test.

Foundational
⚙️ System Design for AI in Production
Rate Limiting, Retries, and BackoffLLM systems depend on rate-limited, sometimes-failing providers, so resilient design is essential. Rate limiting (token bucket) protects your service and enforces per-tenant quotas; retries with exponential backoff and jitter handle transient failures without hammering a struggling dependency; circuit breakers stop sending requests to a failing service to let it recover. Applied-AI interviews probe it because LLM calls are slow, expensive, and flaky, and naive retry logic turns a blip into an outage.
Foundational
⚙️ System Design for AI in Production
Idempotency and Exactly-Once EffectsIn a distributed system, calls fail and get retried, so the same request can arrive more than once. Idempotency means processing a request twice has the same effect as processing it once, achieved with idempotency keys and deduplication. It is the foundation of safe retries: without it, a retried payment charges twice or a retried pipeline double-counts. Applied-AI interviews probe it because LLM/data pipelines are full of flaky, retried steps, and 'exactly-once' is really 'at-least-once delivery plus idempotent processing'.
Foundational
⚙️ System Design for AI in Production
LLM Cost OptimizationLLM systems get expensive fast, and the cost model is mostly tokens and number of model calls. The levers, in rough order of impact: route easy queries to cheaper/smaller models, cache repeated and similar requests, trim context (fewer, better chunks), use cheaper retrieval/reranking, and for agents cut unnecessary steps. The discipline is measuring cost per request and attacking the dominant contributor. Applied-AI interviews probe it because cost is a primary production constraint and most teams overspend by defaulting to the biggest model on everything.
Foundational
⚙️ System Design for AI in Production
Load BalancingA load balancer spreads requests across many backend instances so no single server is overwhelmed, and removes failed instances from rotation. L4 balancers route by IP and port (fast, protocol-agnostic); L7 balancers read the request (path, headers, cookies) and route by content. Algorithms range from round-robin to least-connections to consistent-hash for sticky routing. Health checks are what turn a load balancer from a sprayer into a fault-tolerance mechanism. Applied-AI interviews probe it because inference fleets have wildly uneven request costs, so the algorithm choice actually matters.
Foundational
⚙️ System Design for AI in Production
Caching StrategiesA cache trades freshness for speed by keeping a copy of hot data closer to the request. The strategy is the write/read pattern: cache-aside (app fills the cache on a miss), write-through (writes go through the cache to the store), write-back (writes hit the cache and flush later). Eviction (LRU, LFU) and TTL decide what to keep, and cache stampede protection stops a popular expired key from hammering the backing store. CDNs are caches at the network edge. Applied-AI interviews probe it because LLM responses, embeddings, and retrieval results are expensive enough that caching is a first-class design decision.
Core
⚙️ System Design for AI in ProductionSign in
Fault Tolerance and Graceful DegradationAI systems depend on flaky, slow dependencies (model providers, vector stores, tools), so they must degrade gracefully rather than fail hard. Circuit breakers stop calling a failing dependency so it can recover; fallbacks return a cached, simpler, or safe response when the primary path fails; timeouts and bulkheads contain failures. The goal is that one component's failure becomes a degraded experience, not an outage. Applied-AI interviews probe it because LLM dependencies fail often and naive designs turn a provider blip into a total outage.