01Why do transformers scale attention scores by 1/√d_k, and what breaks if you skip it?▼hard★ EssentialOpenAIAnthropicGoogle67 views2 repliesunlockedAlmost everyone can quote softmax(QKᵀ/√d_k)V. The interviewer wants the variance argument and the exact training failure the scale prevents. Here is the answer that separates memorization from understanding.Open full answer →
03Walk through RLHF, then explain DPO and why it has largely displaced PPO-based RLHF.▼hard★ EssentialOpenAIAnthropicCohere1 repliesunlockedAlignment is now table stakes even outside 'safety' roles. The interviewer wants the three-stage RLHF pipeline and a crisp account of why DPO dropped the reward model entirely. Here is the answer with the mechanism, not the buzzwords.Open full answer →
07Explain Mixture of Experts (MoE): how it works and the training and inference tradeoffs.▼hard★ EssentialGoogleMistralDeepSeek2 repliesunlockedMoE is why some frontier models have huge parameter counts but serve cheaply. The signal is the sparse-activation idea, the routing mechanism, and the operational cost (memory, load balancing) that the FLOP savings quietly hide.Open full answer →
08Why do transformers need positional encoding, and how do sinusoidal, RoPE, and ALiBi differ?▼hard★ EssentialGoogleMistralMeta1 repliesunlockedAttention is permutation-invariant, so without position information a transformer cannot tell word order. The signal is knowing why, and why the field moved from absolute sinusoidal encodings to relative ones like RoPE and ALiBi that extrapolate to longer contexts.Open full answer →
10How do you evaluate an LLM, and why are benchmarks and LLM-as-judge both unreliable?▼hard★ EssentialOpenAIAnthropicGoogle2 repliesunlockedEvaluation is the hardest, most underrated part of shipping LLMs. The signal is knowing why public benchmarks mislead, why LLM-as-judge is biased, and how to build a task-specific eval you actually trust.Open full answer →
13Explain LoRA, QLoRA, and parameter-efficient fine-tuning. Why train a fraction of the parameters?▼hard★ EssentialMistralCohereMicrosoft1 replies○ sign inPEFT is how everyone fine-tunes large models now. The signal is the low-rank insight behind LoRA, why it cuts memory so much, and what 4-bit QLoRA adds. Here is the answer that goes past 'it's efficient fine-tuning.'Open full answer →
17Explain PPO and GRPO for LLM alignment. Why did GRPO drop the value model?▼hardOpenAIAnthropicDeepSeek1 replies○ sign inRL alignment moved from PPO to leaner methods, and DeepSeek-R1 made GRPO famous. The signal is knowing what the value/critic model does in PPO and how GRPO replaces it. Here is the mechanism, not the acronyms.Open full answer →
23What is catastrophic forgetting, and how do you prevent it when fine-tuning or continually training an LLM?▼hardGoogleNVIDIACohere2 replies◆ premiumFine-tune a model on your domain and it can forget how to do everything else. The signal is explaining why shared weights cause it and naming the concrete mitigations that all reduce to one principle.Open full answer →
24Compare LoRA, prefix tuning, prompt tuning, and adapters. How do PEFT methods differ?▼hardGoogleMicrosoftNVIDIA1 replies◆ premiumPEFT is a family, not just LoRA, and interviewers probe whether you know how each one injects trainable parameters. The signal is where each method adds capacity and the latency and quality tradeoffs that follow.Open full answer →
28How and when do you use synthetic data (LLM-generated) for training or fine-tuning?▼hardAnthropicOpenAIMicrosoft1 replies◆ premiumSynthetic data is how teams get training data when real data is scarce, and it has sharp failure modes. The signal is naming when it helps, how to hold the quality line, and why training on model output across generations narrows the distribution.Open full answer →
31How would you set up an evaluation framework from scratch for a new LLM application?▼hardOpenAIAnthropicMicrosoft2 replies◆ premium'Eval is the new system design' for LLM apps, and starting from zero data is the real test. The signal is bootstrapping a golden set, picking task-specific metrics, and running evals continuously as a regression gate.Open full answer →
35How do efficient attention variants (sparse, sliding-window, linear) make long context feasible?▼hardGoogleMistralMeta2 replies◆ premiumFull attention is O(n^2), so long context needs cheaper attention. The signal is naming the families (sparse, sliding-window, linear), what each gives up, and why FlashAttention is not one of them.Open full answer →
37What is Constitutional AI / RLAIF, and how does it differ from RLHF?▼hardAnthropicOpenAIGoogle2 replies◆ premiumRLAIF and Constitutional AI swap human preference labels for AI-generated ones to scale alignment. The signal is naming exactly what they substitute for human feedback, and the consistency-versus-bias tradeoff that swap creates.Open full answer →
38How are reasoning models (o1/R1-style) trained, and what is test-time compute scaling?▼hardOpenAIDeepSeekGoogle2 replies◆ premiumReasoning models are the 2025-2026 frontier. The signal is knowing they are trained (largely via RL on verifiable rewards) to produce long internal reasoning, and that they scale on a second axis: spending more compute at inference.Open full answer →
40How do RoPE and ALiBi encode position, and why do they extrapolate better than learned positions?▼hardGoogleMetaMistral1 replies◆ premiumModern LLMs dropped learned absolute positions for RoPE and ALiBi to handle long context. The signal is knowing both encode RELATIVE position, and exactly how that enables length extrapolation past the trained window.Open full answer →
41What are Multi-Query (MQA) and Grouped-Query Attention (GQA), and why do they exist?▼hardGoogleMetaMistral2 replies◆ premiumMQA and GQA shrink the KV cache, the thing that bottlenecks LLM serving. The signal is knowing they share key/value heads across query heads to cut memory and bandwidth, with GQA as the quality-preserving middle ground. Here is the answer.Open full answer →
42Beyond DPO: what are SimPO, KTO, and ORPO, and why do these alignment variants exist?▼hardAnthropicOpenAICohere2 replies◆ premiumDPO simplified RLHF, and a family of variants now trade off what data and reference model they need. The signal is knowing what each variant removes or changes (reference model, paired data, separate SFT stage). Here is the answer.Open full answer →
46What is QLoRA, and how does it make fine-tuning large models feasible on one GPU?▼hardHugging FaceMicrosoftNVIDIA1 replies◆ premiumFine-tuning a 65B model used to mean a node of A100s. QLoRA collapses it onto one card with three specific tricks. The signal is knowing what gets quantized, what stays trainable, and why quality barely moves. Here is the answer.Open full answer →
49What is model merging (e.g. model soups, task arithmetic), and why is it useful?▼hardHugging FaceGoogleMistral1 replies◆ premiumCombine several fine-tunes into one model by doing arithmetic on their weights, with no retraining and no data. The signal is knowing why it works and which method to reach for when merges interfere.Open full answer →
51Is a model's chain-of-thought faithful to its actual reasoning, and why does it matter?▼hardAnthropicOpenAIGoogle2 replies◆ premiumChain-of-thought looks like the model showing its work, but it may not reflect the real computation. The signal is knowing CoT can be a post-hoc story, with evidence, and what that breaks for safety and oversight.Open full answer →
52How do you detect hallucinations in LLM output (as opposed to preventing them)?▼hardGoogleOpenAIAnthropic2 replies◆ premiumPreventing hallucinations is one job; catching the ones that slip through at runtime is another. The signal is the detection toolkit, why each signal is imperfect, and how you combine them into an action.Open full answer →
53What is Mixture-of-Depths, and how does it differ from Mixture-of-Experts?▼hardGoogleMetaAnthropic1 replies◆ premiumBoth are conditional compute, but one scales parameters and the other scales depth. The signal is knowing which axis each routes along and why that changes the FLOP story. Here is the sharp version.Open full answer →
54What is RAFT (Retrieval-Augmented Fine-Tuning), and how does it combine RAG and fine-tuning?▼hardMicrosoftCohereDatabricks1 replies◆ premiumRAG and fine-tuning get framed as either/or. RAFT trains the model to be good at RAG itself. The tell is what goes in the training set: relevant docs mixed with distractors. Here is the answer.Open full answer →
57How do you distill a large LLM into a smaller one, and what are the approaches?▼hardGoogleOpenAIMeta2 replies◆ premiumDistillation buys you most of a frontier model's quality at a fraction of the serving cost. The signal is naming the three LLM-specific variants and knowing which one works against a closed API. Here is the answer.Open full answer →
60Your LLM confidently answers even when it has no idea. How do you make it say 'I don't know'?▼hardOpenAIAnthropicGlean2 replies◆ premiumModels are trained to be helpful, which quietly trains them to never refuse. Getting honest abstention back is a system problem, not a prompt tweak. Here is the stack that actually moves the refuse-when-unsure rate.Open full answer →
62After RLHF, your model is safer but worse at hard tasks. How do you manage the alignment tax?▼hardAnthropicOpenAICohere2 replies◆ premiumAlignment that adds refusals and politeness often quietly degrades reasoning and coding. The alignment tax is real and measurable. Here is how to keep the safety gains without paying for them in capability.Open full answer →
63Your RLHF model games the reward model instead of being genuinely helpful. How do you stop reward hacking?▼hardAnthropicOpenAIGoogle DeepMind1 replies◆ premiumOptimize any proxy hard enough and the model finds the exploit, not the goal. Sycophancy, padding, and fake citations are reward hacking. Here is why it happens and the controls that actually hold.Open full answer →
64Few-shot prompting gives different answers on near-identical inputs. How do you stabilize it?▼hardOpenAIGoogleScale AI1 replies◆ premiumFew-shot accuracy can swing on example order alone. If your prompt is fragile to things that shouldn't matter, the fix is structural, not lucky example-hunting. Here is what actually reduces variance.Open full answer →
67How do you estimate the true cost of self-hosting an LLM versus paying per-token API?▼hardDatabricksAWSMicrosoft2 replies◆ premiumThe per-token sticker price hides the real decision. Self-hosting only wins past a volume break-even most teams misjudge. Here is the back-of-envelope a staff engineer does on the whiteboard.Open full answer →
69Chain-of-thought isn't improving accuracy on your task. What do you try next?▼hardOpenAIGoogle DeepMindAnthropic2 replies◆ premiumCoT is not a universal upgrade. On some tasks it does nothing or hurts, and the reason tells you what to try instead. Here is the escalation ladder past 'let's think step by step'.Open full answer →
70Your tokenizer shreds domain terms into meaningless subwords. How do you fix it?▼hardSarvam AICohereHugging Face1 replies◆ premiumWhen a drug name or a Hindi word becomes nine subword tokens, you pay in cost, context, and accuracy. Adding tokens is easy and adding them well is not. Here is the tradeoff.Open full answer →
72How do you evaluate generative output quality (text and images) when there's no single correct answer?▼hardOpenAIBlack Forest LabsGoogle DeepMind1 replies◆ premiumFor open-ended generation there's no ground-truth string to match, so accuracy is meaningless. The field uses a layered mix of automatic, model-based, and human metrics. Here is how to assemble a credible eval.Open full answer →
73How do you curate and filter a supervised fine-tuning (SFT) dataset, and why does a smaller clean set often win?▼hardAnthropicMetaHugging Face1 replies◆ premiumA few thousand carefully chosen examples can beat a million scraped ones. The signal is knowing which filters matter, how you measure example quality, and why diversity beats raw volume.Open full answer →
74What is reward-model overoptimization, and how do you detect and bound it during RLHF?▼hardOpenAIAnthropicGoogle DeepMind2 replies◆ premiumPush PPO hard enough and true quality peaks then falls while the reward keeps climbing. The signal is knowing the Gold-vs-proxy gap, the KL budget that bounds it, and how you actually measure when to stop.Open full answer →
76DPO trained cleanly but the model got worse. What are DPO's real failure modes?▼hardAnthropicCohereHugging Face1 replies◆ premiumDPO is simple and stable, but it can push down the probability of chosen responses, overfit the preference margin, and amplify length bias. The signal is naming these and the variants that fix each.Open full answer →
77What is RLVR (reinforcement learning with verifiable rewards), and why does it work for reasoning models?▼hardOpenAIGoogle DeepMindMeta1 replies◆ premiumReplace a learned reward model with a checker that returns right-or-wrong, and reward hacking mostly disappears. The signal is why verifiable rewards beat learned ones for math and code, and where they break.Open full answer →
78Compare distillation recipes for LLMs: hard-label SFT, on-policy logit matching, and rejection sampling.▼hardGoogleMetaHugging Face1 replies◆ premiumDistillation is not one method. The signal is knowing when to match logits versus train on generated text, why on-policy distillation beats off-policy, and how reasoning models are distilled.Open full answer →
79Your preference data has low annotator agreement and noisy labels. How do you measure and fix preference-data quality?▼hardScale AIAnthropicOpenAI1 replies◆ premiumA reward model is only as good as its labels, and human preference labels are noisy and inconsistent. The signal is measuring inter-annotator agreement and the concrete moves that lift label quality.Open full answer →
80How do you choose the data mixture for pretraining an LLM, and what does domain reweighting buy you?▼hardGoogle DeepMindMetaMistral1 replies◆ premiumThe ratio of web, code, books, and math in pretraining quietly decides downstream skills. The signal is knowing how mixtures are chosen, why upsampling helps, and how methods like DoReMi automate it.Open full answer →
81How do you do continued pretraining to adapt an LLM to a new domain without forgetting general ability?▼hardMetaDatabricksSnowflake1 replies◆ premiumContinued pretraining injects domain knowledge that fine-tuning cannot, but naively it wrecks general ability. The signal is the replay ratio, learning-rate rewarming, and how you measure forgetting.Open full answer →
83How do you detect and prevent benchmark contamination, and why are public LLM leaderboards often inflated?▼hardOpenAIGoogle DeepMindHugging Face1 replies◆ premiumIf a benchmark leaked into pretraining, the score measures memorization, not ability. The signal is the detection methods (n-gram overlap, canaries, perturbation tests) and why fresh held-out evals matter.Open full answer →
85How do you train a reward model from preference data, and what are the key design choices?▼hardOpenAIAnthropicCohere1 replies◆ premiumA reward model turns pairwise preferences into a scalar signal RLHF can optimize. The signal is the Bradley-Terry loss, the base-model and head choices, and how you validate it before trusting it.Open full answer →
86How does RLAIF use AI feedback to scale alignment, and what are its pitfalls versus human feedback?▼hardAnthropicGoogle DeepMindOpenAI1 replies◆ premiumRLAIF replaces expensive human labels with an LLM's preferences, which scales but inherits the labeler model's biases. The signal is how AI feedback is collected and where it quietly fails.Open full answer →
88What is an attention sink, and how does StreamingLLM use it for endless generation?▼hardMetaMITNVIDIA2 replies◆ premiumDrop the oldest tokens to bound the KV cache and the model collapses. Keep just the first few tokens and it generates indefinitely. The signal is understanding why those first tokens act as an attention sink.Open full answer →
90How do you compress the KV cache at inference, and what does each method trade off?▼hardNVIDIAGoogleMicrosoft1 replies◆ premiumAt long context the KV cache, not the weights, fills the GPU. The signal is naming the levers (quantization, token eviction, head sharing, low-rank) and what each one costs in quality.Open full answer →
91What is PagedAttention, and why did it transform LLM serving throughput?▼hardNVIDIAAWSMicrosoft1 replies◆ premiumMost GPU memory in naive LLM serving is wasted on KV-cache fragmentation. PagedAttention borrows virtual memory paging to reclaim it. The signal is explaining the fragmentation problem and how blocks fix it.Open full answer →
93GPTQ vs AWQ: how do these post-training quantization methods differ, and when do you pick each?▼hardNVIDIAHugging FaceAWS1 replies◆ premiumBoth squeeze an LLM to 4-bit weights, but they decide what to protect very differently. The signal is GPTQ's error-correcting solve versus AWQ's activation-aware scaling, and the calibration each needs.Open full answer →
95What is FP8, and how does it differ from INT8 for LLM training and inference?▼hardNVIDIAGoogle DeepMindMicrosoft2 replies◆ premiumFP8 is the format behind modern H100-class training and serving. The signal is knowing the two FP8 variants, why a floating format beats INT8 for dynamic range, and where scaling still matters.Open full answer →
98How does a vision-language model connect an image encoder to an LLM, and where does it fail?▼hardOpenAIGoogle DeepMindMeta2 replies◆ premiumVLMs like GPT-4V and LLaVA bolt a vision encoder onto a language model through a projector. The signal is the image-tokens-as-prefix design, the alignment training, and the resolution and hallucination failure modes.Open full answer →
99How do audio and speech LLMs work, and how do discrete audio tokens differ from text tokens?▼hardOpenAIGoogle DeepMindMeta1 replies◆ premiumSpeech LLMs either transcribe to text or model audio directly as discrete tokens. The signal is the semantic-vs-acoustic token split and why end-to-end audio models beat ASR-plus-LLM pipelines on latency and prosody.Open full answer →
101You set temperature to 0 and send the same prompt twice, and the outputs differ. Why, and when does it matter?▼hardNewAnthropicOpenAIDatabricks◆ premiumTemperature 0 does not mean deterministic, and the reason is in the GPU kernels, not the sampler. The signal is naming the batch-invariance problem and knowing which fixes are real versus placebo.Open full answer →
102You are adding image support to your assistant. What happens to your p99 latency and your bill?▼hardNewOpenAIAnthropicGoogle DeepMind◆ premiumEveryone budgets image tokens. Almost nobody budgets image latency. Images are a prefill problem, prompt caching stops paying for itself, and the cheapest answer is often not to call a VLM at all.Open full answer →
103How do you evaluate a multimodal document-QA system, and tell a perception failure from a reasoning one?▼hardNewOpenAIGoogle DeepMindScale AI◆ premiumA VLM that reads an invoice wrong and a VLM that reads it right and reasons wrong produce the same end-to-end score, and they need opposite fixes. Here is how to decompose a multimodal eval, build the set from real traffic, and probe for the hallucinations that accuracy never catches.Open full answer →
104Your AI feature works in English and falls apart in other languages. How do you actually ship multilingual support?▼hardNewCohereGoogleAirbnb◆ premiumEvery team ships English first, then finds that the retriever, the prompt, the latency budget and the cost model each degrade differently in the next five languages. The applied playbook looks nothing like the model-level answer, and the thing that sinks launches is the eval set nobody built.Open full answer →
01Design a production RAG system over 10M documents serving ~1,000 QPS at sub-second latency.▼hard★ EssentialOpenAIAnthropicGlean3 repliesunlockedThe modal Applied AI design round. Anyone can draw embed-retrieve-generate. The signal is in chunking, hybrid retrieval, the rerank/latency tradeoff, and how you prove it works. Here is the structure that scores.Open full answer →
02When do you build an agent instead of a single LLM call, and how do you keep a multi-step agent reliable?▼hard★ EssentialAnthropicOpenAISierra1 repliesunlockedAgents are over-applied. The strong answer resists the hype: most tasks want a single structured call, and agents earn their cost only under specific conditions. Here is when to reach for one and how to stop it from compounding errors.Open full answer →
04How do you evaluate a RAG system end to end when you have no single ground-truth answer?▼hard★ EssentialOpenAICohereGlean2 repliesunlockedMost RAG systems ship with no real eval, which is why most RAG systems quietly degrade. The signal is decomposing evaluation into retrieval and generation, and measuring faithfulness separately from relevance. Here is the framework that makes RAG improvements measurable.Open full answer →
05Design multi-tenancy and access control for a RAG system serving many enterprise customers.▼hardGleanMicrosoftDatabricks2 repliesunlockedEnterprise RAG fails on isolation, not retrieval quality. The signal is enforcing tenant and document-level permissions server-side, at retrieval time, so the model can never surface data a user cannot see. Here is the design that survives a security review.Open full answer →
06Context windows are now huge. When do you just stuff everything in context instead of building RAG?▼hardOpenAIAnthropicGoogle1 repliesunlockedA 2025-2026 question that catches people clinging to dogma in either direction. The signal is a cost, latency, accuracy, and scale tradeoff, plus knowing the 'lost in the middle' failure of long context. Here is the framework for choosing.Open full answer →
09When do you use a multi-agent system, and what orchestration patterns and pitfalls matter?▼hard★ EssentialAnthropicOpenAICognition1 repliesunlockedMulti-agent is the most over-applied pattern in AI right now. The signal is resisting it unless the task truly needs specialization or parallelism, knowing the supervisor and handoff patterns, and understanding why coordination amplifies failure.Open full answer →
10How do you manage memory and context for a long-running conversational agent?▼hard★ EssentialAnthropicOpenAISierra2 repliesunlockedConversations and agent tasks outgrow the context window, and naive 'stuff the whole history' fails on cost, latency, and lost-in-the-middle. The signal is a tiered memory design: recent buffer, summarized mid-term, retrieved long-term.Open full answer →
11What is query transformation in RAG (HyDE, decomposition, step-back), and when does each help?▼hardCohereGleanMicrosoft1 replies○ sign inRetrieval quality is capped by the query, and raw user queries are often bad for search. The signal is knowing the techniques that rewrite the query before retrieval and which failure each fixes.Open full answer →
12What is GraphRAG, and when does it beat traditional vector RAG?▼hardMicrosoftGleanDatabricks1 replies○ sign inVector RAG quietly fails on two query shapes: multi-hop chains and global 'what are the themes' questions. The signal is knowing exactly what the graph buys you and the construction bill it charges.Open full answer →
13What is Self-RAG / adaptive retrieval, and how does the model decide when to retrieve?▼hardCohereOpenAIGlean1 replies○ sign inAlways retrieving is wasteful and sometimes harmful; never retrieving hallucinates. Self-RAG makes retrieval a decision the model controls, then critiques what it got back. The signal is the retrieve-on-demand plus self-critique loop.Open full answer →
18Your RAG system retrieves contradictory information from different documents. How do you handle conflicts?▼hardGleanMicrosoftDatabricks2 replies○ sign inReal corpora contradict themselves (old vs new policy, different teams), and naive RAG silently picks one or blends them into a wrong answer. The signal is detecting conflict and resolving it by recency, authority, and transparency.Open full answer →
23How do you let an AI agent execute code safely (sandboxing)?▼hardOpenAIAnthropicCognition1 replies◆ premiumCode-execution agents are powerful and dangerous: arbitrary model-generated code runs on your infrastructure. The signal is real isolation (containers/VMs), resource limits, and network/filesystem restrictions, not 'trust the model.' Here is the answer.Open full answer →
26How do you evaluate an AI agent, beyond just checking the final answer?▼hardAnthropicOpenAISierra2 replies◆ premiumAgents fail in the middle, not just the end, so final-answer-only scoring hides the real problems and rewards lucky paths. The signal is evaluating the whole trajectory and localizing where it broke. Here is the answer.Open full answer →
30What is multimodal RAG, and how does it differ from text-only RAG?▼hardGoogleMicrosoftCohere1 replies◆ premiumReal documents carry images, charts, and tables, not just text, and text-only RAG silently drops them. The signal is knowing the two retrieval approaches and why the generator must change too. Here is the answer.Open full answer →
32How do you build a computer-use agent (one that controls a screen/browser), safely and reliably?▼hardAnthropicOpenAIGoogle1 replies◆ premiumA computer-use agent drives a real browser or desktop through screenshots and clicks. The signal is the perceive-decide-act loop plus the containment for an agent that can click, buy, or delete anything. Here is the answer.Open full answer →
34How do you implement guardrails for an autonomous agent to prevent harmful or irreversible actions?▼hardAnthropicOpenAISierra1 replies◆ premiumAn agent that takes actions is far riskier than one that just talks. The signal is action-level guardrails: least privilege, argument validation, human approval for irreversible actions, and a blast-radius mindset. Here is the answer.Open full answer →
37How do you handle multi-hop questions in RAG (questions needing several pieces of evidence)?▼hardGoogleMicrosoftCohere1 replies◆ premiumSingle-shot retrieval fails on questions that chain facts ('who directed the highest-grossing film of 2019?'). The signal is decomposing or iterating retrieval instead of retrieving once, and guarding against errors compounding across hops. Here is the answer.Open full answer →
39What is late interaction (ColBERT), and how does it sit between bi-encoders and cross-encoders?▼hardGoogleCohereMicrosoft2 replies◆ premiumLate interaction gets cross-encoder-like quality with near-bi-encoder scalability. The signal is the per-token embeddings plus MaxSim matching that buys you the middle ground, and knowing what it costs. Here is the answer.Open full answer →
45What is agentic RAG, and how does it differ from standard (single-shot) RAG?▼hard★ EssentialAnthropicMicrosoftCohere1 replies◆ premiumStandard RAG retrieves once and generates; agentic RAG turns retrieval into an iterative, reasoning-driven loop. The signal is the agent deciding whether, what, and when to retrieve, then re-retrieving until the evidence holds.Open full answer →
48What is late chunking, and how does it differ from contextual retrieval?▼hardCohereJinaMicrosoft1 replies◆ premiumLate chunking flips the usual order of operations to fix the lost-context problem without a single extra LLM call. The whole signal is which step happens first. Here is the answer.Open full answer →
49Your vector index won't fit in RAM at a billion vectors. How do you choose between HNSW, IVF-PQ, and disk-based ANN?▼hardGleanPineconeAWS1 replies◆ premiumAt a billion vectors the index choice is a memory budget problem before it's a recall problem. Flat search is out, HNSW may not fit, and PQ trades recall for RAM. Here is the decision a staff engineer makes on the whiteboard.Open full answer →
50Off-the-shelf embeddings retrieve poorly on your domain. How do you improve retrieval accuracy?▼hardCohereGleanHarvey2 replies◆ premiumA model that tops MTEB can still flop on your jargon-heavy corpus, and most teams jump straight to the expensive fix. There is a ladder, and the cheap rungs are the ones people skip. Here is the order to climb it.Open full answer →
52Your agent loops forever or never finishes the task. How do you bound and control agent execution?▼hardCognitionSierraOpenAI2 replies◆ premiumAn agent that retries the same failed action 40 times is a runaway bill and a stuck user. Termination is something you engineer into the harness, not something the model reliably decides. Here is the control layer.Open full answer →
53A tool your agent depends on returns errors or garbage. How do you make the agent robust to tool failures?▼hardSierraDecagonCognition1 replies◆ premiumReal tools time out, rate-limit, and return malformed JSON. An agent that assumes every call succeeds is a demo, not a product. Here is the error-handling layer that keeps it alive in production.Open full answer →
55Your retriever misses the relevant document entirely. How do you debug and fix low recall?▼hardGleanCohereDatabricks2 replies◆ premiumWhen the right answer isn't even in the top-50, the generator can't save you. Low recall has a short list of usual suspects. Here is the order to check them so you fix the cause, not a symptom.Open full answer →
57Your multi-agent system fails silently and you can't tell which step broke. How do you trace and debug it?▼hardCognitionSierraDecagon2 replies◆ premiumWhen a chain of LLM calls and tools produces a wrong final answer, 'the model was bad' is not a diagnosis. You need to see every step. Here is the tracing layer that turns a black box into something debuggable.Open full answer →
58Your RAG system aces your eval set but fails on real user queries. How do you close the gap?▼hardGleanPerplexityHarvey1 replies◆ premiumA 90% eval score and angry users at the same time means your eval set doesn't look like reality. The fix is to make evaluation track production, not the other way around. Here is how.Open full answer →
61Build a customer-support agent over a fake product/SQL database: tool-calling, retrieval, and a control loop.▼hardSierraDecagonOpenAI2 replies◆ premiumA live-coding round that separates people who have shipped agents from people who have read about them. The signal is a real plan-act-observe loop, tools that hit an actual SQL database, guardrails that stop the obvious failures, and a concrete evaluation plan, not a single prompt that pretends to be an agent.Open full answer →
63How do you operate a multi-vector (ColBERT-style) index in production without it blowing up storage?▼hardGoogleCohereMicrosoft2 replies◆ premiumLate interaction stores one vector per token, so a corpus that fit in a few GB as single vectors can balloon 100x. The signal is knowing the compression and indexing tricks (centroids, residuals, PLAID) that make multi-vector retrieval shippable.Open full answer →
65When does HyDE hurt retrieval, and what variants fix its failure modes?▼hardCoherePerplexityMicrosoft2 replies◆ premiumHyDE generates a fake answer to embed, which helps on vague queries but actively hurts on factual or out-of-domain ones. The signal is naming exactly when the hypothetical document misleads retrieval and which multi-draft and hybrid variants recover.Open full answer →
66How do you build RAG over a SQL database (text-to-SQL) when the answer lives in rows, not documents?▼hardSnowflakeDatabricksGoogle1 replies◆ premiumVector search over rows is the wrong tool when the user asks for a count or an aggregate. The signal is retrieving the right schema, generating validated SQL, and knowing when to query the database instead of embedding it.Open full answer →
67How do you build RAG over a large code repository so an agent can answer questions and edit code?▼hardCognitionGitHubAnthropic2 replies◆ premiumSplitting source files every 500 characters cuts functions in half and destroys retrieval. The signal is chunking on syntax, retrieving by symbol and dependency, and combining lexical exact-match with semantic search the way code search actually needs.Open full answer →
68How do you do incremental indexing for a RAG system with constant document churn, without a nightly full rebuild?▼hardGleanDatabricksMicrosoft1 replies◆ premiumRe-embedding 10M documents nightly is wasteful when only 0.5% changed. The signal is upserting by stable id, handling deletes and tombstones in an ANN index, and compacting before fragmentation tanks recall and latency.Open full answer →
69How do you verify that an answer's citations actually support its claims (grounding verification)?▼hardAnthropicPerplexityGlean1 replies◆ premiumAn LLM can cite a source that does not say what the answer claims. The signal is checking claim-by-claim entailment against the cited text, not just that a citation marker exists, and knowing what to do when grounding fails.Open full answer →
72How do you tune the fusion weights between lexical and vector retrieval, RRF k versus a learned alpha?▼hardCohereGleanAWS1 replies◆ premiumHybrid retrieval only beats either method if the fusion is tuned. The signal is knowing why you cannot just add BM25 and cosine scores, how RRF's k constant behaves, and when a learned weight beats rank fusion.Open full answer →
73When do you fine-tune a reranker on your own data, and how do you build the training set?▼hardCohereGleanMicrosoft1 replies◆ premiumAn off-the-shelf cross-encoder is general; your domain has jargon and relevance rules it never saw. The signal is knowing when fine-tuning pays off, how to mine hard negatives, and how to avoid training a reranker that just memorizes your retriever's mistakes.Open full answer →
74How do you migrate to a new embedding model on a live 50M-vector index without downtime or quality regressions?▼hardGleanDatabricksAWS2 replies◆ premiumA better embedding model is useless if old and new vectors share an index, because their spaces are incompatible. The signal is the dual-index re-embed-then-cutover plan, the cost math, and how to prove the new model is actually better before you flip.Open full answer →
75What are Tree-of-Thoughts and LATS, and when is search-based planning worth the cost?▼hardGoogle DeepMindAnthropicOpenAI1 replies◆ premiumLinear agents commit to one path and can't backtrack. Tree-of-Thoughts and LATS add search over reasoning paths. The signal is knowing what they buy, what they cost, and when a cheaper loop wins.Open full answer →
76Design the memory architecture for an agent that runs for weeks across thousands of interactions.▼hardAnthropicOpenAISierra2 replies◆ premiumA context window is not memory. Real agents need a storage architecture: working buffer, episodic recall, and consolidated facts. The signal is the read/write paths and how you keep memory from rotting.Open full answer →
78What protocols govern how agents hand off work, and what makes multi-agent coordination break?▼hardGoogleAnthropicMicrosoft1 replies◆ premiumMulti-agent systems coordinate through handoffs and shared state. The signal is knowing the orchestration topologies, what a clean handoff protocol carries, and why naive multi-agent often loses to one good agent.Open full answer →
79Beyond basic tools, what advanced MCP patterns matter: resources, prompts, sampling, and roots?▼hardAnthropicMicrosoftOpenAI1 replies◆ premiumMost people know MCP exposes tools. The deeper signal is the full primitive set (resources, prompts, sampling, roots) and the patterns: server composition, sampling for nested LLM calls, and scoping access safely.Open full answer →
80How do you evaluate an agent's trajectory and tool-use accuracy, not just its final answer?▼hardAnthropicOpenAIGoogle DeepMind1 replies◆ premiumFinal-answer accuracy hides how an agent got there. The signal is trajectory-level metrics: tool-selection and argument accuracy, step efficiency, and matching against reference paths, plus when exact-match is the wrong yardstick.Open full answer →
81Why do agents fail on long-horizon tasks, and how do you keep reliability up over many steps?▼hardAnthropicOpenAIGoogle DeepMind2 replies◆ premiumPer-step accuracy looks fine, yet a 50-step task fails. The signal is understanding compounding error and the techniques (decomposition, verification, checkpointing) that keep long-horizon agents from collapsing.Open full answer →
84An agent reads untrusted web content and tool output. How do you defend against prompt injection?▼hardAnthropicOpenAIGoogle1 replies◆ premiumAny content an agent reads can carry instructions that hijack it. The signal is knowing why filtering can't fully solve injection and which containment controls actually bound the damage when it succeeds.Open full answer →
86What makes browser and computer-use agents unreliable, and how do you make them robust?▼hardAnthropicOpenAIGoogle DeepMind2 replies◆ premiumAgents that drive a browser or screen fail in ways chat agents never do: stale DOM, dynamic pages, wrong clicks. The signal is the grounding and reliability techniques that turn a flaky demo into something usable.Open full answer →
87Your VLM answers single-image questions well but falls apart on an 80-page PDF. How do you fix it?▼hardNewGoogleMicrosoftDatabricks◆ premiumA VLM that reads one page perfectly can still fail an 80-page contract, and the reason is arithmetic before it is model quality. The signal is picking the right architecture and knowing what per-page processing silently loses. Here is the answer.Open full answer →
88Your vector search returns high similarity scores but irrelevant results. How do you debug it?▼hardNewGleanCohereElastic◆ premiumA 0.87 cosine score on a chunk that answers nothing is not a bug in your vector database. It is the embedding model telling you exactly what it was trained to tell you. Here is how to read that signal instead of thresholding it away.Open full answer →
89Code-generating agent vs tool-calling agent: what is the difference, and when do you pick each?▼hardNewAnthropicOpenAIHugging Face◆ premiumTwo ways to give an agent an action space: emit a JSON tool call per turn, or emit a program that calls the tools itself. One collapses N round-trips into one. The other is the one you can actually audit. Here is how to choose.Open full answer →
90Your single-turn evals pass but the agent falls apart by turn six. How do you catch that before launch?▼hardNewSierraDecagonOpenAI◆ premiumSingle-turn evals cannot catch failures that history causes, because they have no history. The offline answer is two suites, one deterministic and one simulated, and an honest account of why the simulated user will lie to you about how good your agent is.Open full answer →
91A multi-agent system beats your simple RAG pipeline by 15% on the benchmark. Do you ship it?▼hardNewAnthropicOpenAISierra◆ premiumThe most role-defining judgment call in Applied AI: a shiny benchmark number against the operational price of a system nobody can debug at 2am. Most candidates ship on the number and lose the loop there. Here is the answer that passes.Open full answer →
06Implement multi-head self-attention from scratch in NumPy, with a causal mask.▼hard★ EssentialNVIDIAOpenAIAnthropic2 repliesunlockedThe from-scratch implementation that frontier labs and NVIDIA actually ask. Writing it proves you understand shapes, the scale, the causal mask, and how heads split and recombine. Here is a correct, readable implementation and the follow-ups.Open full answer →
07Implement beam search for a sequence model given a next-token log-probability function.▼hardGoogleNVIDIAMeta1 repliesunlockedBeam search is the decoding algorithm everyone references and few can implement correctly. The signal is keeping k hypotheses by cumulative log-prob, summing logs (not multiplying probs), and handling completed sequences and length. Here is a correct implementation and the tradeoffs.Open full answer →
14How do you recognize and solve a dynamic-programming problem? Walk through one end to end.▼hard★ EssentialGoogleMetaAmazon2 replies○ sign inDP feels like pattern-matching magic until you have a method. The signal is a repeatable drill: spot overlapping subproblems and optimal substructure, define the state and recurrence, then memoize or tabulate. Here is that method on a worked example.Open full answer →
17Implement Byte Pair Encoding (BPE): train the merges and tokenize text.▼hardOpenAICohereGoogle1 replies○ sign inBPE is the tokenizer behind GPT-style models, and implementing it proves you understand how subword vocabularies are built, not just that they exist. The signal is the iterative merge of the most frequent adjacent pair.Open full answer →
20Implement a 2D convolution (the forward pass) from scratch.▼hardNVIDIAGoogleMeta2 replies○ sign inImplementing conv2d proves you understand what a CNN layer actually computes, not just that you can name it. The signal is correct output-shape math, clean stride/padding handling, and knowing the im2col trick frameworks really use.Open full answer →
22Implement attention with a KV cache for autoregressive generation.▼hardNVIDIAOpenAIAnthropic2 replies◆ premiumImplementing the KV cache proves you understand why decode is efficient: you append the new token's K/V and reuse the rest instead of recomputing. The signal is the append-and-attend-over-cache logic. Here is the implementation.Open full answer →
27Trapping Rain Water: how much water is trapped between bars?▼hardGoogleMetaAmazon1 replies◆ premiumA classic that rewards the two-pointer insight over brute force. The signal is realizing water at each position is bounded by the min of the max walls on each side, then computing it in one pass. Here is the answer.Open full answer →
33Edit distance (Levenshtein): the 2D dynamic programming pattern.▼hardGoogleMetaAmazon1 replies◆ premiumEdit distance is the canonical 2D string DP, behind spell-check, diff, and fuzzy matching. The signal is defining the subproblem and the insert/delete/replace recurrence. Here is the answer.Open full answer →
36Serialize and deserialize a binary tree.▼hard★ EssentialGoogleMetaAmazon2 replies◆ premiumEncoding a tree into a string and rebuilding it exactly hinges on one decision most candidates skip. Miss it and the structure becomes ambiguous. Here is the answer and the interview-grade reasoning.Open full answer →
48Longest Increasing Subsequence (LIS): the O(n log n) patience-sorting trick.▼hardGoogleMetaAmazon1 replies◆ premiumLIS has an obvious O(n²) DP and a clever O(n log n) solution that surprises people. The signal is the patience-sorting/binary-search approach maintaining 'tails'. Here is both.Open full answer →
49Minimum Window Substring: the variable-size sliding window.▼hardGoogleMetaAmazon1 replies◆ premiumMinimum Window Substring is the hard sliding-window problem that tests expand-and-contract with a character-count map. The signal is the grow-to-valid then shrink-to-minimal pattern, checked in O(1) per step.Open full answer →
57Median of Two Sorted Arrays in O(log(m+n)).▼hardGoogleMetaAmazon2 replies◆ premiumThis famously-hard problem wants better than the O(m+n) merge: an O(log) binary search on the partition. The signal is binary-searching the split point so the left halves stay below the right halves. Here is the answer.Open full answer →
61Implement multi-head attention from scratch.▼hardOpenAIGoogleNVIDIA2 replies◆ premiumSingle-head attention is common; multi-head adds the split-into-heads, attend-per-head, concatenate structure. The signal is the reshape into heads and a clear reason why multiple heads help. Here is the implementation.Open full answer →
62Sliding Window Maximum (monotonic deque).▼hardGoogleMetaAmazon2 replies◆ premiumFinding the max of every window of size k naively is O(n*k). The trick that drops it to O(n) is a monotonic deque of indices, and the reason it stays linear surprises most candidates.Open full answer →
70Deduplicate near-identical documents in a huge corpus. Implement MinHash for fast similarity.▼hardGoogleScale AIDatabricks2 replies◆ premiumComparing every pair of a million documents is a trillion comparisons. MinHash estimates Jaccard similarity from a tiny signature, and LSH turns dedup into a near-linear scan. Here is the implementation.Open full answer →
72Implement Rotary Position Embedding (RoPE) applied to query and key vectors.▼hardMetaMistralGoogle DeepMind2 replies◆ premiumRoPE is why modern LLMs extrapolate to longer contexts, and it's a rotation, not an addition. Coding it shows you actually understand how position enters attention. Here is the implementation.Open full answer →
78Sample from a large weighted distribution in O(1) per draw (the alias method). Where do you need it?▼hardMetaGooglePinterest1 replies◆ premiumNegative sampling in word2vec and recommendation draws millions of weighted samples; doing each in O(log n) is a bottleneck. The alias method makes each draw O(1) after an O(n) setup. Here it is.Open full answer →
79Implement consistent hashing, and explain where it matters for sharding embeddings or routing requests.▼hardPineconeAWSMeta2 replies◆ premiumWhen you shard a vector index or route requests across model replicas, naive 'hash mod N' reshuffles everything when N changes. Consistent hashing moves only a small fraction. Here is the implementation.Open full answer →
86Find the maximum path sum in a binary tree, where a path may start and end anywhere.▼hardMetaGoogleAmazon1 replies◆ premiumNegative subtrees, a path that bends through any node, and a return value that differs from the answer you track: this problem packs three traps into one DFS. Here is the clean O(n) solution and the reasoning that survives follow-ups.Open full answer →
91Given a sorted list of words in an alien language, derive the order of its characters.▼hardGoogleMetaAmazon1 replies◆ premiumThe words encode a partial order between characters. Turn each adjacent pair into a directed edge, then topologically sort. The traps are the prefix edge case and detecting contradictions. Here is the full solution with cycle handling.Open full answer →
92Find the length of the shortest transformation sequence from one word to another (Word Ladder).▼hardAmazonMetaGoogle2 replies◆ premiumWords are nodes, one-letter edits are edges, and the shortest ladder is a shortest path in an unweighted graph, so BFS. The make-or-break detail is generating neighbors in O(26 * L) without scanning the whole dictionary. Here is the pattern.Open full answer →
94Implement a basic calculator that evaluates a string with +, -, *, /, and parentheses.▼hardGoogleMetaAmazon2 replies◆ premiumEvaluating arithmetic with precedence and nested parentheses is a parsing problem, and a stack handles both cleanly. The traps are operator precedence, multi-digit numbers, and the sign of truncated division. Here is a single-pass solution.Open full answer →
95Build an in-memory key-value database, then extend it across stages: TTL, transactions, snapshots.▼hardAnthropicOpenAIGoogle1 replies◆ premiumThe canonical multi-round build screen: a simple key-value store that grows new requirements every stage (TTL, transactions, scans). The signal is not stage 1, it is whether your code absorbs stage 4 without a rewrite. Here is how to design for it.Open full answer →
96Implement a GPU credit allocation manager: issue credits, track usage, enforce limits and expiry.▼hardOpenAIAnthropicNVIDIA1 replies◆ premiumOpenAI's signature build screen: a credit ledger that grants GPU-hours, spends them, and expires unused grants in issue order. The trap is spending against the right grant first. Here is the FIFO-by-expiry design that survives every follow-up.Open full answer →
97Implement an in-memory key-value store with transactions: begin, commit, rollback, and nesting.▼hardAnthropicOpenAIGoogle2 replies◆ premiumA classic build screen: a key-value store where writes inside a transaction can be committed or thrown away, and transactions nest. The trap is mutating the base store directly. Here is the overlay-stack design that makes rollback O(1).Open full answer →
101Build a spreadsheet cell-dependency engine: evaluate formulas and detect circular references.▼hardSierraGoogleApple2 replies◆ premiumSierra's signature build screen: cells hold values or formulas referencing other cells, and editing one must recompute its dependents without infinite loops. The signal is the dependency graph plus cycle detection. Here is the topological-eval design.Open full answer →
104Segment tree: range queries and point updates for sum, min, or max in O(log n).▼hardGoogleMetaAmazon2 replies◆ premiumA segment tree answers any associative range query (sum, min, max, gcd) with point or range updates in O(log n). The signal is the recursive split into covered, disjoint, and partial nodes, plus lazy propagation for range updates. Here is the answer.Open full answer →
109KMP string matching: find a pattern in O(n+m) using the prefix-function failure links.▼hardGoogleAmazonMeta2 replies◆ premiumKMP matches a pattern in linear time by precomputing a failure function that skips redundant comparisons instead of backtracking the text. The signal is what the prefix function actually stores and why the text pointer never moves backward. Here is the answer.Open full answer →
113Matrix exponentiation: compute the nth term of a linear recurrence in O(log n).▼hardGoogleAmazonMicrosoft1 replies◆ premiumMatrix exponentiation evaluates linear recurrences like Fibonacci at index n in O(log n) by raising a transition matrix to the nth power via binary exponentiation. The signal is building the transition matrix and squaring it. Here is the answer.Open full answer →
118Implement a Gaussian Mixture Model with EM from scratch: E-step responsibilities, M-step updates.▼hardGoogleMetaNVIDIA2 replies◆ premiumA from-scratch test of the EM algorithm and soft clustering. The signal is the two alternating steps (responsibilities then weighted re-estimation), log-sum-exp for stability, and knowing how GMM generalizes k-means. Here is the implementation.Open full answer →
120Implement a vanilla RNN cell from scratch: forward over a sequence and backprop through time.▼hardGoogleMetaNVIDIA2 replies◆ premiumA from-scratch test of recurrent forward passes and backprop through time. The signal is the shared-weight recurrence, accumulating gradients across timesteps, and explaining the vanishing-gradient problem. Here is the implementation.Open full answer →
121Implement an LSTM cell from scratch: the four gates, the cell state, and why it beats a vanilla RNN.▼hardGoogleMetaNVIDIA1 replies◆ premiumA from-scratch test of gated recurrence. The signal is wiring the forget/input/output gates and candidate correctly, separating cell state from hidden state, and explaining why the additive cell path fixes vanishing gradients. Here is the implementation.Open full answer →
124Build a tiny autograd engine from scratch: a scalar Value with backprop over a computation graph.▼hardOpenAIGoogle DeepMindMeta2 replies◆ premiumA from-scratch test of how PyTorch actually works under the hood. The signal is building a computation graph during the forward pass, local derivatives per op, and a topological-order backward pass that accumulates gradients. Here is a minimal engine.Open full answer →
127Write a JSON parser from scratch. Now make it handle the partial JSON an LLM streams mid-generation.▼hardNewOpenAIAnthropicDatabricks◆ premiumThe classic recursive-descent exercise with an applied-AI twist: the JSON your model streams is truncated mid-token for the entire generation. The signal is a clean strict parser plus a small repair layer, not a second parser. Here is the implementation.Open full answer →
130Write three chunkers (fixed-size with overlap, recursive separator, semantic) and defend when each wins.▼hardNewGleanCohereDatabricks◆ premiumEveryone can recite the chunking tradeoff. Far fewer can write the splitter, keep the offsets a citation needs, and answer the question that kills the fixed splitter: what happens to a fact that straddles a boundary.Open full answer →
131Stream an LLM response to a browser. Handle cancellation, mid-stream failure, and a late guardrail.▼hardNewOpenAIAnthropicPerplexity◆ premiumEvery LLM product streams, and almost nobody can write the server. The interesting part is not the async generator, it is what happens when the user hits stop, the provider dies at token 90, or moderation flags text you have already put on the screen.Open full answer →
01Your churn model's AUC jumps from 0.71 to 0.93 after adding a 7-day rolling feature. What now?▼hardAmazonMetaGoogle2 repliesunlockedA sudden 22-point AUC jump is a gift and a warning. Junior candidates celebrate; strong ones get suspicious and know exactly which leakage checks to run before anything ships.Open full answer →
04Design an A/B test for a model change: power, sample size, significance, and the peeking problem.▼hard★ EssentialMetaGoogleNetflix2 repliesunlockedShipping a model is an experiment, and this question separates people who run A/B tests from people who p-hack them. The signal is pre-registering the metric, sizing the test, and resisting the urge to peek.Open full answer →
16Explain the EM algorithm and walk through it for a Gaussian Mixture Model.▼hardAmazonGoogleMicrosoft1 replies○ sign inEM is the canonical latent-variable algorithm, and a GMM is how it shows up in practice. The signal is the E-step/M-step alternation, why it is soft clustering where k-means is hard, and the honest caveat that it only finds a local optimum. Here is the answer.Open full answer →
21How does a Vision Transformer (ViT) work, and when does it beat a CNN?▼hardGoogleMetaNVIDIA1 replies◆ premiumPatches as tokens, global attention from layer one, and a weaker inductive bias than a CNN. The signal is naming the data regime where each architecture wins and why. Here is the answer interviewers score highest.Open full answer →
22How do diffusion models work, and what do the VAE and U-Net do in latent diffusion (Stable Diffusion)?▼hardGoogleNVIDIAMeta2 replies◆ premiumForward noising is fixed, reverse denoising is learned, and the training loss is a plain noise-prediction regression. The signal is why that beats a GAN's minimax and what the VAE and U-Net each do in latent space. Here is the answer.Open full answer →
23How do you measure impact when you can't run a clean A/B test (difference-in-differences, synthetic control, IV)?▼hardNetflixMetaAmazon2 replies◆ premiumSenior DS loops test causal reasoning past the randomized A/B test. The signal is naming the quasi-experimental method that fits and stating the single assumption it lives or dies on. Here is the answer for when randomization is off the table.Open full answer →
26What is self-supervised learning, and how do contrastive methods and masked prediction work?▼hardMetaGoogleOpenAI1 replies◆ premiumSelf-supervision is how modern models pretrain on unlabeled data, the engine behind LLMs and modern vision. The signal is the pretext-task idea and the real difference between contrastive and masked-prediction objectives.Open full answer →
27How do vision-language models (VLMs) work, and how does CLIP enable cross-modal understanding?▼hardGoogleMetaOpenAI2 replies◆ premiumMultimodal is now table stakes, and this checks whether you understand how images and text reach a shared model. The signal is CLIP's contrastive alignment and how modern VLMs feed image features into an LLM's token space.Open full answer →
30How do GANs work, why is training unstable, and why did diffusion overtake them?▼hardNVIDIAGoogleMeta1 replies◆ premiumGANs defined generative modeling for years, and interviewers want the minimax game, the failure modes (mode collapse, instability), and the precise reason diffusion displaced them for images while GANs still win on speed.Open full answer →
31What are autoencoders and VAEs, and what is the reparameterization trick?▼hardGoogleNVIDIAMeta2 replies◆ premiumAutoencoders and VAEs underpin representation learning and generative modeling, including the VAE inside latent diffusion. The signal is the gap between a plain autoencoder and a variational one, and why you cannot backprop through sampling without the reparameterization trick.Open full answer →
39What are multi-armed bandits, and when do you use them instead of A/B testing?▼hardMetaAmazonNetflix2 replies◆ premiumBandits optimize while they learn, shifting traffic toward winners mid-experiment instead of fixing it like an A/B test. The signal is the explore-exploit tradeoff, the three core algorithms, and knowing exactly when a bandit beats a clean A/B test.Open full answer →
54What is a Hidden Markov Model, and what does the Viterbi algorithm do?▼hardGoogleAmazonApple1 replies◆ premiumHMMs are the classic probabilistic sequence model behind speech and tagging, and Viterbi is how you decode them. The signal is the hidden-states plus transitions/emissions structure, and that Viterbi is dynamic programming for the single best state path, not a probability.Open full answer →
58How does gradient boosting (XGBoost/LightGBM) work, and why does it dominate tabular ML?▼hard★ EssentialAmazonGoogleMeta1 replies◆ premiumXGBoost and LightGBM win most tabular problems, and interviewers want more than 'it's boosting.' The signal is the fit-to-residuals mechanism plus the engineering (regularization, histograms, second-order) that makes it both fast and accurate.Open full answer →
60What is contrastive / metric learning, and how does it learn good embeddings?▼hardGoogleMetaOpenAI2 replies◆ premiumContrastive learning is how modern embeddings (CLIP, sentence encoders, SimCLR) are actually trained. The signal is the pull-positives-push-negatives objective, the InfoNCE loss, and why the number and hardness of negatives makes or breaks quality.Open full answer →
63How does Bayesian optimization tune hyperparameters, and when is it better than grid/random search?▼hardGoogleAmazonMicrosoft2 replies◆ premiumGrid and random search ignore past results. Bayesian optimization learns from them, and the signal is whether you can explain the surrogate plus acquisition loop and name the exact condition where the sample-efficiency is worth it. Here is the answer.Open full answer →
64What is a Gaussian Process, and when would you use one?▼hardGoogleAmazonMicrosoft1 replies◆ premiumGaussian Processes give predictions with principled uncertainty, which is why they power Bayesian optimization. The signal is the distribution-over-functions intuition, the kernel's role, and naming the O(n cubed) wall. Here is the answer.Open full answer →
65What are the common pitfalls that invalidate an A/B test?▼hardNetflixMetaAmazon2 replies◆ premiumRunning an A/B test is easy; running a valid one is hard. The signal is naming the traps that produce confidently wrong conclusions and the fix for each. Here is the checklist a senior experimenter carries.Open full answer →
66What are Graph Neural Networks (GNNs), and how does message passing work?▼hardGoogleMetaPinterest2 replies◆ premiumGNNs power recommendations, fraud, and molecule modeling by learning over graph structure. The signal is the message-passing mechanism, why k-hop matters, and why you keep them shallow. Here is the answer.Open full answer →
69What are label smoothing and mixup, and why do they help?▼hardGoogleMetaNVIDIA1 replies◆ premiumTwo cheap regularizers that fix overconfident classifiers. The signal is knowing that one softens the target and the other softens the input, and exactly why softer signals calibrate the model. Here is the answer.Open full answer →
70What are pointwise, pairwise, and listwise learning-to-rank approaches?▼hardGoogleMetaAmazon2 replies◆ premiumRanking is not regression: getting the absolute score wrong is fine, getting the order wrong is not. The signal is the pointwise/pairwise/listwise split and why pairwise (LambdaMART) is still the practical default. Here is the answer.Open full answer →
71What is the double descent phenomenon, and how does it complicate the bias-variance story?▼hardGoogleOpenAIMeta1 replies◆ premiumClassic bias-variance says bigger models eventually overfit, yet deep nets keep improving past the point where they memorize the data. The signal is explaining the second descent and why over-parameterized models generalize. Here is the answer.Open full answer →
72What is conformal prediction, and how does it give calibrated uncertainty?▼hardAmazonGoogleMicrosoft2 replies◆ premiumWrap any model and get prediction sets with a provable coverage rate, no distributional assumptions required. The signal is the calibration-set plus nonconformity-score mechanism and exactly what the guarantee does and does not promise. Here is the answer.Open full answer →
73What is survival analysis, and why can't you just use regression for time-to-event?▼hardAmazonGoogleMicrosoft1 replies◆ premiumTime-to-event problems (churn, failure, conversion timing) hide a twist that quietly biases plain regression. The signal is naming that twist and reaching for the right framing. Here is the answer.Open full answer →
74What is positive-unlabeled (PU) learning, and when do you need it?▼hardAmazonGoogleMeta1 replies◆ premiumMany real problems give you confirmed positives but never confirmed negatives, only unlabeled data. The shortcut everyone reaches for quietly biases the model. The signal is naming the regime and its fix. Here is the answer.Open full answer →
79Your A/B test shows the control and treatment groups differ before the treatment even applies. What's wrong?▼hardMetaMicrosoftNetflix1 replies◆ premiumA pre-existing gap between your groups means randomization or instrumentation is broken, and the whole experiment is suspect. Strong candidates name sample-ratio mismatch on sight. Here is the full diagnosis and the disciplined response.Open full answer →
80Your model is accurate on average but fails badly for one subgroup. How do you find and fix it?▼hardGoogleMetaApple1 replies◆ premiumA 92% aggregate accuracy can hide 60% on the segment that matters most. Average metrics are exactly where these failures hide. Here is how to surface them and the menu of fixes that actually map to the cause.Open full answer →
82Your training data was collected with selection bias. How do you detect it and correct for it?▼hardMetaAmazonGoogle1 replies◆ premiumIf labels only exist for the cases you already acted on, the model learns a distorted world: great offline, blind to everyone you never saw. Worse, its own decisions pick the next labels. Here is how to spot it and counter it.Open full answer →
86Your production model decayed. Is it data drift, concept drift, or a pipeline bug, and how do you tell them apart?▼hardDatabricksMetaAmazon2 replies◆ premium'The model got worse' has three very different causes and three different fixes. Retraining a model that's actually broken by a pipeline bug just bakes in garbage. Here is the triage order.Open full answer →
87You need a model but only have a few hundred labeled examples. How do you build one anyway?▼hardScale AIGoogleHugging Face2 replies◆ premiumSmall labeled sets are the normal starting condition, not an excuse. The strong answer is a ladder of techniques that squeeze signal from unlabeled data, pretrained models, and the labeling budget. Here it is.Open full answer →
88You suspect your training labels are noisy. How do you detect it and train a good model anyway?▼hardScale AIGoogleMeta1 replies◆ premiumMost real datasets have wrong labels, and they cap your accuracy invisibly. Cleaning all of it by hand doesn't scale. Here is how to find the bad labels and train robustly around them.Open full answer →
90Your generative image model produces low-diversity or garbled samples. How do you diagnose and fix it?▼hardBlack Forest LabsNVIDIAGoogle DeepMind1 replies◆ premiumGenerative training fails in distinctive ways: GANs collapse to a few outputs, diffusion samples come out noisy or blurry. The symptom tells you which knob to turn. Here is the diagnosis.Open full answer →
91You're training embeddings with contrastive/triplet loss. How do you choose pairs, the margin, and negatives?▼hardGoogleMetaCohere2 replies◆ premiumMetric learning lives or dies on the pairs you feed it. Random negatives teach almost nothing, and the margin and mining strategy decide whether the embeddings are any good. Here is how the choices interact.Open full answer →
92How does interleaving evaluate a ranking change, and why can it beat a standard A/B test?▼hardGoogleNetflixSpotify1 replies◆ premiumFor search and recommendation, A/B tests can be slow and noisy because they compare different users. Interleaving compares two rankers within the same user's results and detects winners with far less traffic. Here is how.Open full answer →
93How would you build an object detection system that detects and localizes objects in images?▼hardGoogleMetaAmazon2 replies◆ premiumBoxes and labels, not one tag per image. The signal is choosing two-stage vs one-stage by your latency and accuracy budget, knowing what NMS and anchors actually do, and reporting mAP correctly. Here is the answer interviewers score highest.Open full answer →
96Explain semantic vs instance segmentation and how Mask R-CNN works.▼hardGoogleMetaNVIDIA1 replies◆ premiumSemantic labels every pixel by class; instance separates each object. The signal is knowing that one cannot count overlapping objects, why Mask R-CNN adds a mask branch on RoIAlign, and what RoIAlign fixed. Here is the answer.Open full answer →
98Write down the SVM dual, and explain what the Lagrange multipliers and KKT conditions tell you.▼hardGoogleMicrosoftNVIDIA1 replies◆ premiumMost candidates can recite 'maximize the margin'. The dual is where you show you actually understand why only support vectors matter and where the kernel trick comes from. Here is the derivation an interviewer wants.Open full answer →
99Your GMM via EM keeps diverging to infinite likelihood or collapsing clusters. What is going on?▼hardGoogleMicrosoftNVIDIA2 replies◆ premiumEM on a Gaussian mixture has a famous failure mode: a Gaussian collapses onto one point and likelihood shoots to infinity. Knowing why, and the three standard fixes, separates people who used sklearn from people who understand it.Open full answer →
100When would you use a CRF instead of an HMM for sequence labeling, and why?▼hardGoogleMicrosoftAmazon2 replies◆ premiumBoth tag sequences, but one is generative and one is discriminative, and that difference decides whether you can throw in overlapping features. Here is the comparison that shows you know the modeling tradeoff, not just the acronyms.Open full answer →
102How does LightGBM's histogram binning and GOSS make gradient boosting fast, and what do they cost?▼hardMicrosoftAmazonGoogle1 replies◆ premiumXGBoost made boosting practical; LightGBM made it fast. The answer is histogram binning, gradient-based sampling, and leaf-wise growth, each with a real tradeoff. Here is what they do and where they bite.Open full answer →
103Explain MCMC and Metropolis-Hastings: why does the chain sample from the posterior?▼hardGoogleMicrosoftNVIDIA1 replies◆ premiumBayesian inference needs an intractable normalizing constant, and MCMC sidesteps it. The signal is explaining the acceptance ratio, detailed balance, and why you can skip the constant entirely. Here is the answer.Open full answer →
109Compare SMOTE, class reweighting, and focal loss for imbalanced learning. Which do you reach for?▼hardAmazonGoogleMicrosoft2 replies◆ premiumResampling, reweighting, and focal loss attack class imbalance from different angles, and each has a real downside. The signal is matching the method to the model and metric, not blindly oversampling. Here is the breakdown.Open full answer →
110Walk me through instrumental variables: what makes an instrument valid, and how do two-stage least squares and LATE work?▼hardUberNetflixMeta1 replies◆ premiumIV is the causal tool people name but can't defend. The signal is articulating the two conditions an instrument must satisfy, why one is testable and one is not, and what 2SLS actually estimates. Here is the answer.Open full answer →
111Explain propensity score methods: matching, weighting (IPW), and the overlap assumption. When do they fail?▼hardMetaAmazonUber2 replies◆ premiumPropensity scores promise to mimic an experiment from observational data. The signal is knowing what they can and cannot fix, the overlap trap, and why IPW blows up. Here is the answer that separates careful candidates.Open full answer →
112What is uplift modeling, how does it differ from a response model, and how do you evaluate it without ground-truth labels?▼hardUberNetflixAmazon1 replies◆ premiumA response model predicts who will convert; an uplift model predicts who converts because of the treatment. The signal is the four-quadrant intuition and how you evaluate uplift when you never observe an individual's lift. Here is the answer.Open full answer →
113What is CUPED, why does it shrink experiment variance, and how does it compare to stratification and regression adjustment?▼hardMicrosoftNetflixMeta1 replies◆ premiumCUPED can cut the sample size an A/B test needs by half without touching validity. The signal is explaining why subtracting a pre-experiment covariate reduces variance but never biases the estimate. Here is the answer.Open full answer →
114Why does peeking at an A/B test inflate false positives, and how do sequential and always-valid tests fix it?▼hardNetflixUberMicrosoft1 replies◆ premiumChecking an experiment every day and stopping when it hits significance can triple your false-positive rate. The signal is knowing why, and the family of methods that make continuous monitoring valid. Here is the answer.Open full answer →
115Your A/B test has interference between users (marketplace, social network). Why does it bias results and how do you fix it?▼hardUberMetaAirbnb1 replies◆ premiumStandard A/B math assumes one user's treatment doesn't affect another's outcome. In marketplaces and social networks that assumption breaks and your estimate is biased. The signal is naming SUTVA and the right randomization unit. Here is the answer.Open full answer →
116Explain the Kalman filter and state-space models. What are the predict and update steps actually doing?▼hardNVIDIAAppleUber1 replies◆ premiumThe Kalman filter is optimal Bayesian tracking under linear-Gaussian assumptions, and it is two steps repeated forever. The signal is explaining what the gain trades off and when the assumptions break. Here is the answer.Open full answer →
118How do you build anomaly detection for a streaming time series, and how do you handle seasonality and concept drift?▼hardNetflixUberMicrosoft2 replies◆ premiumThreshold alerts fire all weekend and miss the real outage Monday. The signal is decomposing seasonality first, choosing the right detector, and tuning for alert fatigue. Here is the answer that survives production.Open full answer →
119Compare fairness metrics (demographic parity, equalized odds, calibration). Why can't you satisfy all of them at once?▼hardGoogleMicrosoftMeta1 replies◆ premiumThere is no single fairness number, and a famous result proves you cannot satisfy the main three together. The signal is defining each metric precisely and explaining the impossibility, not picking one blindly. Here is the answer.Open full answer →
121Explain integrated gradients for attribution. Why use it over raw gradients, and how do you pick the baseline?▼hardGoogleGoogle DeepMindNVIDIA1 replies◆ premiumRaw gradient saliency maps are noisy and saturate. Integrated gradients fixes both with two axioms and a path integral, but the baseline choice quietly decides the answer. Here is what a careful candidate explains.Open full answer →
03Design a data pipeline that is safe to re-run: idempotent writes, late data, and exactly-once effects.▼hard★ EssentialDatabricksSnowflakeGoogle1 repliesunlockedPipelines fail and retry; the real question is whether a retry corrupts your data. The signal is idempotent writes (not 'exactly-once delivery') plus watermarks for late data. Here is how to make re-runs safe without double-counting.Open full answer →
04A Spark job that used to finish in minutes now takes hours. How do you diagnose and fix it?▼hardDatabricksSnowflakeMicrosoft2 repliesunlockedThe Databricks-flavored performance question. The signal is going straight to the usual suspects (skew, shuffle, spill) via the Spark UI, not guessing. Here is the diagnostic order and the fixes that actually move the needle.Open full answer →
06Deduplicate events exactly-once over a sliding 7-day window in a high-throughput stream without running out of memory.▼hardDatabricksSnowflakeGoogle2 repliesunlockedA hard streaming-systems question: dedup at high throughput with bounded state. The signal is a tiered state design (probabilistic filter in front of durable state) plus watermark-driven eviction. Here is the architecture that does not OOM.Open full answer →
16Write SQL for a cohort retention analysis (what % of users return in week N after signup).▼hardMetaAmazonNetflix2 replies○ sign inThe canonical product-analytics SQL question. The signal is grouping users by signup cohort, computing each activity's period offset, and counting distinct returners per offset to build the retention triangle.Open full answer →
21How do you join two streams (or a stream to a table) in a streaming system?▼hardDatabricksGoogleMeta2 replies◆ premiumYou cannot wait for all the data, and buffering an unbounded stream will OOM. The signal is windowed joins with watermarks for stream-stream, lookup joins for stream-table, and a clear story for late and out-of-order events.Open full answer →
23What is data skew in a distributed job (Spark), and how do you fix it?▼hardDatabricksAmazonMeta1 replies◆ premiumThe top cause of mysteriously slow Spark jobs: one partition does most of the work while the rest idle. The signal is reading the symptom (a few straggler tasks) and reaching for the right fix, salting, broadcast, or AQE.Open full answer →
29What is a LATERAL join (CROSS APPLY), and when do you need it?▼hardSnowflakeAmazonMicrosoft1 replies◆ premiumA LATERAL join lets a FROM-clause subquery reference columns from the table before it, which a normal join cannot. The signal is recognizing the per-row use cases: top-N per group, table functions, unnesting arrays.Open full answer →
34Build an ML training set in SQL with point-in-time-correct feature joins (no future leakage).▼hardUberDoorDashDatabricks2 replies◆ premiumThe single most common way SQL leaks the future into a training set is a careless join to a feature table. Point-in-time correctness is the fix, and it is an as-of join. Here is how to write it.Open full answer →
35Write SQL for a multi-step funnel: what fraction of users complete each step, in order?▼hardMetaAmazonAirbnb2 replies◆ premiumFunnels look like simple counts until you require the steps happen in order and within a window. Counting each step independently overstates conversion. Here is the ordered-funnel query.Open full answer →
36Find each user's longest streak of consecutive active days in SQL (gaps and islands).▼hardMetaAmazonNetflix1 replies◆ premiumConsecutive-run problems (active streaks, uptime windows, price-stable periods) all reduce to one trick. Once you see the row-number difference, they collapse to a window function and a group-by.Open full answer →
39Generate ML labels in SQL: did each user churn (no activity in the next 30 days)?▼hardNetflixSpotifyAmazon1 replies◆ premiumDefining the label is half the modeling problem, and the SQL hides two leakage traps: looking into the future for features, and a label window that isn't fully observed yet. Here is the correct query.Open full answer →
41Detect feature drift in SQL: compare a feature's distribution between two time periods.▼hardDatabricksMetaStripe2 replies◆ premiumProduction drift monitoring often lives in the warehouse, not a fancy tool. Comparing two distributions in SQL with a metric like PSI is a few CTEs. Here is how to compute it.Open full answer →
44Find shortest paths and detect cycles in a graph stored as edges, using a recursive CTE.▼hardSnowflakeDatabricksGoogle1 replies◆ premiumAn org-chart recursion walks a tree, but a general graph has multiple paths and back-edges. The signal is accumulating the visited path to prune cycles and ranking paths by cost to get the shortest one.Open full answer →
46Explain the difference between RANGE and ROWS window frames, and when named windows help.▼hardSnowflakeDatabricksGoogle2 replies◆ premiumTwo queries that look identical except for ROWS vs RANGE return different numbers, and most candidates cannot say why. The signal is knowing RANGE groups by value (peers) while ROWS counts physical rows.Open full answer →
47Walk me through reading an EXPLAIN ANALYZE plan to find why a query is slow.▼hardSnowflakeDatabricksStripe2 replies◆ premiumEveryone says 'add an index,' but a strong engineer reads the plan first. The signal is finding the dominant operator, comparing estimated vs actual rows, and recognizing the seq-scan, bad-join, and spill patterns.Open full answer →
48How do you choose a partitioning and clustering strategy for a large analytics table?▼hardSnowflakeDatabricksGoogle1 replies◆ premiumPartition on the wrong key and you get millions of tiny files or skewed giants. The signal is partitioning on a low-cardinality filter, clustering within partitions on the next predicate, and watching file size.Open full answer →
50Compare Iceberg, Delta Lake, and Hudi. How would you choose an open table format?▼hardDatabricksSnowflakeNetflix2 replies◆ premiumAll three give you ACID on object storage, but they were built for different problems. The signal is matching the format to the workload (engine neutrality, Spark-native ACID, or streaming upserts) rather than naming a favorite.Open full answer →
53Given rows with start and end timestamps, merge all overlapping intervals per user in SQL.▼hardSnowflakeDatabricksStripe1 replies◆ premiumOverlapping subscription or session windows need collapsing into clean periods, and a naive self-join is quadratic. The signal is the gaps-and-islands trick: a running max end-time to mark where each new island begins.Open full answer →
54How do you handle late-arriving data in a streaming or incremental pipeline?▼hardDatabricksSnowflakeGoogle2 replies◆ premiumEvents show up minutes or days after they happened, and a window that already closed gives wrong counts. The signal is event-time vs processing-time, watermarks with allowed lateness, and how you correct already-emitted aggregates.Open full answer →
55You shipped a logic bug three months ago. How do you safely backfill and reprocess the affected data?▼hardDatabricksSnowflakeNetflix1 replies◆ premiumA backfill that double-counts or takes down the live pipeline is worse than the original bug. The signal is idempotent partition-scoped rewrites, isolating backfill compute from live runs, and validating before swapping.Open full answer →
57Compare CDC variants: log-based, query-based, and trigger-based. What are the failure modes of each?▼hardDatabricksSnowflakeGoogle2 replies◆ premiumMost candidates only know 'use Debezium.' The signal is comparing three CDC mechanisms by how they capture deletes, load the source, and handle ordering, plus the snapshot-to-stream stitching that trips up real deployments.Open full answer →
58Turn a raw web crawl into a clean trillion-token LLM training corpus. Design the pipeline.▼hardNewNVIDIAAnthropicOpenAI◆ premiumAnyone can say 'filter and dedup.' The signal is the funnel in cost order, the MinHash/LSH banding math, and knowing the shuffle at billions of documents is what actually costs you, plus benchmark decontamination people forget until their eval numbers get challenged.Open full answer →
01Your model looks great offline but drops CTR 2% in production. How do you ship safely and find the cause?▼hardMetaGoogleMicrosoft2 repliesunlockedThis is two questions hiding as one: how would you have caught it before full rollout, and how do you debug it now. Answer both and you signal senior judgment. Here is the staged-rollout and root-cause playbook.Open full answer →
02Design a large-scale recommendation feed (retrieval then ranking) for 100M users.▼hard★ EssentialMetaGoogleNetflix1 repliesunlockedThe modal ML system design round. The structure interviewers reward is the funnel: candidate generation then ranking then re-ranking, with the right model at each stage and an honest plan for cold start, freshness, and feedback loops. Here is that structure.Open full answer →
03Design a real-time fraud detection system where fraud is under 1% of transactions.▼hardAmazonGoogleMicrosoft1 repliesunlockedExtreme class imbalance plus a hard latency budget plus an adversary who adapts. The signal is handling imbalance honestly, choosing the operating point from costs, and designing for the feedback loop. Here is the end-to-end design.Open full answer →
04Design a monitoring system for a fleet of 100+ production ML models.▼hardMetaMicrosoftDatabricks1 repliesunlockedModels fail silently; the question is whether you would know. The signal is monitoring the right layers (operational, data, prediction, outcome) and alerting on drift without drowning in false pages. Here is the system and the metrics that matter.Open full answer →
05Design a multimodal (text and image) search system for a large e-commerce catalog.▼hardGoogleMetaMicrosoft1 repliesunlockedMultimodal search tests whether you understand shared embedding spaces and the retrieve-then-rank pattern under a real catalog's scale and freshness. The signal is CLIP-style joint embeddings plus hybrid retrieval and honest relevance evaluation. Here is the design.Open full answer →
06Design a text-to-SQL feature: let users ask questions in natural language over a real database.▼hardMicrosoftDatabricksGoogle1 repliesunlockedText-to-SQL is deceptively hard because correctness is binary and the failure mode is a confident wrong number. The signal is schema grounding, query validation, and a safety layer, not just 'prompt an LLM with the schema.' Here is the production design.Open full answer →
07Design a real-time content moderation system for text and images at platform scale.▼hardMetaGoogleMicrosoft1 repliesunlockedModeration is a multi-stage classification problem with brutal tradeoffs: false negatives cause real harm, false positives censor legitimate users, and the adversary adapts. The signal is the tiered pipeline, per-severity precision/recall calibration, and human-in-the-loop. Here is the design.Open full answer →
08Design an LLM gateway in front of multiple model providers (routing, caching, fallback, rate limits, observability).▼hardMicrosoftDatabricksCohere1 repliesunlockedAs soon as a company uses LLMs in more than one place, it needs a gateway. The signal is the cross-cutting concerns (cost, reliability, observability, governance) that a gateway centralizes, not just 'proxy the API.' Here is the design.Open full answer →
09Design a click-through-rate (CTR) prediction system for ads ranking at scale.▼hard★ EssentialMetaGoogleAmazon2 repliesunlockedAds ranking is where calibrated probabilities meet hard latency and money. The signal is knowing that CTR must be calibrated (not just ranked), the feature and serving design, and the auction context. Here is the design that goes beyond 'train a classifier.'Open full answer →
10Design an anomaly detection system for a metric (e.g. cloud billing) with seasonality and cold start.▼hardAmazonMicrosoftGoogle1 repliesunlockedAnomaly detection sounds easy until seasonality, cold start, and alert fatigue hit. The signal is modeling the expected baseline (including weekly and daily cycles), choosing unsupervised methods for scarce labels, and tuning to avoid drowning users in false alarms. Here is the design.Open full answer →
11Design ChatGPT end to end: from training to serving a conversational assistant at scale.▼hard★ EssentialOpenAIAnthropicGoogle3 replies○ sign inThe canonical AI system-design question. The signal is covering both the model lifecycle and the serving stack under real scale, without rambling. Most candidates design only half and lose the points.Open full answer →
12Design a deep research agent that answers complex questions by searching and synthesizing many sources.▼hard★ EssentialOpenAIAnthropicGoogle1 replies○ sign inThe modern agentic system-design question. The signal is the plan, search, read, synthesize, verify loop with per-claim citations, plus bounding cost and latency. The hard parts are not the writing.Open full answer →
13Design memory for a personal AI assistant that remembers users across sessions.▼hardOpenAIAnthropicMicrosoft2 replies○ sign inCross-session memory is what makes an assistant feel personal, and it is mostly a retrieval and state-management problem, not a bigger context window. The signal is the tiered architecture plus what to store, forget, and protect.Open full answer →
14Design a multi-agent customer support system with escalation to humans.▼hardSierraDecagonSalesforce1 replies○ sign inCustomer support is the killer applied-AI use case, testing agents, RAG, tools, and the all-important human escalation. The signal is knowing when to resolve, when to act, and when to hand off, safely.Open full answer →
15Design an LLM inference platform (vLLM-as-a-service) serving many models and teams.▼hard★ EssentialNVIDIAMicrosoftDatabricks2 replies○ sign inScarce GPUs, dozens of models, every team wanting low latency at low cost. The signal is whether you can turn that into one governed serving fleet: continuous batching, KV cache, per-tenant quotas, and cost you can actually attribute.Open full answer →
16Design an AI code review system that comments on pull requests.▼hardMicrosoftGoogleCognition3 replies○ sign inAI code review lives or dies on precision: a few noisy comments and the team mutes the bot forever. The signal is grounding in the diff plus repo context, ruthless false-positive control, and earning developer trust one accepted comment at a time.Open full answer →
17Design an AI email assistant that drafts replies, summarizes threads, and prioritizes the inbox.▼hardGoogleMicrosoftOpenAI1 replies○ sign inSummarize, draft, triage, all over the most sensitive PII a person owns. The signal is grounding in the actual thread, matching the user's voice, and a hard human-in-the-loop rule on anything that gets sent.Open full answer →
18Design a text-to-image generation service (Midjourney/DALL-E-like) at scale.▼hardOpenAIGoogleNVIDIA1 replies○ sign inA GPU-heavy generative system where sampling steps dominate the bill and one bad image is a headline. The signal is the diffusion serving pipeline, the cost levers on per-image GPU time, and a mandatory two-sided safety layer.Open full answer →
19Design an AI resume-screening system that handles 100K applications per week.▼hardGoogleAmazonMicrosoft2 replies○ sign inResume screening is high-scale and high-stakes: a legally sensitive, bias-prone decision about people. The signal is balancing throughput with fairness, human oversight, and explainability, not an LLM ranking resumes. Here is the design.Open full answer →
20Design a real-time transcription system for thousands of concurrent audio streams.▼hardGoogleMicrosoftOpenAI2 replies○ sign inReal-time transcription at scale tests streaming ASR, latency budgets, and GPU fleet management under heavy concurrency. The signal is streaming chunked inference with partial results, not batch transcription. Here is the design.Open full answer →
21Design an AI pipeline that extracts structured data from unstructured documents (invoices, contracts, forms).▼hardMicrosoftGoogleAmazon2 replies◆ premiumDocument extraction (IDP) is a huge enterprise use case with a hard correctness bar: a wrong extracted number is worse than none. The signal is the parse, extract, validate, human-review pipeline and confidence-based routing. Here is the design.Open full answer →
22Design a voice assistant architecture (speech in, speech out) with low latency.▼hardGoogleAmazonApple2 replies◆ premiumA voice assistant chains STT, an LLM, and TTS under a brutal latency budget where every stage adds delay. The signal is streaming and pipelining the stages plus turn-taking, not three blocking calls. Here is the design.Open full answer →
23Design a medical diagnosis assistant using AI, safely.▼hardGoogleMicrosoftAmazon1 replies◆ premiumHealthcare is the highest-stakes AI domain: a wrong answer can harm a patient, and regulators are watching. The signal is designing decision support with grounding, human oversight, and guardrails, never an autonomous diagnoser. Here is the design.Open full answer →
24Design an AI-powered legal document review system (contracts, clauses, risks).▼hardMicrosoftHarveyGoogle1 replies◆ premiumLegal review is high-stakes and precision-critical: a missed clause or hallucinated citation has real consequences, and lawyers have been sanctioned for fabricated cites. The signal is grounding in the actual documents, citing exact passages, and lawyer-in-the-loop. Here is the design.Open full answer →
25Design a dynamic pricing engine (e.g. ride-sharing, e-commerce, travel).▼hardAmazonGoogleMicrosoft2 replies◆ premiumDynamic pricing blends demand forecasting, optimization, and real-time serving, with fairness and trust constraints. The signal is the predict-then-optimize structure plus guardrails against perverse outcomes. Here is the design.Open full answer →
26Design an AI-powered search engine for a large e-commerce catalog.▼hardAmazonGoogleMicrosoft2 replies◆ premiumE-commerce search is where retrieval, ranking, and business goals collide, and it carries a hard exact-match requirement (brand, size, SKU). The signal is query understanding plus hybrid retrieval plus business-aware ranking. Here is the design.Open full answer →
27Design a music generation service (Suno-like).▼hardGoogleOpenAINVIDIA1 replies◆ premiumA GPU-heavy generative-audio system with text/genre/lyric conditioning, minutes-long coherence, and copyright constraints. The signal is the generation pipeline plus the async, cost, and safety layer that makes it shippable.Open full answer →
28Design a video generation service (Sora-like).▼hardOpenAIGoogleNVIDIA1 replies◆ premiumVideo generation is image generation plus the brutal constraint of temporal consistency, and it is the most GPU-intensive generative task there is. The signal is diffusion over spacetime plus a serving design that survives multi-minute jobs.Open full answer →
29Design an AI system for automated code migration (e.g. Python 2→3, framework upgrade, language port).▼hardGoogleMicrosoftCognition2 replies◆ premiumCode migration is a high-value agentic task with an unforgiving correctness bar: the migrated code must still work. The signal is grounding in the real repo, transforming in verifiable chunks, and gating on tests, never one giant LLM rewrite.Open full answer →
30Design an AI notification system that prioritizes what matters instead of broadcasting everything.▼hardMetaGoogleMicrosoft1 replies◆ premiumNotification systems fail by spamming users into muting them, and a mute is a permanently lost channel. The signal is treating it as a per-user send/hold/batch/suppress decision optimized for long-term trust, not for clicks or volume.Open full answer →
31Design an AI meeting summarizer that handles thousands of meetings a day.▼hardMicrosoftGoogleZoom2 replies◆ premiumTwo models chained (ASR then summarization), a long-context problem hiding inside, and a faithfulness bar where a fabricated action item has real consequences. The signal is the pipeline plus how you keep a 3-hour transcript honest at thousands a day.Open full answer →
32Design an on-device AI assistant (runs locally on a phone or laptop).▼hardAppleGoogleMicrosoft1 replies◆ premiumOn-device AI trades raw capability for privacy, offline use, and latency, under brutal memory and battery limits. The signal is the small-quantized-model stack plus a hybrid router that escalates the hard queries to the cloud without leaking private context.Open full answer →
33Design a fraud-detection system that uses LLMs (beyond a classic ML classifier).▼hardAmazonMicrosoftGoogle2 replies◆ premiumThe trap is replacing the classifier with an LLM. The real-time, imbalance, and adversarial constraints do not go away. The signal is a hybrid: a fast calibrated model scores inline, LLMs investigate the gray zone off the hot path.Open full answer →
34Design a two-tower retrieval system for recommendation/candidate generation.▼hard★ EssentialGoogleMetaPinterest2 replies◆ premiumHow large recommenders and search pull candidates from millions of items in milliseconds. The signal is why the user and item towers are separate, how that unlocks precomputed embeddings plus an ANN index, and where ranking takes over.Open full answer →
35Design a typeahead / autocomplete suggestion system.▼hardGoogleMetaAmazon1 replies◆ premiumEvery keystroke needs ranked suggestions back in tens of milliseconds, at search-engine QPS. The interesting part is the data structure and what you precompute, not the query path. Here is the design that survives the latency budget.Open full answer →
36Design an ETA / delivery-time prediction system (ride-share, food delivery, logistics).▼hardUberAmazonGoogle1 replies◆ premiumETA is spatiotemporal regression served in real time over conditions that change by the minute. The signal is feature freshness, segment or stage decomposition, and the asymmetric cost of being wrong. Here is the design.Open full answer →
37Design a 'People You May Know' (friend/connection recommendation) system.▼hardMetaLinkedInGoogle1 replies◆ premiumPYMK is graph recommendation at billion-node scale. The interviewer is screening for one instinct: do you generate candidates from the social graph, or naively try to score all pairs? Here is the design that survives the follow-ups.Open full answer →
38Design a news feed ranking system (social media timeline).▼hard★ EssentialMetaLinkedInTwitter2 replies◆ premiumFeed ranking is multi-objective ML at massive scale with a brutal serving constraint. The interviewer wants to see whether you optimize a value model toward long-term satisfaction, or fall into the CTR trap that breeds clickbait. Here is the design.Open full answer →
39Design a vector database / embedding retrieval service.▼hard★ EssentialPineconeMicrosoftDatabricks1 replies◆ premiumThe service behind every RAG stack and semantic search box. The signal is your ANN index choice and how you handle the three things that quietly break it: metadata filtering, live updates, and scale.Open full answer →
40Design a real-time bidding (RTB) system for online ads.▼hardGoogleMetaAmazon1 replies◆ premiumPredict, value, and bid on a single impression in about 10ms, billions of times a day. The signal is the pCTR-to-bid pipeline under a brutal latency budget, plus why calibration and budget pacing decide whether you make or lose money.Open full answer →
41Design a visual / image search system (search by image, or text-to-image search).▼hardGooglePinterestAmazon1 replies◆ premiumImage search is embedding retrieval at billion-image scale. The tell of a strong answer is knowing when a vision-only encoder suffices and when you need a CLIP-style shared space, plus how the ANN index actually serves the query. Here is the design.Open full answer →
42Design a spam / abuse detection system (email, comments, or messages).▼hardGoogleMetaMicrosoft1 replies◆ premiumSpam detection is adversarial, imbalanced classification under a low-latency bar. The interviewer is watching for whether you set the threshold by cost asymmetry and lean on signals spammers cannot fake. Here is the design.Open full answer →
43Design a query understanding system for search.▼hardGoogleAmazonMicrosoft1 replies◆ premiumQuery understanding is the front end of search that turns a raw query into structured intent. Get it wrong and even a perfect index returns garbage. The signal is the pipeline and how you measure it. Here is the design.Open full answer →
44Design a real-time feature pipeline / feature store for online ML.▼hardUberAmazonDatabricks2 replies◆ premiumOnline models need features that are fresh and computed exactly the way training computed them. The classic failure is training-serving skew that silently degrades the model. The signal is the online/offline split with one shared definition. Here is the design.Open full answer →
45How do you handle the cold-start problem in a recommendation system?▼hardNetflixAmazonSpotify1 replies◆ premiumNew users and new items have zero interaction history, so collaborative filtering has nothing to work with. The candidates who pass treat it as a lifecycle, not a single trick. Here is how.Open full answer →
46How do you balance relevance and diversity in a ranking/recommendation list?▼hardNetflixSpotifyPinterest1 replies◆ premiumRank each item by relevance alone and you ship ten near-identical results and a filter bubble. The signal interviewers want is a re-ranking stage that scores the list as a set, plus the metric that proves it works.Open full answer →
47Design a knowledge-graph-backed question answering system.▼hardGoogleMicrosoftAmazon1 replies◆ premiumSome questions need precise multi-hop facts that vector retrieval can't chain. The signal is entity linking plus query translation over a graph (or GraphRAG), and knowing when the graph is worth its maintenance cost. Here is the design.Open full answer →
48Design the perception system for an autonomous vehicle (or robot).▼hardTeslaWaymoNVIDIA1 replies◆ premiumAV perception is safety-critical, real-time, multimodal ML: detect and track everything around the vehicle from multiple sensors. The signal is sensor fusion plus detection/tracking under a hard latency budget and a fail-safe bar. Here is the design.Open full answer →
49Design a machine translation service at scale.▼hardGoogleMetaMicrosoft1 replies◆ premiumTranslation is seq2seq generation served across hundreds of language pairs under tight latency and quality budgets. The signal is dodging the quadratic pair explosion, rescuing low-resource languages, and serving it cheaply. Here is the design.Open full answer →
50Design a human activity recognition system (from sensors or video).▼hardAppleGoogleMeta1 replies◆ premiumRecognizing walking, driving, or a fall from a sensor stream is windowed time-series classification, usually on a battery-bound device. The signal is windowing, temporal smoothing, and the on-device constraints most candidates skip. Here is the design.Open full answer →
52Design an event recommendation system (events, jobs, or other time-sensitive items).▼hardMetaLinkedInEventbrite2 replies◆ premiumRecommending events (or jobs) breaks normal recsys in two places: items expire and items are local. The signal is how you handle perishability, geography, and the fact that every item is a cold-start item. Here is the design.Open full answer →
54How do you handle feedback loops and bias in a recommendation system?▼hardNetflixMetaYouTube2 replies◆ premiumA recommender trains on data its own past recommendations produced, so it learns to confirm its own beliefs. The signal is recognizing the loop, naming the biases it breeds, and knowing the exploration and debiasing fixes that break it.Open full answer →
55Design a data labeling / annotation platform.▼hardScale AIGoogleAmazon1 replies◆ premiumLabeled data is the fuel for ML, and a labeling platform lives or dies on quality control. The signal is the workflow plus the quality math: consensus, gold honeypots, inter-annotator agreement, and active learning to spend the budget where it counts.Open full answer →
56Design an object detection service (detect and localize objects in images at scale).▼hardGoogleAmazonMeta1 replies◆ premiumDetecting and boxing objects at scale comes down to one driving tradeoff plus a handful of CV specifics most candidates fumble: the detector family, NMS, focal loss, and why mAP not accuracy is the metric. Here is the design.Open full answer →
60Design a demand forecasting system (retail/inventory/capacity).▼hardAmazonWalmartUber2 replies◆ premiumForecasting one series is a textbook exercise; forecasting a million SKU-stores that must reconcile, with stockouts costing more than overstock, is the real interview. The strong answer goes global, hierarchical, and cost-aware.Open full answer →
61Design an autonomous coding agent that resolves GitHub issues end to end (plan, edit, test, iterate).▼hardCognitionOpenAIAnthropic1 replies◆ premiumA Devin-style agent that turns an issue into a merged PR is the hardest agent to make reliable, because every step can fail and errors compound. Here is the architecture and the loop that keeps it honest.Open full answer →
62Design a semantic cache for LLM responses that cuts cost and latency without serving stale or wrong answers.▼hardOpenAIPerplexityAnthropic3 replies◆ premiumExact-match caching barely helps when no two prompts are identical. Semantic caching reuses answers for similar queries, and its whole risk is returning a near-match that's subtly wrong. Here is how to build it safely.Open full answer →
63Design a multi-region, highly available LLM serving platform with failover and bounded cost.▼hardAWSMicrosoftOpenAI2 replies◆ premiumGPUs are scarce and expensive, so multi-region HA for LLMs is not just web-app HA with bigger boxes. Capacity, routing, and failover all bend around the GPU constraint. Here is the design.Open full answer →
64Design a system to run LLM inference over a billion documents offline, as cheaply as possible.▼hardGoogleDatabricksSnowflake1 replies◆ premiumBatch scoring a billion items is a throughput-and-cost problem, the opposite of low-latency serving. Every choice that hurts latency helps you here. Here is how to design for dollars-per-million-documents.Open full answer →
65Design an internal evaluation platform that lets teams measure and compare LLM features reliably.▼hardOpenAIAnthropicScale AI2 replies◆ premiumEvery team eval-ing prompts in ad-hoc notebooks is how an org ships regressions and argues about vibes. A shared eval platform makes quality measurable and comparable. Here is what it has to provide.Open full answer →
67Design a computer-use agent that operates a browser to complete tasks (book travel, fill forms) reliably.▼hardOpenAIAnthropicGoogle DeepMind1 replies◆ premiumAn agent that clicks around a real website is slow, brittle, and one wrong click from a costly mistake. The architecture is about perception, action, and guardrails around irreversible steps. Here is how to build it.Open full answer →
68Design a human-feedback data platform to collect the preference data that trains and aligns your models.▼hardAnthropicOpenAIScale AI2 replies◆ premiumRLHF and evals are only as good as the preference data behind them, and that data is generated by humans whose quality varies wildly. The platform that produces trustworthy labels is itself a serious system. Here is its design.Open full answer →
69Design a conversational analytics agent that answers business questions over a data warehouse in natural language.▼hardSnowflakeDatabricksGoogle2 replies◆ premium'What was revenue by region last quarter?' sounds like text-to-SQL, but production analytics agents fail on ambiguity, wrong joins, and confidently wrong numbers. Here is the architecture that makes the answers trustworthy.Open full answer →
71Design a system that monitors the quality of millions of AI support conversations and flags the bad ones.▼hardSierraDecagonSalesforce1 replies◆ premiumAn AI support agent handling millions of chats will sometimes be wrong, rude, or unhelpful, and you cannot read them all. Monitoring quality at that scale is its own design problem with its own failure modes.Open full answer →
72How do CAP and consistency tradeoffs apply to an ML feature store and online serving?▼hardUberMetaAWS1 replies◆ premiumClassic distributed-systems tradeoffs show up in ML infra with an ML twist: stale features and eventually-consistent reads have model-accuracy consequences, not just correctness ones. Here is how to reason about it.Open full answer →
73Distribute a 10GB file from one bandwidth-limited source to thousands of machines as fast as possible.▼hardAnthropicGoogleMeta2 replies◆ premiumAnthropic's signature opener. The naive answer (one server pushes to N clients) is bottlenecked by the source uplink and scales linearly. The answer interviewers reward turns receivers into senders so the swarm's capacity grows with its size. Here is that reasoning.Open full answer →
74Design a distributed key-value store (partitioning, replication, and consistency).▼hard★ EssentialAmazonGoogleAnthropic1 replies◆ premiumThe Dynamo question. Interviewers want three decisions made cleanly: how you partition keys so adding nodes does not reshuffle everything, how you replicate for durability, and where you land on the CAP spectrum. Here is how to reason about all three with concrete quorum math.Open full answer →
75Design a distributed rate limiter for an API serving millions of requests per second.▼hard★ EssentialGoogleAmazonStripe2 replies◆ premiumEvery API platform needs one. Interviewers reward the candidate who picks the right algorithm (token bucket vs sliding window) for the burst behavior, then solves the genuinely hard part: enforcing one shared limit across many servers without a per-request round trip to a central store.Open full answer →
76Design a load balancer that distributes traffic across a fleet of backend servers.▼hard★ EssentialGoogleAmazonMeta1 replies◆ premiumLooks simple until the follow-ups: which layer do you balance at, how do you avoid sending traffic to a dead server, and how is the load balancer itself not a single point of failure? Interviewers want the algorithm, the health-check loop, and the high-availability story.Open full answer →
78Design a metrics, logging, and monitoring service for thousands of servers.▼hard★ EssentialGoogleAmazonMeta1 replies◆ premiumThe observability infrastructure question. Interviewers want you to separate the three telemetry types, choose storage that survives massive write volume, and design alerting that fires fast without drowning on-call in noise. Here is the pipeline with retention and cardinality math.Open full answer →
79Design a system that records events in a single globally consistent order across many machines.▼hardGoogleAmazonAnthropic2 replies◆ premiumThe distributed ordering question, the conceptual core of Kafka, replicated logs, and consensus systems. Interviewers want to see you confront the hard truth that physical clocks lie, then reach for the actual tools: a single sequencer, consensus, or logical clocks. Here is that progression.Open full answer →
80Design a real-time group chat and messaging system like Slack or WhatsApp.▼hard★ EssentialMetaAmazonMicrosoft2 replies◆ premiumThe real-time messaging classic. Interviewers want the delivery path (persistent connections, not polling), the fan-out strategy that does not collapse on large groups, and an ordering and delivery-guarantee story. Here is that design with the fan-out tradeoff that separates seniors.Open full answer →
81Design an evaluation framework for an ads ranking system.▼hardMetaGoogleAmazon2 replies◆ premiumThis is the question to design the scoreboard, not the player. A strong answer separates offline gates (AUC, calibration, NDCG) from the online verdict (A/B with revenue, user, and advertiser guardrails), and adds counterfactual replay so you can trust a model before it ever serves a real auction.Open full answer →
82Design a personalized news / feed ranking system.▼hardGoogleMetaApple1 replies◆ premiumA news feed is not a generic recommender. The clock is a first-class signal: a story that mattered this morning is noise by tonight. The interviewer wants recency decay, an engagement-versus-quality value model, and an answer for filter bubbles, not just retrieval plus ranking.Open full answer →
83Design a misinformation / fake-news detection system at scale.▼hardMetaGoogleMicrosoft1 replies◆ premiumTruth is not a label you can train on cheaply, and adversaries adapt the moment you ship. A strong answer fuses content, graph, and behavioral signals, puts humans in the loop where precision matters, and treats adversarial drift as a permanent operating condition, not a one-time training problem.Open full answer →
86Design a system to retrieve similar scenes from a large video corpus given a query clip.▼hardGoogleMetaAmazon2 replies◆ premiumVideo search is image search with a time axis, and the time axis is the whole problem. A strong answer embeds frames, pools them into scene vectors, indexes with ANN at billion scale, and explains how a multimodal query (clip, text, or both) finds the right moment, not just the right video.Open full answer →
87Design an IDE code assistant (Copilot-style) that completes code as the developer types.▼hardMicrosoftOpenAIAnthropic1 replies◆ premiumInline completion lives or dies on tail latency: a suggestion that arrives after the developer keeps typing is useless. Learn how to build the context window, hide model latency behind speculation and caching, and keep a tight feedback loop on acceptance rate.Open full answer →
88Design an enterprise semantic search system over a company's internal documents and tools.▼hardGleanMicrosoftGoogle1 replies◆ premiumEnterprise search lives or dies on permissions, freshness, and connecting to thirty messy SaaS sources; retrieval quality is table stakes. Learn how to fan out across connectors, enforce per-user access at query time, and blend lexical with vector search for results people trust.Open full answer →
89Design a document summarization pipeline that handles long documents at high throughput.▼hardOpenAIAnthropicGoogle1 replies◆ premiumSummarizing a 200-page contract is not one LLM call: it is chunking, hierarchical reduction, and a faithfulness check so you never invent facts. Learn the map-reduce pattern, when long-context beats it, and how to evaluate summaries at scale.Open full answer →
90Design an LLM-based content moderation system that screens user content at platform scale.▼hardOpenAIMetaGoogle1 replies◆ premiumModerating billions of items a day with an LLM on every one is too slow and too expensive. Learn the tiered funnel (cheap classifier then LLM then human), how to tune thresholds for precision versus recall, and how to keep up with adversaries.Open full answer →
91Design a personalization service that tailors LLM responses to each user's context and history.▼hardOpenAIGoogleMeta1 replies◆ premiumPersonalizing an LLM is a retrieval and memory problem, not a per-user fine-tune. Learn how to assemble user context at request time, manage long-term memory without bloating the prompt, and respect privacy and the right to be forgotten.Open full answer →
93Design a customer-support automation platform that resolves tickets end to end with LLMs.▼hardSierraDecagonSalesforce2 replies◆ premiumAuto-resolving support tickets means grounding answers in your knowledge base, safely calling real APIs (refunds, account changes), and knowing when to hand off to a human. Learn the agent loop, the guardrails, and how to measure resolution without breaking trust.Open full answer →
95Design an A/B testing platform for LLM features (prompts, models, retrieval) with trustworthy metrics.▼hardOpenAIGoogleMicrosoft2 replies◆ premiumExperimenting on LLM features is hard because the outputs are open-ended and quality is fuzzy. Learn how to assign traffic, pick metrics that are not just engagement, handle variance from non-determinism, and avoid the traps that make a winning variant lose in production.Open full answer →
96Design a RAG-as-a-service platform that lets teams build retrieval-augmented apps over their own data.▼hardAWSDatabricksSnowflake1 replies◆ premiumOffering RAG as a product means handling messy ingestion, multi-tenant isolation, and per-customer index freshness, all behind a simple API. Learn the ingestion and query planes, how to keep tenants isolated, and how to give customers eval and observability.Open full answer →
98Design a notification and fan-out system that delivers to millions of users across push, email, and SMS.▼hardMetaLinkedInUber1 replies◆ premiumA celebrity posts and 50M followers need a notification. The hard parts are not sending one message, they are fan-out strategy, deduplication, channel routing, and not flooding users. Here is the architecture that handles both the long tail and the viral spike.Open full answer →
99Design the ride-matching system that pairs riders with nearby drivers in real time.▼hardUberAirbnbAmazon2 replies◆ premiumA rider taps request and within seconds a nearby driver is assigned. The interesting problems are geospatial indexing of moving drivers, the matching objective (nearest is not always best), and handling the race where two riders want the same car. Here is how to build it.Open full answer →
100Design a payment ledger that records money movement with exactly-once semantics and no lost cents.▼hardStripeAmazonUber2 replies◆ premiumIn payments, a duplicate charge or a lost credit is not a bug, it is a financial incident. The design hinges on idempotency keys, double-entry bookkeeping, and an append-only ledger that can be audited and reconciled. Here is how money systems stay correct.Open full answer →
101Design a distributed cache like Redis or Memcached that serves millions of reads per second.▼hardAmazonMetaNetflix1 replies◆ premiumA cache is easy until you scale it across many nodes. Then you face consistent hashing, eviction policy, the thundering herd on a cache miss, hot keys, and how stale you can tolerate. Here is the design that holds up under real traffic.Open full answer →
102Design a time-series database that ingests millions of metrics per second and answers range queries fast.▼hardAmazonNetflixMicrosoft1 replies◆ premiumMetrics, traces, and IoT data are append-heavy, time-ordered, and rarely updated. A general database handles this badly. The wins come from columnar layout, compression tuned for timestamps, downsampling, and retention. Here is the time-series design interviewers want.Open full answer →
103Design a data lakehouse pipeline that ingests raw events and serves both analytics and ML features.▼hardDatabricksSnowflakeNetflix1 replies◆ premiumRaw clickstream lands in object storage and somehow becomes clean tables, dashboards, and ML features. The design questions are table format, the bronze-silver-gold layering, batch versus streaming, and how you handle schema drift and late data. Here is the lakehouse blueprint.Open full answer →
104Design a large-scale web crawler that fetches billions of pages while being polite and avoiding traps.▼hardGoogleMicrosoftAmazon1 replies◆ premiumCrawling a few pages is trivial. Crawling the web means a URL frontier with priority, politeness per host, dedup at billions of URLs, and defenses against spider traps and infinite content. Here is the crawler architecture that scales without getting your IPs banned.Open full answer →
107Design an idempotent job queue that processes background tasks exactly once despite retries and crashes.▼hardStripeAmazonUber2 replies◆ premiumBackground jobs fail, retry, and get redelivered. If a job sends an email or charges a card, running it twice is a real problem. The design is at-least-once delivery plus idempotent handlers, visibility timeouts, and dead-letter queues. Here is how to make jobs safe.Open full answer →
108Design an ad exchange that runs a real-time auction across many bidders within a 100ms budget.▼hardGoogleMetaAmazon1 replies◆ premiumWhen a page loads, an ad slot is auctioned to dozens of bidders and a winner is chosen before the page finishes rendering, all in under 100ms. The design covers the auction mechanism, the brutal latency budget, budget pacing, and fraud. Here is how an exchange runs millions of auctions per second.Open full answer →
109Design a private LLM deployment for a regulated enterprise where nothing, not even telemetry, may leave the network.▼hardNewPalantirNVIDIADatabricks◆ premiumTaking a cloud-API POC into a bank or defense network kills your model provider, your judge API, and your vendor dashboards all at once. Learn the signed-bundle supply chain, local evaluation loop, and zero-egress observability that make an air-gapped LLM stack actually operable.Open full answer →
05Design a large-scale training pipeline that resumes cleanly after a node failure.▼hardNVIDIAOpenAIGoogle2 repliesunlockedAt thousand-GPU scale, hardware failure is the norm, not the exception, and a run that cannot resume wastes weeks. The signal is checkpointing strategy, deterministic resume, and minimizing lost work. Here is the fault-tolerant design.Open full answer →
17Design an online experimentation (A/B testing) platform for ML models at scale.▼hardMetaMicrosoftNetflix1 replies○ sign inA trustworthy experiment platform is far more than a 50/50 split. The signal is consistent assignment, exposure logging, statistical rigor, and guardrails that survive peeking and sample-ratio mismatch. Here is the design.Open full answer →
25What are the components of an ML platform, and why build one?▼hardUberNetflixDatabricks2 replies◆ premiumAn ML platform is the internal system that lets many teams build and ship models reliably. The signal is naming the components (data, features, training, registry, serving, monitoring) and arguing why standardizing beats per-team reinvention, plus when not to build.Open full answer →
28Your model scores well offline but worse online, and you suspect training-serving skew. How do you find it?▼hardGoogleMetaDatabricks3 replies◆ premiumSame model, two answers: clean offline, ugly online. The culprit is almost always a feature computed differently in the two paths. Here is the diff-based hunt that localizes it to a single column.Open full answer →
30Your online features are stale, and predictions suffer for it. How do you guarantee feature freshness?▼hardUberDoorDashMeta2 replies◆ premiumA fraud model fed a feature an hour behind is half-blind, but recomputing everything in real time burns money you don't need to spend. Freshness is a per-feature decision on a real cost curve. Here is how to manage it.Open full answer →
31A customer disputes a prediction your model made three months ago. How do you reproduce it exactly?▼hardStripeCapital OneGoogle2 replies◆ premium'Why was I denied?' is a question regulators and customers will ask, and 'we retrained since then' is not an acceptable answer. Exact reproduction means versioning everything. Here is what 'everything' actually means.Open full answer →
32Your ground-truth labels arrive weeks late. How do you monitor the model in the meantime?▼hardStripeMetaAmazon2 replies◆ premiumIf you wait for labels to measure accuracy, you find out a model broke a month after it broke. Production monitoring has to work before the truth arrives. Here is what you watch instead.Open full answer →
33How do you build a pipeline that retrains, validates, and promotes a model automatically (continuous training)?▼hardGoogleDatabricksUber1 replies◆ premiumAutomating retraining sounds like a convenience until an auto-retrained model silently ships worse. The gates are the whole point. Here is how to automate retraining without automating a regression into production.Open full answer →
37A prompt tweak fixed one case and silently broke ten others. How do you regression-test an LLM app in CI?▼hardOpenAIAnthropicSierra2 replies◆ premiumEditing a prompt is a code change with no compiler and no unit test by default, so quality regressions ship invisibly. Treating prompts and models as testable artifacts is what separates a toy from a product. Here is the harness.Open full answer →
38Design an ML experiment-tracking and analysis platform.▼hardMetaGoogleMicrosoft1 replies◆ premiumEvery team reinvents a spreadsheet of training runs and then drowns in it. The interviewer wants the platform that ingests runs, params, metrics, and artifacts at high write volume, links them by lineage, and makes thousands of experiments comparable, which is a different system from a model registry.Open full answer →
39How do you build an evaluation harness that runs in CI to gate every model change?▼hardOpenAIAnthropicDatabricks1 replies◆ premiumA green build still means nothing for model quality. The signal is an eval harness that runs deterministically in CI, compares against a frozen baseline, and blocks the merge on regressions. Here is how to make it fast, stable, and trusted.Open full answer →
40How do you put governance around models: approvals, access, model cards, and deprecation?▼hardMicrosoftIBMSalesforce2 replies◆ premiumPromotion is the easy part. Governance is who is allowed to ship what, on whose sign-off, with what documented, and how a model gets retired. Here is the control plane an auditor actually asks for.Open full answer →
41What exactly do you pin to make an ML training run bit-for-bit reproducible?▼hardAnthropicGoogle DeepMindNVIDIA1 replies◆ premium'Just set a seed' is the wrong answer. Reproducibility means pinning the environment, the data, the code, and the hardware-level nondeterminism, all at once. Here is the full checklist and where it leaks.Open full answer →
44How do you design automated rollback triggers so a bad model reverts before a human notices?▼hardNetflixUberStripe2 replies◆ premiumManual rollback means minutes of damage while someone wakes up. The signal is defining the trigger signals, thresholds, and guardrails that revert automatically, without flapping on noise. Here is how to make the loop safe.Open full answer →
45Going deeper on canary and blue-green: how do you actually shift traffic and decide to ramp?▼hardNetflixAmazonUber1 replies◆ premiumSaying 'route 5% to the canary' is the easy part. The signal is how you split traffic deterministically, gather enough signal to decide, and ramp on evidence rather than vibes. Here is the mechanics layer.Open full answer →
46When does an ML platform make sense to build, and how do you design the paved path?▼hardDatabricksAWSUber1 replies◆ premiumA platform that no one uses is wasted headcount; a platform built too early is premature. The signal is justifying the investment by leverage and designing a paved path teams adopt willingly. Here is the framing.Open full answer →
47PSI, KL divergence, MMD, and the KS test all detect drift. When do you reach for each?▼hardDatabricksMicrosoftAmazon2 replies◆ premiumFour drift tests, four different assumptions. The weak answer lists them; the strong one knows which handles high-dimensional embeddings, which needs binning, and which gives a calibrated p-value. Here is how to choose.Open full answer →
49How do you design the triggers and cadence for retraining a fleet of production models?▼hardNetflixUberDatabricks1 replies◆ premiumRetrain too often and you burn money and risk regressions; too rarely and the model rots. The strong answer is a layered trigger policy with guardrails, not a single cron job. Here is how to set the cadence.Open full answer →
51How do you define SLOs and error budgets for an ML system, where 'correct' is probabilistic?▼hardGoogleStripeMicrosoft1 replies◆ premiumClassic SRE SLOs assume a request is right or wrong. ML predictions are probabilistic and labels lag, so naive uptime SLOs miss the failures that matter. Here is how to set SLOs that actually cover model quality.Open full answer →
53Design an evaluation pipeline for an LLM application that runs on every prompt and model change.▼hardOpenAIAnthropicCohere1 replies◆ premiumEyeballing a few outputs does not scale, and a prompt tweak that fixes one case quietly breaks ten. A real LLM eval pipeline is a versioned dataset, layered scorers, and a CI gate. Here is the architecture.Open full answer →
01Serve a 70B-parameter model with high throughput. Do the memory math and name the optimizations.▼hard★ EssentialNVIDIAOpenAIAnthropic2 repliesunlockedThe interviewer wants real numbers, not 'use a big GPU.' Weights are fixed, the KV cache grows with load, and the lever order decides everything. Here is the back-of-envelope and the serving stack.Open full answer →
02Explain data, tensor, and pipeline parallelism and FSDP/ZeRO, and size the memory for training a large model.▼hard★ EssentialNVIDIAOpenAIAnthropic2 repliesunlockedThe interviewer wants you to know why a model that fits on no single GPU still trains, and to do the optimizer-state memory math that motivates sharding. Here is the parallelism taxonomy and the 16-bytes-per-parameter calculation.Open full answer →
03Explain quantization for inference: INT8/INT4, GPTQ/AWQ, what breaks, and how you validate it.▼hard★ EssentialNVIDIAOpenAIxAI2 repliesunlockedQuantization is the first lever for fitting and speeding up models, and the interviewer wants more than 'use fewer bits.' The signal is knowing what precision buys you, why outliers break naive quantization, and how you prove quality held. Here is that answer.Open full answer →
04Why is standard attention memory-bound, and how does FlashAttention fix it without changing the math?▼hardNVIDIAOpenAIAnthropic2 repliesunlockedA favorite at hardware-aware shops. The signal is understanding that attention's cost is memory traffic, not FLOPs, and that FlashAttention is an exact, IO-aware reordering, not an approximation. Here is the answer that shows you think about the memory hierarchy.Open full answer →
05Explain the KV cache: prefill vs decode, why it grows, and how MQA/GQA and PagedAttention help.▼hard★ EssentialNVIDIAOpenAIAnthropic2 repliesunlockedThe KV cache is why LLM serving is hard, and the interviewer wants the mechanics: what it stores, why it limits concurrency, and the tricks that shrink it. Here is the answer that shows you understand decode-time economics.Open full answer →
06Explain speculative decoding and the other main levers for cutting LLM generation latency.▼hardNVIDIAOpenAIAnthropic2 repliesunlockedDecode is sequential and memory-bound, so latency tricks matter. The signal is explaining speculative decoding's draft-and-verify mechanism (and why it stays exact) plus the other levers and when each applies. Here is the latency toolkit.Open full answer →
07Explain mixed-precision training: FP16 vs BF16, loss scaling, and where the numerics break.▼hard★ EssentialNVIDIAOpenAIGoogle2 repliesunlockedMixed precision is standard at scale, and the interviewer wants the numerics: why FP16 needs loss scaling, why BF16 mostly does not, and what stays in FP32. The signal is understanding dynamic range vs precision. Here is that answer.Open full answer →
08Why are GPUs suited to deep learning, and how do GPUs, CPUs, and TPUs differ?▼hardNVIDIAGoogleOpenAI2 repliesunlockedA hardware-literacy question, especially at NVIDIA and the labs. The signal is understanding throughput vs latency hardware, the memory hierarchy, and why matrix multiplication maps onto GPUs and TPUs. Here is the architecture-aware answer.Open full answer →
11Walk through optimizing a CUDA kernel: warp divergence, memory coalescing, and shared-memory bank conflicts.▼hardNVIDIAOpenAIxAI1 replies○ sign inAt NVIDIA and the labs this compute-intimacy question is real. The signal is owning the SIMT execution model and the three classic throughput killers, with the concrete fix for each. Here is the low-level answer.Open full answer →
17What are FSDP and DeepSpeed ZeRO, and how do their sharding stages differ?▼hardNVIDIAOpenAIMicrosoft2 replies○ sign inFSDP and ZeRO let you train models too big for one GPU without splitting the compute. The signal is the ZeRO stages (what gets sharded at each level) and the communication you pay for it. Here is the answer.Open full answer →
18What are the collective communication operations (all-reduce, all-gather, reduce-scatter) in distributed training?▼hardNVIDIAOpenAIGoogle2 replies○ sign inDistributed training is bottlenecked by GPU-to-GPU communication, and these collectives are how the data moves. The signal is what each one does and which parallelism strategy depends on it. Here is the answer.Open full answer →
20What is model sharding, and how do tensor and pipeline parallelism split a model across GPUs?▼hardNVIDIAOpenAIGoogle2 replies○ sign inWhen a model is too big for one GPU you split the model itself, not just the data. The signal is distinguishing tensor parallelism (split within a layer) from pipeline parallelism (split across layers) and matching each to the interconnect. Here is the answer.Open full answer →
23What is disaggregated (prefill/decode) serving for LLM inference?▼hardNVIDIAOpenAIMicrosoft2 replies◆ premiumLLM inference has two phases with opposite resource profiles, and co-locating them makes a long prompt stall everyone else's tokens. The signal is knowing why prefill and decode fight, and what separating them costs. Here is the answer.Open full answer →
27What consumes GPU memory during training/inference, and how do you fit a model that doesn't?▼hardNVIDIAOpenAIMeta1 replies◆ premiumOOM is the most common wall in deep learning, and 'buy a bigger GPU' is the weakest answer. The signal is naming the memory consumers, knowing which one dominates, and matching the right lever to it.Open full answer →
28What is MFU (Model FLOPs Utilization), and why can GPU utilization be misleading?▼hard★ EssentialNVIDIAOpenAIGoogle1 replies◆ premiumnvidia-smi showing 100% can hide that you are using a fraction of the hardware's real compute. The signal is MFU (useful FLOPs vs peak) and the gap between 'the GPU is busy' and 'the GPU is efficient'.Open full answer →
29What is FP8 (and low-precision training/inference), and what are the tradeoffs?▼hardNVIDIAOpenAIGoogle2 replies◆ premiumBeyond FP16/BF16, FP8 is the next rung on the precision ladder, and the latest tensor cores compute on it natively. The signal is knowing the two formats, what FP8 actually buys, and why dynamic range forces careful scaling.Open full answer →
30How do you quantize or compress the KV cache, and why does it matter for long-context serving?▼hardNVIDIAOpenAIMicrosoft1 replies◆ premiumAt long context the KV cache, not the weights, dominates GPU memory and decode bandwidth. The signal is recognizing it as the binding constraint and naming the levers that shrink it without wrecking quality.Open full answer →
33How do you serve many fine-tuned model variants efficiently (multi-LoRA serving)?▼hardNVIDIAMicrosoftDatabricks2 replies◆ premiumHosting one full fine-tuned model per customer scales linearly in GPUs and bankrupts you fast. There is a way to put hundreds of variants on one GPU without giving up batching. The interviewer wants to hear how.Open full answer →
34How do you autoscale LLM inference, and why is it different from scaling a normal web service?▼hardNVIDIAMicrosoftOpenAI1 replies◆ premiumCPU-based autoscaling that works fine for a web tier quietly fails on GPU inference: wrong signal, and replicas that take minutes to warm. The interviewer wants the signals you actually scale on and how you hide the cold start.Open full answer →
35Your GPUs sit at 40% utilization during training. How do you find and fix the bottleneck?▼hardNVIDIAMetaGoogle2 replies◆ premiumPaying for accelerators that idle half the time is the most common waste in ML training, and the instinct to add more GPUs makes it strictly worse. The interviewer wants the profiling discipline that finds what is starving them.Open full answer →
36Your LLM decode is slow even though GPU compute utilization looks low. Why is it memory-bandwidth-bound?▼hardNVIDIAOpenAIDatabricks2 replies◆ premiumThe counterintuitive truth of LLM serving: token generation is limited by how fast you can read weights from memory, not by math. Once you see that, the whole optimization menu falls out of one number.Open full answer →
37You doubled the GPUs but training barely got faster. Why doesn't distributed training scale linearly?▼hardMetaNVIDIAGoogle1 replies◆ premiumLinear scaling is the marketing number; the real curve bends early for reasons that are physics, not bugs. Here is where the speedup goes and how to claw it back.Open full answer →
38Your distributed training job hangs or crashes intermittently. How do you debug it?▼hardMetaNVIDIAOpenAI2 replies◆ premiumA 256-GPU job that wedges with no error at 3am is a special kind of pain. The causes are a short, recurring list. Here is the systematic way to find which one bit you.Open full answer →
39How do you cut training cost with spot/preemptible GPUs without losing days of work to a preemption?▼hardAWSGoogleDatabricks1 replies◆ premiumSpot GPUs are often 60-90% cheaper, and they vanish with two minutes' warning. The savings are only real if a preemption costs you minutes, not the run. Here is how to make that true.Open full answer →
40Your INT4-quantized model lost too much accuracy. How do you recover it?▼hardNVIDIAHugging FaceDatabricks2 replies◆ premiumNaive 4-bit quantization can tank quality, and the reflex to give up and serve fp16 leaves a big speedup on the table. The accuracy is usually recoverable. Here is the ladder of fixes.Open full answer →
41Your inference p50 is fine but p99 latency spikes under load. How do you fix tail latency?▼hardNVIDIAOpenAIAWS2 replies◆ premiumUsers feel the p99, not the median, and the tail is where serving systems quietly fail. The causes are queuing and batching effects, not a slow model. Here is how to flatten it.Open full answer →
42You have more models than GPUs. How do you share GPUs across many models and teams?▼hardNVIDIAAWSDatabricks1 replies◆ premiumDedicating a GPU per model strands most of a fleet on idle silicon. Sharing safely is a real systems problem with four distinct mechanisms, each tuned to a different traffic shape. Here is how to pick.Open full answer →
43Your inference server OOMs when requests arrive with long prompts. How do you handle variable-length memory?▼hardNVIDIAOpenAITogether1 replies◆ premiumA serving box that's stable on short prompts crashes the moment a 30k-token request lands, because KV-cache memory scales with sequence length times batch. Here is how to bound it without crashing.Open full answer →
44Your large-model pretraining hits sudden loss spikes that don't recover. How do you stabilize it?▼hardOpenAIMetaGoogle2 replies◆ premiumAt billion-parameter scale, training can be cruising and then the loss jumps and never comes back, burning a fortune in compute. The causes and the playbook are well-known to the few who've done it. Here it is.Open full answer →
46What is chunked prefill, and how does it stop long prompts from stalling decode?▼hardNVIDIAOpenAIMicrosoft1 replies◆ premiumA single long prompt can freeze every other user's token stream for hundreds of milliseconds. Chunked prefill slices that prompt so decode keeps flowing. Here is the mechanism and the knob that controls it.Open full answer →
47How does prefix caching work internally in an LLM server, and when does it actually help?▼hardOpenAIAnthropicNVIDIA1 replies◆ premiumA shared system prompt gets re-prefilled on every request unless the server remembers it. Prefix caching skips that work, but only when the blocks line up exactly. Here is the hashing and eviction machinery underneath.Open full answer →
50How do you offload the KV cache to CPU or NVMe, and when is it worth the bandwidth hit?▼hardNVIDIAMicrosoftAWS1 replies◆ premiumGPU memory runs out long before you run out of conversations to cache. Offloading KV to CPU or NVMe buys capacity, but the interconnect can become the new bottleneck. Here is the bandwidth math.Open full answer →
51You quantized your serving model to FP8 and throughput doubled. How do you prove accuracy held?▼hardNVIDIAOpenAIDatabricks2 replies◆ premiumFP8 serving is fast and usually fine, until it silently degrades on the one workload your benchmark did not cover. The signal is knowing what FP8 breaks and how to validate it. Here is the recipe.Open full answer →
52What is the serving overhead of structured (JSON/grammar-constrained) output, and how do you cut it?▼hardOpenAIAnthropicNVIDIA2 replies◆ premiumForcing valid JSON sounds free, but the mask computation can stall every decode step. The fix is precompiling the grammar into a fast automaton. Here is where the cost hides and how to remove it.Open full answer →
53How do you serve multiple models on shared GPUs using MIG, MPS, or model swapping?▼hardNVIDIAAWSMicrosoft1 replies◆ premiumMost models do not fill a GPU, so one model per GPU burns money. The three sharing mechanisms (MIG, MPS, swapping) have very different isolation and overhead. Here is how to pick.Open full answer →
54Traffic arrives in sharp bursts and your LLM p99 spikes each time. How do you absorb the bursts?▼hardOpenAIAWSNVIDIA2 replies◆ premiumAutoscaling reacts in minutes, but a burst hits in seconds, and the gap is where your tail latency dies. Absorbing bursts is about buffers and shedding, not just adding replicas. Here is the playbook.Open full answer →
56Walk through the ZeRO stages and FSDP internals. Where does the memory actually go and when is it gathered?▼hardMicrosoftMetaNVIDIA1 replies◆ premiumZeRO and FSDP both shard training state across data-parallel ranks, but the magic is in when each shard is gathered and freed. Get the memory accounting and the all-gather timing and you can size any run.Open full answer →
57Beyond basic gradient checkpointing, how do you choose selective activation recomputation to maximize MFU?▼hardNVIDIAGoogleMeta2 replies◆ premiumFull activation checkpointing saves memory but burns a flat 30% extra compute. Selective recomputation recovers most of that by only recomputing the cheap, memory-heavy operations. Here is how to pick what to recompute.Open full answer →
58How do you overlap communication with computation in distributed training, and how do you verify it works?▼hardNVIDIAMetaGoogle1 replies◆ premiumThe collective communication in distributed training is pure overhead unless it runs while the GPU computes. Hiding it is the difference between 30% and 55% MFU. Here is how the overlap actually works and how you confirm it on a trace.Open full answer →
61Design fault-tolerant checkpointing for a 1000-GPU training run. How do you minimize lost work on a failure?▼hardMetaNVIDIAMicrosoft2 replies◆ premiumOn a thousand GPUs something fails every few hours. The question is not whether you lose a node, but how many GPU-hours you lose when you do. Checkpoint frequency, sharded writes, and fast restart decide that.Open full answer →
62Your training collectives are slow. How do you debug the NCCL/interconnect path and find where bandwidth is lost?▼hardNVIDIAMetaMicrosoft2 replies◆ premiumWhen all-reduce is the bottleneck, the cause is almost always a misconfigured path: traffic on the wrong link, a downed NIC, or a topology NCCL never discovered. Here is the systematic way to find the lost bandwidth.Open full answer →
64Your activations for one long sequence no longer fit on a GPU. Explain context parallelism and ring attention.▼hardNewNVIDIAAnthropicOpenAI◆ premiumData, tensor, and pipeline parallelism all leave one sequence's activations on one device, so 200k+ token training hits a wall none of them can fix. The fourth axis shards the sequence itself, and the interview lives in the communication math.Open full answer →
65Reasoning models made your traffic decode-heavy: 30k thinking tokens per request. What changes in your serving stack?▼hardNewOpenAIAnthropicNVIDIA◆ premiumWhen every request thinks for 30,000 tokens, serving flips from compute-bound prefill to memory-bound decode, and the KV cache becomes the resource you actually schedule. The levers that ruled chat traffic stop being the ones that matter.Open full answer →
01A tool-using agent reads untrusted web content. How do you defend against prompt injection?▼hard★ EssentialAnthropicOpenAIMicrosoft3 repliesunlockedPrompt injection has no single fix, and 'sanitize the input' fails the round. The signal is defense in depth: privilege boundaries, treating retrieved content as data not instructions, and a human gate on irreversible actions. Here is the layered answer.Open full answer →
02How do you handle PII and data governance for an enterprise LLM deployment (SOC 2, GDPR, the EU AI Act)?▼hard★ EssentialMicrosoftGoogleDatabricks2 repliesunlockedThe CISO-facing question that sinks engineers who only think about model quality. The signal is treating governance as architecture, not a checkbox: minimization, isolation, auditability, and never training on customer data by default. Here is the framework.Open full answer →
03Design an evaluation and guardrail stack for an LLM feature: jailbreaks, toxicity, and hallucination.▼hard★ EssentialAnthropicOpenAIGoogle2 repliesunlockedShipping an LLM feature safely is an evaluation problem before it is a model problem. The signal is a layered eval-plus-guardrail design with honest, segmented metrics, not a single 'safety classifier.' Here is how to measure and defend each failure mode.Open full answer →
04How do you detect and mitigate bias in an ML model used for consequential decisions?▼hardGoogleMicrosoftAmazon1 repliesunlockedFairness questions trip up engineers who treat it as a vibe. The signal is knowing the formal fairness metrics conflict mathematically, that you must pick one deliberately for the context, and where in the pipeline bias enters. Here is the rigorous, honest answer.Open full answer →
07What are data poisoning and ML supply-chain attacks, and how do you defend against them?▼hard★ EssentialGoogleMicrosoftAnthropic1 repliesunlockedMost ML security focuses on inference-time attacks; this asks about the training pipeline, where a poisoned dataset or a tampered dependency can plant a backdoor that clean-data evaluation never sees. The signal is knowing the attack classes and that defense is provenance, not a single model fix.Open full answer →
08Explain differential privacy and privacy-preserving ML (DP-SGD, federated learning). When do you use them?▼hardGoogleAppleMicrosoft2 repliesunlockedPrivacy is a governance requirement that becomes a training-time technique. The signal is knowing what differential privacy actually guarantees (and its cost), and how federated learning and DP combine. Here is the rigorous, honest answer.Open full answer →
09Explain model extraction and membership inference attacks, and how you defend against them.▼hardGoogleMicrosoftAnthropic2 repliesunlockedTwo attacks that hit a deployed model's confidentiality: stealing its functionality through the API, and inferring who was in its training data. The signal is naming the exact mechanism each exploits and that every defense trades against utility.Open full answer →
15What is federated learning, and how do you defend it against a poisoning participant?▼hardGoogleAppleNVIDIA1 replies○ sign inFederated learning trains across decentralized devices without centralizing data, but a malicious participant can poison the shared model. The signal is the privacy mechanism plus the outlier-resistant aggregation defenses. Here is the answer.Open full answer →
21What is machine unlearning, and how do you make a model 'forget' specific data?▼hardGoogleMicrosoftApple2 replies◆ premiumGDPR erasure and copyright takedowns demand removing a user's influence from trained weights, not just a dataset row. The signal is knowing why deletion isn't enough and where retrain, SISA, and approximate scrubbing each land on the cost-versus-proof curve.Open full answer →
27What is confidential computing (secure enclaves / TEEs), and when is it used for AI?▼hardMicrosoftGoogleNVIDIA2 replies◆ premiumEncryption covers data at rest and in transit, but the moment you compute on it the data sits in cleartext in memory. Confidential computing closes that gap. The signal is the TEE concept, attestation, and the AI workloads that actually need it.Open full answer →
28What are the main privacy-preserving ML techniques, and how do they differ?▼hardGoogleAppleMicrosoft1 replies◆ premiumPrivacy in ML is a toolbox, not a single switch, and each tool defends a different threat. The signal is mapping DP, federated learning, confidential computing, encryption, and minimization to what they actually protect, and knowing they compose.Open full answer →
30What are gradient inversion attacks, and why do they threaten federated learning?▼hardGoogleAppleMicrosoft2 replies◆ premiumFederated learning ships gradients, not raw data. The catch: a gradient is computed from the data, so it carries the data. The signal is knowing why 'we only share gradients' is not a privacy guarantee. Here is the answer.Open full answer →
31What is indirect prompt injection, and why is it so dangerous for RAG and agents?▼hardAnthropicOpenAIMicrosoft1 replies◆ premiumDirect injection is the user attacking the prompt. Indirect injection hides the attack inside a page, doc, or email the model reads. The signal is realizing retrieved and tool data is untrusted and can hijack the model. Here is the answer.Open full answer →
33Your RAG system can surface documents a user shouldn't see. How do you enforce authorization in retrieval?▼hardGleanMicrosoftSalesforce2 replies◆ premiumAn enterprise RAG that retrieves across everyone's documents is a breach waiting to happen. The fix lives in the retrieval layer, not the prompt. Here is the design that survives a security review.Open full answer →
35Your model regurgitates verbatim training data, including PII. How do you prevent memorization?▼hardAnthropicOpenAIGoogle DeepMind1 replies◆ premiumLarge models memorize and can be prompted to emit training examples verbatim, a real privacy and copyright liability. The defenses span data, training, and output. Here is the layered answer.Open full answer →
36Your model denies someone a loan, and they demand to know why. How do you handle the right to explanation?▼hardCapital OneStripeGoogle2 replies◆ premiumFor consequential decisions, 'the model said so' is not a legal answer. Adverse-action notices and the right to explanation constrain what model you can even ship. Here is the governance view.Open full answer →
38Design data isolation for a multi-tenant AI SaaS so one customer's data can never leak to another.▼hardSalesforceGleanSnowflake2 replies◆ premiumAI features open cross-tenant leak paths that classic SaaS isolation never had to think about: shared embeddings, shared caches, and fine-tunes that memorize. One leak ends an enterprise contract. Here is the isolation model.Open full answer →
39A user invokes their right to be forgotten. How do you delete their data across the whole ML stack?▼hardAppleGoogleMeta2 replies◆ premiumDeleting a row is easy. Deleting a person's influence from embeddings, caches, derived datasets, and a trained model is not. GDPR and CCPA require it anyway. Here is the plan that survives an audit.Open full answer →
40Your agent reads untrusted content and can send data externally. How do you stop prompt-injection data exfiltration?▼hardAnthropicOpenAIMicrosoft2 replies◆ premiumWhen an agent holds private data, reads untrusted text, and can communicate out, injected instructions can steal data. This 'lethal trifecta' is the defining agent vulnerability. The fix is architectural, not a better prompt.Open full answer →
41Threat-model an LLM application from scratch. What is the attack surface and how do you reason about it?▼hardMicrosoftGoogleAnthropic1 replies◆ premiumBefore listing defenses, a security engineer maps the attack surface systematically. LLM apps have a wider, weirder surface than classic software. Here is how to threat-model one end to end.Open full answer →
42What are multi-turn jailbreaks like crescendo, and why do single-turn filters miss them?▼hardAnthropicOpenAIMicrosoft1 replies◆ premiumA request that would be refused in one message often succeeds when spread across ten. The signal is understanding that conversational state is part of the attack surface, and that turn-by-turn classifiers see only fragments.Open full answer →
43How do attackers smuggle prompt injections past filters using encoding and obfuscation?▼hardAnthropicOpenAIMicrosoft1 replies◆ premiumbase64, leetspeak, invisible Unicode, and foreign scripts all let a payload read as gibberish to your filter but as a clear instruction to the model. The signal is knowing why the model decodes what the classifier cannot.Open full answer →
44Give a taxonomy of LLM jailbreaks and the layered defenses that actually hold up.▼hardAnthropicOpenAIGoogle1 replies◆ premiumRoleplay, obfuscation, optimization-based suffixes, and multi-turn escalation are different attack classes that need different defenses. The signal is organizing the space and pairing each class with a control instead of hoping one filter covers all.Open full answer →
45What are backdoor (trojan) attacks on ML models, and how do you detect a poisoned model?▼hardGoogleMicrosoftAnthropic1 replies◆ premiumA backdoored model behaves perfectly until it sees a secret trigger, then flips. The signal is explaining why clean test accuracy never reveals it, and what detection actually buys you when the trigger is unknown.Open full answer →
47How do tool-result and memory poisoning attacks compromise an AI agent, and how do you defend?▼hardAnthropicOpenAIMicrosoft1 replies◆ premiumAn agent that trusts its tools and its own memory can be steered by a single poisoned record that resurfaces turns or sessions later. The signal is seeing persistent state as an attack surface, not just the live prompt.Open full answer →
48What are the data-exfiltration channels in an AI agent, and how do you close them?▼hardAnthropicOpenAIMicrosoft2 replies◆ premiumA hijacked agent does not need a 'send email' tool to leak secrets. A rendered markdown image, a URL parameter, or a DNS lookup is enough. The signal is enumerating the covert channels and locking down egress, not just tools.Open full answer →
49Why is 'the model is not a trust boundary' the core principle of secure RAG, and how do you build on it?▼hardAnthropicMicrosoftGoogle2 replies◆ premiumAsking the model to keep secrets or enforce permissions is asking the wrong component. The signal is enforcing access control before retrieval, in code you trust, and treating the LLM as untrusted compute over already-authorized data.Open full answer →
50How do you set and spend an epsilon budget when deploying differential privacy in practice?▼hardAppleGoogleMicrosoft1 replies◆ premiumEpsilon is the privacy knob, and shipping DP means choosing a number, defending it, and tracking what each query spends. The signal is treating epsilon as a finite budget with composition, not a magic constant. Here is the answer.Open full answer →
51When is federated learning actually worth it versus centralizing the data?▼hardGoogleAppleNVIDIA1 replies◆ premiumFederated learning keeps data on-device, but it costs you accuracy, debuggability, and engineering complexity. The signal is naming when those costs are justified and when a simpler centralized pipeline with DP wins. Here is the answer.Open full answer →
54Walk me through how you run a bias and fairness audit on a deployed model.▼hardMicrosoftGoogleLinkedIn1 replies◆ premiumA fairness audit is a defined process: pick protected attributes, choose metrics that fit the harm, measure disaggregated performance, and document findings. The signal is knowing the metrics conflict and which one the use case demands. Here is the answer.Open full answer →
57Under the EU AI Act, what concrete obligations attach to a high-risk system versus a GPAI model?▼hardMicrosoftGoogleOpenAI1 replies◆ premiumThe EU AI Act assigns different duties to high-risk deployers, GPAI model providers, and limited-risk systems. The signal is naming the specific obligations per tier, not just reciting that risk tiers exist. Here is the answer.Open full answer →
58Your agent calls tools on behalf of users. How do you design its identity, credentials, and authorization?▼hardNewGleanSierraAnthropic◆ premiumAn agent running on one over-privileged service account is a confused deputy waiting to happen. The signal is per-user delegated credentials, token exchange, per-tool scopes, and an audit trail that names the human. Here is the answer.Open full answer →
59Your reviewers agree with the AI 98% of the time. Is your human-in-the-loop a real control or a rubber stamp?▼hardNewGoogleMicrosoftAnthropic◆ premiumEvery high-risk AI design ends with 'and a human reviews it.' Almost nobody measures whether that review produces any independent signal. Here is how to tell, and how to build oversight that can still disagree.Open full answer →
44A deployment to a customer's production environment failed. Walk me through how you recovered.▼hardPalantirDatabricksScale AI2 replies◆ premiumA failed prod deployment is a stress test of judgment under pressure. Interviewers want to see stabilize-first instincts, clean communication, and a root-cause fix that prevents a repeat. Here is the arc.Open full answer →
50Tell me about an ethical dilemma where you had to push back on something you were asked to do.▼hardAnthropicGooglePalantir2 replies◆ premiumEthical pushback tests integrity and judgment under pressure. Interviewers want principled, specific action, not a generic statement of values. Here is the arc that signals real backbone.Open full answer →
52A key customer is about to churn. Walk me through how you would try to save the account.▼hardSalesforceDatabricksSnowflake2 replies◆ premiumSaving a churning account is diagnosis under pressure: find the real reason, fix what you can, and earn back trust with action. Interviewers want a method, not a discount. Here is the move.Open full answer →