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 241–270 of 511 results
Explain the bias-variance decomposition, what a calibrated probability means and how to repair one, and how concept drift differs from covariate shift in production.
Model answerbias-variancecalibrationmodel-driftcovariate-shiftSpot every category of production risk in a passing-tests feature pipeline PR, then choose the right serving architecture for batch, near-real-time, and request-time features.
Model answerfeature engineeringtraining-serving skewfeature storeML infrastructureDesign and analyze a synthetic linear regression experiment that demonstrates how test error spikes near the interpolation threshold as sample size varies.
Model answerdouble descentgeneralizationlinear regressionbias-varianceDerive and interpret the recursive equations that relate current value to immediate rewards and future expected value in reinforcement learning.
Model answerreinforcement-learningmdpvalue-functionsdynamic-programmingWork through a screening-style ML set: pick the confusion matrix matching target TPR/FPR, hand-compute a sigmoid neuron, and justify activation choices per layer.
Model answerconfusion-matrixrocsigmoidactivation-functionsDesign a production RAG pipeline that ingests millions of documents, retrieves grounded context, and generates cited answers with low latency at scale.
Model answerRAGLLMvector-searchsystem-designDesign an end-to-end strategy to cut a 1,000-tree gradient-boosted ensemble's inference time from 120 µs to under 5 µs p99 without changing any prediction.
Model answerinference optimizationGBDTlow-latencySIMDDesign an ML system to identify threatening behaviors in live camera feeds, handling extreme class imbalance and deployment constraints.
Model answercomputer-visionreal-time-systemsrare-event-detectionml-system-designBuild an end-to-end platform for predicting user engagement likelihood, covering feature pipelines, online/offline stores, training workflows, and high-throughput inference.
Model answerml-systemsfeature-engineeringinference-architectureml-opsDesign a machine learning pipeline that extracts predictive signals from a high-volume social media stream and combines them with market data to forecast near-term stock returns.
Model answernlptime-seriesfeature-engineeringsignal-validationDesign a system for modeling the behavior of surrounding vehicles, pedestrians, and cyclists in a closed-loop driving simulator used to train and evaluate an autonomous driving agent.
Model answersimulationreinforcement-learningautonomous-drivingmulti-agentDesign a tabular regression pipeline that maps weather and turbine attributes at a single instant to power output, covering physics features, data cleaning, model choice, validation and calibrated uncertainty.
Model answerregressionfeature-engineeringgradient-boostingmodel-validationDesign a controlled offline evaluation framework to discover and measure universal adversarial triggers on a small language model like GPT-2, covering threat modeling, optimization concepts, metrics, and safety guardrails.
Model answeradversarial-robustnesslanguage-modelsred-teamingDesign an end-to-end analysis to find which listing, host, and market features causally drive booking conversion, then validate findings with experiments.
Model answercausal inferenceproduct analyticsfeature importanceexperimentationDesign a retrieval-augmented generation pipeline that enables lawyers to query internal memos with verified citations and strict access controls.
Model answerragnlpinformation-retrievalaccess-controlDiscuss K-Nearest Neighbors and Principal Component Analysis, covering their mechanics, hyperparameter selection, computational challenges, and when each method works well or fails.
Model answerknnpcadimensionality-reductionfundamentalsDesign a probabilistic classifier that marks rental listings as suitable for infants and children, covering labeling, features, modeling, evaluation, host gaming, fairness, and cold start.
Model answerml-system-designclassificationtrust-and-safetyfairnessWalk through a complete ML system you've owned, from problem definition through production deployment, then discuss resolving technical disagreements.
Model answerml-system-designproduction-mlcross-functional-collaborationBuild a sklearn Pipeline with gradient boosting, measure generalization via stratified 5-fold ROC-AUC, then refit on all data and save to disk.
Model answergradient-boostingcross-validationsklearnpipelineImplement the forward pass of a multi-head attention layer using only basic tensor operations, handling projections, head splitting, scaled dot-product attention, and masking.
Model answertransformersattentionnumpydeep-learningCritique a Python class that scales numerical features and encodes categorical ones, explaining its design pattern and identifying bugs.
Model answercode-reviewdata-preprocessingdata-leakageml-pipelineCompare convolutional and recurrent architectures, derive LSTM gating and tensor shapes, then implement and analyze a vectorized K-means with k-means++ seeding.
Model answercnnlstmk-meansExplain how batch and layer normalization differ in computation, statistics, parameters, and inference behavior, plus debugging approaches.
Model answernormalizationdeep-learningtraininginferenceExplain decoder-only Transformer internals, compare positional encoding schemes, choose a PEFT strategy, and design an evaluation pipeline for a production LLM.
Model answerllmtransformersfine-tuningpeftDesign an end-to-end offline evaluation pipeline for a binary content classifier, covering metrics, label collection, calibration, threshold choice, and fairness slicing.
Model answerclassificationprecision-recallfairnessclass-imbalanceDesign the full stack for a question-answering assistant: real-time serving, training data collection, RL reward design, and mitigations for reward failure modes.
Model answerrl-from-human-feedbackllm-servingreward-designragDesign a production agent system for financial analysts, covering model customization strategies, agent orchestration patterns, structured output enforcement, and multi-tenant serving.
Model answerllm-systemsagent-designfine-tuningproduction-mlDesign a system that uses LLMs to automatically rewrite a contract so it satisfies dozens of compliance rules, handling overlaps, conflicts, verification, and cost.
Model answerllm-agentsmulti-step-reasoningedit-trackingverificationArchitect a retrieval-augmented generation system that answers natural language queries over heterogeneous internal documents with strict permissions, low latency, and near-real-time freshness.
Model answerRAGLLMsystem-designinformation-retrievalDesign an end-to-end ML pipeline that selects and ranks paid listings in e-commerce search results, balancing advertiser value, user relevance, and platform revenue.
Model answerads rankingrecommendation systemsmulti-task learningauction design