10 / 16
AI System Design Cases
Worked interview designs: requirements, architecture, trade-offs, failure modes.
Run the round as a chain of decisions: clarify the goal and costliest failure, size it, sketch offline and online paths, deep-dive with an eval per choice, then guardrails, failure modes and trade-offs.
Connectors sync documents and ACLs into a hybrid index; at query time, filter by the user's permissions, retrieve and rerank, then answer only from cited chunks, or abstain.
An agent answers from help-center RAG and proposes actions through narrow typed tools; a gateway and policy engine authorize every call, risky actions wait for a human, and hard cases hand off with context.
Stateless chat servers build each turn's context under a token budget, route to a small or large model, stream tokens over SSE, and persist conversations in a sharded store behind per-user quotas.
Three products on one context engine: a small fill-in-the-middle model for sub-300 ms inline completion, a large model for chat over a repo index, and an agent that edits and runs tests in a sandbox.
Hybrid retrieval (BM25 + embeddings) fetches ~1,000 candidates, a learning-to-rank model reorders them with business signals, and LLM query understanding is precomputed for head queries — all within 200 ms p99.
The PDF text layer or OCR feeds an LLM that fills a strict per-type schema; deterministic rules and calibrated per-field confidence decide what auto-posts and what a reviewer sees, and every correction feeds back.
A tiered funnel: hash matching and cheap per-category classifiers settle ~97% of items in milliseconds, a policy-prompted LLM judges the borderline few percent, and humans handle the uncertain, the severe and appeals.
Retrieve relevant metrics, tables and verified queries; ask when ambiguous; generate a semantic-layer query or SQL; validate it deterministically; run it as the user; and show the result with its SQL and assumptions.
A fully streaming cascade (VAD and turn detection → streaming ASR → small, fast LLM with tools → streaming TTS) with barge-in and human transfer, targeting ~800 ms from end of speech to first audio.
A thin paved road: one mandatory LLM gateway (virtual keys, quotas, fallbacks, cost tags), opt-in shared services (prompt registry, evals, vector store, guardrails) and templates that make the right way the easy way.
Pin dataset and agent versions, run each task k times in fresh seeded sandboxes, grade end state with code before judges or humans, store every trajectory, and gate releases on paired diffs with confidence intervals.
Keep the classic funnel — two-tower ANN retrieval, a ranker, a diversity and rules re-rank — on the hot path; spend LLMs offline, once per item: enrichment, cold-start content embeddings, cached explanations.
Scrub PII, then a small model in batch extracts schema-bound aspect opinions per review; code counts them; a writer model phrases pros/cons from the counts only; a verifier traces every claim before publishing.
Gather ~1,000+ candidates, prune to ~500 with a light model, predict like, comment, share, hide and dwell with a multi-task model, combine them with tunable weights, then re-rank for diversity and integrity.
A sparse-embedding DNN, trained continuously on impression logs, predicts calibrated pCTR and pCVR; the auction ranks ads by bid × pCTR × pCVR (eCPM). Calibration is mandatory because predictions set prices, not just order.
Score every payment in under ~100 ms: streaming velocity and graph features feed hard rules and a calibrated GBDT; an expected-cost policy picks approve, step-up, review or decline, and chargebacks weeks later retrain the model.
An async job clarifies and plans, fans out sub-agents with search and fetch in clean contexts, writes one cited report from their compressed findings, and verifies every citation, under token, time and dollar budgets.
Rewrite the query, search, fetch and rerank passages from the top pages, then stream an answer citing a passage per claim; head queries hit a cache and the first token lands in ~1–2 s.
A gateway enforces per-tenant token quotas and tiers; a router sends each request to the replica holding its cached prefix and LoRA adapter; engine pools autoscale on queue depth and KV usage, from warm pools.
Cars run new models in shadow mode and upload clips when triggers fire; offline, big models auto-label the hard cases, training closes the loop, and scenario regressions plus simulation gate a staged OTA rollout.