Topic
Machine Learning interview problems
Modeling, evaluation, ML systems and LLM engineering. 511 original problems, each with a worked model answer.
27 easy274 medium210 hard
Showing 181–210 of 511 results
Design candidate generation, ranking features, and exploration policies to serve zero-history users and rank newly published content in a large-scale video streaming system.
Model answerrecommendation-systemscold-startcandidate-generationrankingArchitect an end-to-end video recommendation system covering objective setting, matrix factorization baselines, multi-stage retrieval/ranking, feature engineering, and evaluation strategies.
Model answersystem-designrecommendation-systemsmatrix-factorizationmulti-stage-rankingPlan how to make a fine-tuned BERT-style text model faster and cheaper to serve, across model, runtime and request-path changes, while proving accuracy has not dropped.
Model answerbertinference-optimizationquantizationdistillationImplement a production-grade multi-head attention module in PyTorch, handle numerical precision and causal masking, and analyze performance trade-offs for large sequences.
Model answerdeep learningattentionpytorchtransformersA guide to designing temporal offline evaluation, position-bias correction, diagnostic leakage checks, multi-stage deployment, and online-offline metric alignment for search ranking models.
Model answerlearning to rankmodel validationposition biasmonitoringDesign an ML system that estimates whether a user will comment on a post in a community forum, emphasizing feature pipelines, training-serving consistency, and low-latency model deployment.
Model answerml-system-designfeature-storemodel-servingrankingDesign an end-to-end ML architecture to optimize feed ad click-through rates, detailing metric trade-offs, multi-stage serving pipelines, graph/two-tower embeddings, and bias mitigation.
Model answersystem designrecommendation systemsclick-through rateembeddingsArchitect end-to-end RAG pipelines, optimize knowledge graph maintenance costs, evaluate LLM reliability, and master attention and fine-tuning mechanics.
Model answerRAGLLM EvaluationTransformersLoRADiagnose a CIFAR-10 PyTorch job that stalls, hits NaNs, or runs slowly, then scale it with FSDP, reason about sparse gradient communication, and decide when custom kernels pay off.
Model answerpytorchdebuggingfsdpdistributed-trainingDesign a full forecasting pipeline for next-day electricity use across many commercial buildings, from features and validation through deployment, monitoring, privacy and an ablation study.
Model answertime-seriesregressionfeature-engineeringmlopsWalk through one supervised ML project end to end, covering leakage, time-aware validation, feature choices and tuning, then derive PCA and explain SHAP and its pitfalls.
Model answerpcashapleakagetime-series-validationDesign a pipeline that adds LLM-written narrative insights to existing supply-chain reports while keeping numbers exact, data secure, and outputs verified before delivery.
Model answerllmraggroundingevaluationExplain how self-attention builds queries, keys and values, what the value vectors do, and why Transformers handle long-range context better than recurrent models.
Model answertransformersself-attentionqkvmulti-head-attentionA five-part conceptual walkthrough covering ensembles of trees, supervised training, evaluation under imbalance, embeddings, and the basics of transformer attention.
Model answerdecision-treesgradient-boostingoverfittingevaluation-metricsCompare neighborhood and matrix factorization recommenders, and explain loss, regularization, cold start, popularity bias, evaluation and large-catalog scaling.
Model answerrecommender-systemscollaborative-filteringmatrix-factorizationimplicit-feedbackDesign an interpretable, recall-oriented classifier that predicts whether a tax-software user should itemize deductions, covering preprocessing, features, imbalance-aware metrics and time-aware validation.
Model answerclassificationimbalanced-datafeature-engineeringtime-based-validationWrite a stable NumPy loss for sequence models that skips padded positions, smooths the target distribution, rescales logits by temperature, and returns the exact gradient with respect to the logits.
Model answercross-entropylabel-smoothingnumpysoftmaxCompare logistic regression, random forests and boosted trees for predicting loan default, and explain how to validate them, treat rare defaults, and keep decisions explainable.
Model answercredit-riskgradient-boostingclass-imbalancemodel-interpretabilityContrast sharding weights within each transformer layer against assigning consecutive layers to different devices, covering communication, bubbles, memory, and inference latency.
Model answerdistributed-trainingtensor-parallelismpipeline-parallelismtransformersDesign an ML-driven system that screens uploaded and already-published videos for policy violations, blends automation with human reviewers, supports appeals, and resists evasion.
Model answerml-system-designcontent-moderationmultimodalhuman-in-the-loopWork out how much accelerator memory a language-model fine-tuning job needs, covering weights, gradients, optimizer state, activations, buffers, and parallelism, for both full and LoRA-style tuning.
Model answerllmfine-tuninggpu-memoryloraDesign a sub-100ms ML pipeline that picks and ranks open, deliverable restaurants for each user's homepage carousel, covering retrieval, ranking, cold start, and evaluation.
Model answerrecommender-systemscandidate-generationrankinggeospatialDesign how to measure, gate, monitor, and debug a retrieval-augmented assistant that serves regulated, multi-tenant content, including root-cause triage of bad answers.
Model answerragllm-evaluationmlopsllm-as-judgeExplain why gradients can shrink as they flow backward through depth or time, how to detect it, and which fixes apply to which architectures, without confusing it with convergence.
Model answerdeep-learningbackpropagationvanishing-gradientsinitializationWalk through how a foundation model becomes a safe, helpful assistant: pretraining, SFT versus preference optimization, reward modeling pitfalls, and evaluation including reward hacking detection.
Model answerllmrlhfdporeward-modelingDescribe a signal-research project you built, defending how the signal was defined, scored, modeled and validated, and what the evidence does and does not prove.
Model answerquant-researchinformation-coefficientbacktestingfeature-engineeringDesign an automated platform that checks new LLM versions and sampled production traffic for correctness, safety, and regressions, with reproducible runs and clear interfaces.
Model answerllm-evaluationml-system-designllm-as-judgeregression-testingDescribe how a sparse top-k expert feed-forward layer processes a token batch, and how placing experts on different devices changes communication, balance, and memory.
Model answermixture-of-expertsexpert-parallelismdistributed-trainingroutingDesign an ML pipeline that builds personalized ranked product lists, using collaborative filtering and ranking models while respecting user role, context, and business constraints.
Model answerrecommender-systemscollaborative-filteringlearning-to-rankembeddingsWrite a Transformer layer with masked multi-head self-attention, a gated Swish feed-forward network, residual paths and layer norm, and explain its shapes, masking and complexity.
Model answertransformermulti-head-attentionswiglulayer-normalization