KatInterview

practice a little every day — you've got this ♡

Machine Learning Interview Problems

Practice 5966 original coding, SQL, system design, machine learning and behavioral problems across 15 topics. Coding and SQL problems run against hidden test cases right in your browser; every problem has hints and a worked solution, free.

5966
Problems
2209
Auto-graded
15
Topics
271
Added today

Showing 481–510 of 510 results

  • Machine LearningHardModel answer
    Gradient Boosting Regularization and Fraud Detection Pipeline

    Design a complete gradient boosting pipeline for rare-event classification: explain the regularized objective, tune hyperparameters, and build a leakage-free validation strategy.

    Machine Learninggradient-boostingregularizationimbalanced-classificationmodel-validation
  • Machine LearningMediumModel answer
    Designing a Time-Aware Model for User Conversion Prediction

    Design an ML system to forecast user purchase likelihood while handling temporal constraints, severe class imbalance, and business-driven precision requirements.

    Machine Learningtime-seriesimbalanced-datafeature-engineeringmodel-evaluation
  • Machine LearningHardModel answer
    Model Selection and Threshold Tuning in Classification Tasks

    Analyze cost-sensitive threshold selection, compare ensemble methods for production systems, and explain how regularization penalties shape model weights.

    Machine Learningmodel-evaluationensemble-methodsregularizationcost-sensitive-learning
  • Machine LearningHardModel answer
    Anomaly Detection for Fraud: Methods and Evaluation Strategy

    Design an anomaly-based fraud detection system, select appropriate techniques, and define evaluation metrics when ground-truth labels are limited or biased.

    Machine Learninganomaly-detectionfraudevaluation-metricsunsupervised-learning
  • Machine LearningMediumModel answer
    Building Dual-Surface Content Recommendation Systems

    Design a recommendation platform that serves both an on-demand content feed and selective push notifications, balancing relevance with user attention costs.

    Machine Learningrecommendation-systemsrankingpersonalizationml-infrastructure
  • Machine LearningHardModel answer
    Building a Secure Enterprise Knowledge Search System

    Design a search system that answers questions from internal documents with citations while enforcing access permissions and preventing security exploits.

    Machine Learningretrievalsecurityragnlp
  • Machine LearningMediumModel answer
    Design a Batching Service for GPU Model Inference

    Build an online inference system that groups compatible GPU requests into batches to maximize throughput while meeting latency SLAs.

    Machine Learningml-systemsbatchingdistributed-systemsgpu
  • Machine LearningMediumModel answer
    Attention Mechanisms, Autoregressive vs Masked Models, and Metrics

    Explain attention in modern neural architectures, contrast autoregressive and bidirectional pretraining approaches, and discuss precision-recall tradeoffs.

    Machine Learningdeep-learningnlpevaluation-metrics
  • Machine LearningHardModel answer
    Building a Reliable Math Computation System with LLMs

    Architect a production system that uses language models to solve mathematical problems by orchestrating symbolic computation, code execution, and tool integration.

    Machine Learningllmtool-useevaluationproduction-ml
  • Machine LearningHardModel answer
    Build a Documentation and Data Q&A System with LLMs

    Design an end-to-end RAG system that answers questions from product documentation and queries user-specific metadata with secure, tenant-isolated access.

    Machine Learningretrieval-augmented generationllmsystem architectureauthorization
  • Machine LearningMediumModel answer
    Design and Deploy a Production ML System

    Describe a machine learning system you built from problem definition through deployment, covering architecture, modeling choices, evaluation, and production concerns.

    Machine Learningml-system-designproduction-mlarchitectureexperimentation
  • Machine LearningHardModel answer
    Multimodal ML Systems: Deployment, Retrieval, and Core Concepts

    Design and optimize a constrained multimodal serving system, build fast video retrieval, and explain dropout, normalization, overfitting, and RL-based LLM alignment.

    Machine Learningmultimodalretrievalnormalizationdropout
  • Machine LearningHardModel answer
    Design a Multi-Objective Ranking Model for Sponsored Products

    Build a ranking system for e-commerce ads that optimizes user engagement, advertiser outcomes, and platform revenue while handling cold-start and fairness.

    Machine Learningrankingmulti-task-learningadse-commerce
  • Machine LearningEasyModel answer
    Build a "You May Also Like" Item-to-Item Recommender

    Design and evaluate a simple item-to-item collaborative filtering system for an e-commerce platform recommending related products on a product detail page.

    Machine Learningmachine learningrecommendation systemscollaborative filteringevaluation
  • Machine LearningHardModel answer
    Distributed Matrix Multiplication Across Multiple GPUs

    Design a system to compute matrix multiplication distributed across two GPUs, handling partitioning, communication, compute overlap, and aggregation.

    Machine Learningdistributed-systemsgpu-computingparallel-algorithmsml-infrastructure
  • Machine LearningMediumModel answer
    Implementing Optimization via Gradient Descent for Regression

    Derive and implement batch gradient descent to minimize squared error for linear models, covering convergence criteria, step size selection, and regularization.

    Machine Learningoptimizationgradient-descentlinear-regressionregularization
  • Machine LearningMediumModel answer
    Bias-Variance Decomposition: Concepts, Math, and Model Choices

    Derive the bias-variance-noise decomposition of MSE, and explain how polynomial degree, dataset size, and L2 regularization shift each term.

    Machine Learningbias-variance tradeoffregularizationoverfitting
  • Machine LearningEasyModel answer
    Build a Content-Based Movie Recommender from Scratch

    Design and evaluate a simple content-based filtering system that recommends movies to a new user who has rated only a handful of films.

    Machine Learningmachine learningrecommendation systemscontent-based filteringfeature engineering
  • Machine LearningHardModel answer
    Build and Tune a K-Nearest Neighbors Classifier from Scratch

    Implement KNN without using a pre-built classifier, tune k via cross-validation, and generate predictions for an unlabeled dataset.

    Machine Learningknnclassificationhyperparameter-tuning
  • Machine LearningEasyModel answer
    Choose the Right Randomization Unit for an A/B Test

    Decide whether to randomize by user, session, or request for a new ML-powered feature, and explain the consequences of each choice.

    Machine Learningmachine learningonline experimentsA/B testingstatistics
  • Machine LearningHardModel answer
    Design an Online Experiment for a Two-Stage ML Ranker

    Design an A/B test to evaluate a new learned second-stage ranker, covering metric choice, experiment validity, novelty effects, and post-experiment rollout decisions.

    Machine Learningmachine learningonline experimentsrankingA/B testing
  • Machine LearningHardModel answer
    End-to-End Molecular Pair Regression System Design

    Design a complete ML pipeline to predict a real-valued interaction score for pairs of molecules, covering data quality, featurization, splitting, modeling, evaluation, and deployment.

    Machine Learningml-system-designcheminformaticsregressiongraph-neural-networks
  • Machine LearningHardModel answer
    Train a Fraud Detector Under Severe Class Imbalance

    Design and defend an end-to-end ML system for fraud detection where genuine fraud accounts for less than 0.1% of transactions.

    Machine Learningmachine learningclass imbalancefraud detectionevaluation
  • Machine LearningMediumModel answer
    Detect and Fix Feature Leakage in a Loan Default Model

    Identify subtle forms of target leakage in a credit risk pipeline and explain how to fix each without destroying predictive signal.

    Machine Learningmachine learningfeature leakagecredit riskdata preprocessing
  • Machine LearningHardModel answer
    Design an Online Experiment for a Ranking Model Upgrade

    Plan and analyze an A/B test for a new learning-to-rank model replacing a heuristic ranker in a content feed, handling interference, novelty effects, and metric trade-offs.

    Machine Learningmachine learningexperimentationrankingA/B testing
  • Machine LearningHardModel answer
    Detect and Correct Novelty Effects in an Online Ranking Experiment

    Design a rigorous experiment to identify, quantify, and correct for novelty and primacy effects when A/B testing a new ML-driven content ranking model.

    Machine Learningmachine learningonline experimentsA/B testingnovelty effect
  • Machine LearningMediumModel answer
    Choose the Right Metric for an Imbalanced Fraud Detector

    Decide which evaluation metrics best capture a fraud detection model's real-world performance when only 0.3% of transactions are fraudulent.

    Machine Learningmachine learningevaluation metricsimbalanced classificationfraud detection
  • Machine LearningMediumModel answer
    Build a 2D Convolution Forward Pass Without ML Libraries

    Implement conv2d from scratch in NumPy, correctly handling padding, stride, multi-channel inputs, and optional bias.

    Machine Learningconvolutionnumpydeep-learning-fundamentals
  • Machine LearningMediumModel answer
    Handle Cold-Start for New Items in a Recommendation System

    Design and evaluate a strategy to recommend newly added items before any user interaction data exists.

    Machine Learningmachine learningrecommendation systemscold startfeature engineering
  • Machine LearningEasyModel answer
    Spot and Fix Feature Leakage in a Churn Model

    Identify subtle data leakage in a customer churn prediction pipeline and explain how to fix it without sacrificing model utility.

    Machine Learningmachine learningfeature engineeringdata leakageclassification