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 91–120 of 510 results
Design a way for a language model to spot questions that need information newer than its training data and to tell the user clearly where its knowledge stops.
Model answerllmcalibrationabstentionfine-tuningCompare classifier evaluation metrics, contrast L1 and L2 penalties, and plan a controlled ablation study that isolates which pipeline components drive an NLP system's quality.
Model answerevaluation-metricsregularizationablation-studyroc-aucPlan an end-to-end migration from a legacy ad-ranking model to a new one, covering offline validation, off-policy estimates, staged online rollout, conflicting-metric decisions and production risks.
Model answerads-rankingoff-policy-evaluationab-testingmodel-rolloutDesign a weekly batch churn-prediction system for millions of subscribers, covering leakage-free features, rare positives, time-aware validation, metrics, and drift monitoring.
Model answerchurn-predictiondata-leakageclass-imbalancebacktestingWire together a given embedder, vector store and LLM into a retrieval-augmented question-answering flow, then justify vector similarity search and when this approach beats alternatives.
Model answerragembeddingsvector-searchcosine-similarityDesign and code a clustering routine for an endless stream of numbers that keeps only small per-cluster summaries, and discuss seeding, convergence, outliers, drift, and testing.
Model answerstreamingonline-clusteringk-meansconcept-driftDiscuss where deep learning frameworks are heading, then contrast PyTorch and JAX on execution model, compilation, and ecosystem, and say when you would choose each.
Model answerpytorchjaxml-frameworkscompilersWeigh PPO-based RLHF against DPO, use AI-generated feedback when labels are scarce, and diagnose and fix a model that over-refuses harmless requests after alignment.
Model answerrlhfdporlaifllm-alignmentExplain the mathematical derivation, key theoretical assumptions, numerical considerations, and regularized extensions of ordinary least squares (OLS).
Model answerlinear-regressionleast-squaresconvex-optimizationmachine-learningDesign a model that estimates the chance a user clicks a recommended track, covering song representation, sparse feature handling, algorithm choice, calibration, and offline and online evaluation.
Model answerctr-predictionrecommendationembeddingssparse-featuresFit an unpenalized binary logistic regression with an intercept on a features-by-samples matrix, then return the three predictors with the largest absolute coefficients.
Model answerlogistic-regressionfeature-importancenumpyirlsDesign a calibrated probabilistic model that scores dispute cases for fraud despite informative missing data, shifting base rates, and cost-sensitive routing decisions.
Model answerbayesian-inferencecalibrationmissing-datalabel-shiftAnalyze and contrast mean imputation, empirical sample imputation, and missingness indicator techniques in linear models across MCAR, MAR, and MNAR data mechanisms.
Model answermachine-learningstatisticsdata-preprocessingfeature-engineeringUnderstand Transformer positional encodings, including self-attention permutation properties, sinusoidal vs. learned schemes, linear shift derivations, and relative methods.
Model answertransformerspositional-encodingattentiondeep-learningA foundational machine learning assessment covering model capacity trade-offs, handling heavily skewed class distributions, and processing incomplete data features.
Model answerbias-varianceclass-imbalancemissing-datamachine-learningDesign an ML system that ranks a creative community's feed and also converts natural-language requests into validated, safe HTML/CSS components, including evaluation and feedback loops.
Model answerml-system-designrecommendationrankingllmExplain the bias-variance tradeoff, compare batch and layer normalization, and describe why gradients vanish in deep networks and how architecture can prevent it.
Model answerbias-variancebatch-normalizationlayer-normalizationvanishing-gradientsAnalyze the architecture, loss functions, training complexity, and theoretical connections between traditional PPO-based RLHF and Direct Preference Optimization (DPO).
Model answerLLMsRLHFDPOAlignmentDesign a service that reads long clinical notes, suggests ICD-10 codes with calibrated confidence and cited evidence, and learns from medical coder corrections over time.
Model answernlpextreme-multi-labelml-system-designlong-documentsDesign a scalable pipeline that scores noisy OCR pages, distills a small verified gold set from a stronger LLM, and filters out pages too degraded to repair.
Model answerllm-fine-tuningdata-pipelinesynthetic-dataocrAnalyze when an unconstrained scalar quadratic function has a finite minimum, and derive the optimal solution set and value using matrix properties.
Model answeroptimizationconvexitylinear-algebraquadratic-formLearn how to design a comprehensive test suite for computer vision and robotics systems when absolute ground truth is difficult to determine.
Model answercomputer-visiontestingroboticsground-truthExplain why decoder-only transformers use a KV cache and rotary embeddings, then implement a temperature-scaled nucleus (top-p) sampler over next-token logits.
Model answertransformerskv-cacheropetop-p-samplingDescribe how subword tokenizers such as SentencePiece work, what a Transformer block contains, and why recent LLMs replaced parts of the original design with RMSNorm, RoPE, and MoE.
Model answertokenizationtransformerssentencepieceropeAnalyze what happens when a feed-forward network starts with every weight and bias at zero, how symmetry persists, and why random scaled initialization resolves it.
Model answerweight-initializationbackpropagationsymmetry-breakingxavier-heDesign a question-answering system that retrieves evidence from a versioned, access-controlled document set, cites sources, abstains when unsupported, and measures retrieval and answer quality separately.
Model answerragretrievalevaluationchunkingDesign, optimize, and systematically evaluate an enterprise RAG system that processes heterogeneous documents, handles ACLs, and guarantees zero stale citations under high query throughput.
Model answerRAGSystem DesignVector SearchLLM EvaluationDesign an end-to-end ML system that ranks live channels for viewers, covering labels, features, models, bias correction, evaluation, and low-latency serving as streams start and end.
Model answerrecommender-systemstwo-towercounterfactual-learningexplorationLearn how to select decision thresholds, tune trade-offs under constraints like asymmetric costs and capacity, and design robust evaluation metrics for classification systems.
Model answerclassificationthreshold-tuningmodel-evaluationprecision-recallAnalyze sycophancy and emotional over-dependence in conversational LLMs, detailing root causes, evaluation metrics, algorithmic mitigations, and agency-preserving product controls.
Model answermachine-learningai safetyrlhfllm alignment