Topic
Machine Learning interview problems
Modeling, evaluation, ML systems and LLM engineering. 510 original problems, each with a worked model answer.
27 easy273 medium210 hard
Showing 31–60 of 510 results
Architect an end-to-end RAG system capable of ingesting mega-documents and handling high-token, unstructured user inputs with low latency, strict permissions, and high citation fidelity.
Model answerragllmsearchvector-databaseAnswer five conceptual machine learning questions on regression assumptions, logistic loss, random forest feature sampling, Adam versus SGD, and narrow versus wide networks.
Model answerlinear-regressionlogistic-regressionrandom-forestadamA deep dive into Layer Normalization in Transformers: mathematical formulation, Pre-LN vs Post-LN gradient stability, RMSNorm/BatchNorm comparisons, and inference memory trade-offs.
Model answerlayer-normalizationtransformersdeep-learninggradientsArchitect a low-latency video feed and next-up system with focus on feature pipelines, stream joins, impression logging, and multi-objective ranking.
Model answermachine-learningsystem-designrecommendation-systemslogging-infrastructureDesign an ML-backed gate for a shared compute platform that flags abusive submitted code or text and predicts memory-exhaustion crashes, with low latency, high precision, and drift monitoring.
Model answerml-system-designcontent-moderationresource-forecastingadversarial-robustnessDiagnose and fix low GPU utilization and high latency in a large transformer serving fleet, covering KV cache memory, compute efficiency and multi-node communication.
Model answerllm-servingkv-cachequantizationtensor-parallelismDesign an end-to-end ML system that picks personalized ads for millions of users within a tight latency budget, covering data, models, exploration, evaluation and scaling.
Model answerctr-predictionrecommendationbanditscounterfactual-evaluationExplain OLS and its assumptions, compare bagging, random forests and boosting, handle a 0.2% positive class, and outline a forecasting pipeline for data with trend and seasonality.
Model answerolsensemblesclass-imbalancetime-seriesPick the one hyperparameter that, when lowered, makes a gradient-boosted tree ensemble more flexible, justify it, and describe how to confirm underfitting.
Model answergradient-boostingunderfittinghyperparameter-tuningbias-varianceDesign a robust system to classify genuine vs generated DNA sequences, leveraging a massive unlabelled real corpus, minimal ground-truth labels, custom negative generators, and bio-aware metrics.
Model answermachine-learningsequence-modelingsemi-supervised-learninganomaly-detectionCompare strategies for searching hyperparameters, from hand tuning to Bayesian and early-stopping methods, weighing cost, parallelism and sample efficiency.
Model answerhyperparameter-tuningbayesian-optimizationrandom-searchhyperbandBuild a greedy decoder and a width-k beam search over a next-token model, return each sentence with its probability, and explain why long outputs score low and how to correct it.
Model answerbeam-searchdecodinglanguage-modelslog-probabilitiesDesign an end-to-end ML recommender for a vertical clip feed with multi-stage retrieval and ranking, real-time learning, diversity and safety controls, and cold-start handling.
Model answerrecommendation-systemsml-system-designretrieval-and-rankingcold-startDesign a multi-stage retrieval system that surfaces the right database tables and analytical notebooks for an internal AI coding assistant answering data queries.
Model answerInformation RetrievalRAGSystem DesignML System DesignWalk through an end-to-end machine learning project lifecycle, covering framing, architecture, validation, monitoring, and causal business impact.
Model answerml-opsmodel-deploymentfeature-storedata-leakageAnswer nine practical questions on statistical testing, model fit, causality, representations, optimization, imbalanced data, misleading accuracy, and experiment sanity checks.
Model answerml-fundamentalsbias-variancegradient-descentimbalanced-dataDesign a leakage-safe pipeline that predicts 15+ minute late arrivals from pre-departure data: audits, time-based validation, models, explanations, stress tests, and an A/B plan.
Model answerdata-leakagetime-series-validationlightgbmcalibrationDescribe how to recognize a model that memorizes its training data, list ways to curb it, and contrast absolute-value and squared-weight penalties on a model's coefficients.
Model answeroverfittingregularizationbias-variancegeneralizationArchitect a scalable, low-latency system to score payment transactions for fraud under severe class imbalance and delayed feedback loops.
Model answersystem-designmachine-learningfraud-detectionfeature-storeExplain how random forests and gradient boosting reshape the bias-variance decomposition, derive the variance of correlated averages, and say when each ensemble is the better choice.
Model answerbias-variancerandom-forestgradient-boostingensemblesDescribe the building blocks of a language-model agent, what each is responsible for, and how they cooperate across a multi-step task with safety and evaluation in mind.
Model answerllm-agentstool-usememoryplanningWrite a decoder-only transformer from memory in PyTorch: embeddings, hand-written causal multi-head attention, feed-forward layers, residual wiring, and a logits head.
Model answertransformerpytorchself-attentioncausal-maskDesign a two-stage recommender for a content app where users and items are constantly new, covering models, exploration, off-policy evaluation, A/B testing and a strict latency budget.
Model answerrecommender-systemscold-starttwo-toweroff-policy-evaluationDerive the parameter update rules for mini-batch SGD (with and without momentum) and Adam, explain bias correction, and compare the two on speed, tuning, memory and generalization.
Model answeroptimizationsgdadamdeep-learningDesign an end-to-end search system for a mobile app marketplace covering retrieval, ranking, personalization, cold start, abuse prevention, experimentation, and the path from heuristics to learned ranking.
Model answersearchrankingml-system-designretrievalDesign an ML system that picks which candidate artwork to display for each title and viewer on a video streaming service, covering reward design, exploration, cold start, serving, and evaluation.
Model answercontextual-banditpersonalizationoff-policy-evaluationcold-startExplain when OLS is the best linear unbiased estimator, how correlated features inflate variance, and how attention, positional signals and long-context costs work in Transformers.
Model answerlinear-regressiongauss-markovmulticollinearitytransformersBuild a scikit-learn and imbalanced-learn workflow for a rare-positive dataset that avoids leakage, tunes the decision threshold, and reports precision, recall and F1 on untouched data.
Model answerimbalanced-learnsmotescikit-learnprecision-recallArchitect an end-to-end machine learning pipeline for real estate price prediction, covering EDA, spatial validation, feature scaling, GBDT baselines, and neural network regularization.
Model answertabular dataregressioncross-validationregularizationFind and fix the hidden bugs in a PyTorch encoder-decoder trainer where validation stays at chance, AMP crashes, and runs are not reproducible, then plan the debugging.
Model answertransformerspytorchdebuggingmixed-precision