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 361–390 of 511 results
Design a complete machine learning ranking system for personalized content, covering architecture, features, training, serving, and production considerations.
Model answerrankingrecommendation-systemsml-systemsproduction-mlDerive gradients for each weight matrix in a chain of matrix products using the chain rule and implement an efficient backward pass.
Model answerbackpropagationmatrix-calculusgradient-descentGiven a binary classifier with train AUC 0.95, random-split val AUC 0.62, and time-holdout AUC 0.55, systematically identify and fix every failure mode.
Model answerdata-leakagefeature-driftmodel-calibrationcross-validationDesign an approach to evaluate applicants below your model's training range when historical approval data exists only above a credit score threshold.
Model answermodel-extrapolationdistribution-shiftreject-inferenceBuild a complete ML classification system: data splits, preprocessing, model training and tuning, evaluation metrics, serialization, and a batch inference entry point.
Model answerclassificationscikit-learnfeature-engineeringmodel-evaluationDesign an end-to-end ML system that predicts when a parcel will arrive, covering target definition, features, leakage prevention, uncertainty, and production monitoring.
Model answerml-system-designtime-to-eventfeature-engineeringdata-leakageDesign a personalized restaurant ranking system for a food-ordering app, covering retrieval, ranking, cold start, implicit feedback, and offline/online evaluation.
Model answerrecommendation systemstwo-tower modelcold startimplicit feedbackWalk through how you evaluate NLP classification models, covering core metrics, business tradeoffs, class imbalance, and connecting evaluation choices to real decisions.
Model answerclassificationmetricsnlpevaluationDesign a binary text classifier that uses only per-token log-probabilities from an LLM helper, covering scoring math, batching, calibration, and evaluation.
Model answerllmclassificationnumerical-stabilitycalibrationDesign an ML pipeline to forecast user conversion probability in real-time programmatic advertising, covering labeling, features, modeling, and production deployment.
Model answermachine-learningclassificationimbalanced-datafeature-engineeringDesign an end-to-end ML ranking system for a financial product marketplace that maximizes revenue while managing delayed labels, sparse conversions, and cold-start challenges.
Model answerrankingmulti-task-learningdelayed-feedbackrecommendation-systemsDesign a machine learning system that delivers personalized, geographically relevant place recommendations with sub-200ms latency at scale.
Model answerrecommender-systemsgeospatialreal-time-mlrankingDesign a video recommendation system that handles users with no history and videos with no engagement data while meeting strict latency requirements.
Model answerrecommendation systemscold startmachine learningsystem designDesign the full measurement stack for an ML-powered audio moderation system: product and model metrics, SLOs, alerting, and safe rollout strategy.
Model answermetrics-designml-monitoringexperimentationtrust-and-safetyDesign a multi-turn AI support agent that retrieves documentation, reasons about queries, and optimizes conversation strategy using retrieval systems and RL.
Model answernlpreinforcement-learningragllm-agentsDefine precision and recall, compare L0/L1/L2/L∞ penalties, state linear regression assumptions, and contrast linear with logistic regression.
Model answerregularizationclassification-metricsregressionlogistic-regressionDesign, fine-tune, and operate a Transformer-based LLM on a specialized corpus while preserving general capabilities and controlling hallucinations in production.
Model answertransformersllmfine-tuninghallucinationBuild a complete scikit-learn pipeline with preprocessing, regularization, proper validation, and interpretation for predicting marketing signups.
Model answerregressionregularizationcross-validationfeature-engineeringBuild a retrieval-augmented generation system that answers developer questions from internal documentation using embeddings and language model APIs.
Model answerretrieval-augmented-generationembeddingsllm-orchestrationvector-searchExplain how decision trees partition data, how splits are scored for classification vs regression, how hyperparameters control overfitting, and how ensemble methods improve on a single tree.
Model answerdecision-treesrandom-forestgradient-boostingbias-varianceBuild a streaming anomaly detection architecture that processes millions of requests per second, handles extreme class imbalance, and maintains feature consistency.
Model answerml-systemsstreamingfeature-engineeringlabelingBuild a complete, leak-free machine learning pipeline — preprocessing, training, and evaluation — using only NumPy and pandas, no ML libraries.
Model answersupervised-learninggradient-descentfeature-engineeringDesign an ML system that converts natural-language requests into validated formula expressions grounded in a live table schema, with optional write-back to the data source.
Model answerllm-orchestrationschema-groundingstructured-outputprompt-engineeringDesign an ML system to forecast whether orders will arrive after their promised time, covering feature engineering, temporal validation, calibration, and production deployment.
Model answerml-system-designclassificationtemporal-datacalibrationExplain key machine learning and large language model concepts including metrics, model types, benchmarking, inference optimization, and deployment considerations.
Model answermachine-learningllmproductionevaluationDesign a system to detect and prevent fabricated information in AI-generated clinical summaries, addressing severe class imbalance in the detection model.
Model answerllmclass-imbalancehealthcareragDesign an end-to-end ML system that estimates, for each active user, the probability of leaving their current employer in each of the next K months.
Model answersurvival-analysishazard-modelingfeature-engineeringleakage-preventionExplain model generalization, learning curve diagnosis, regularization methods, and the computational mechanics of attention in sequence models.
Model answeroverfittingregularizationtransformersattentionDesign an end-to-end retrieval-augmented generation architecture for customer support that meets p99 latency targets under 1.5s while handling multi-tenancy and scale.
Model answerretrieval-augmented-generationsystem-designlatency-optimizationvector-searchBuild a system that dynamically assigns prefill and decode stages of large language model inference to heterogeneous hardware pools based on profiled capabilities.
Model answerml-systemsinferenceschedulingresource-management