KatInterview

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

ML Interview Problems

Practice 5974 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.

5974
Problems
2212
Auto-graded
15
Topics
269
Added today

Showing 361–390 of 511 results

  • Machine LearningHardModel answer
    Building an End-to-End ML Ranking Pipeline

    Design a complete machine learning ranking system for personalized content, covering architecture, features, training, serving, and production considerations.

    Machine Learningrankingrecommendation-systemsml-systemsproduction-ml
  • Machine LearningHardModel answer
    Gradient Computation Through Consecutive Matrix Multiplications

    Derive gradients for each weight matrix in a chain of matrix products using the chain rule and implement an efficient backward pass.

    Machine Learningbackpropagationmatrix-calculusgradient-descent
  • Machine LearningHardModel answer
    Diagnose a Churn Model That Collapses Out of Time

    Given 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.

    Machine Learningdata-leakagefeature-driftmodel-calibrationcross-validation
  • Machine LearningMediumModel answer
    Extending a Credit Model to Underserved Score Segments

    Design an approach to evaluate applicants below your model's training range when historical approval data exists only above a credit score threshold.

    Machine Learningmodel-extrapolationdistribution-shiftreject-inference
  • Machine LearningMediumModel answer
    Design a Tabular Classification Pipeline from Raw CSV to Deployment

    Build a complete ML classification system: data splits, preprocessing, model training and tuning, evaluation metrics, serialization, and a batch inference entry point.

    Machine Learningclassificationscikit-learnfeature-engineeringmodel-evaluation
  • Machine LearningHardModel answer
    Design an ML System to Forecast Shipment Arrival Time

    Design an end-to-end ML system that predicts when a parcel will arrive, covering target definition, features, leakage prevention, uncertainty, and production monitoring.

    Machine Learningml-system-designtime-to-eventfeature-engineeringdata-leakage
  • Machine LearningHardModel answer
    End-to-End Design of a Food Delivery Recommendation Engine

    Design a personalized restaurant ranking system for a food-ordering app, covering retrieval, ranking, cold start, implicit feedback, and offline/online evaluation.

    Machine Learningrecommendation systemstwo-tower modelcold startimplicit feedback
  • Machine LearningEasyModel answer
    Evaluating Text Classification Systems

    Walk through how you evaluate NLP classification models, covering core metrics, business tradeoffs, class imbalance, and connecting evaluation choices to real decisions.

    Machine Learningclassificationmetricsnlpevaluation
  • Machine LearningMediumModel answer
    Build a Binary Classifier from LLM Token Log-Probabilities

    Design a binary text classifier that uses only per-token log-probabilities from an LLM helper, covering scoring math, batching, calibration, and evaluation.

    Machine Learningllmclassificationnumerical-stabilitycalibration
  • Machine LearningMediumModel answer
    Build a Conversion Prediction System for Programmatic Ad Auctions

    Design an ML pipeline to forecast user conversion probability in real-time programmatic advertising, covering labeling, features, modeling, and production deployment.

    Machine Learningmachine-learningclassificationimbalanced-datafeature-engineering
  • Machine LearningHardModel answer
    Design a Conversion-Optimized Product Ranking Engine

    Design 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.

    Machine Learningrankingmulti-task-learningdelayed-feedbackrecommendation-systems
  • Machine LearningHardModel answer
    Real-Time Location-Based Recommendation System

    Design a machine learning system that delivers personalized, geographically relevant place recommendations with sub-200ms latency at scale.

    Machine Learningrecommender-systemsgeospatialreal-time-mlranking
  • Machine LearningHardModel answer
    Building a Recommendation Engine for New Users and Fresh Content

    Design a video recommendation system that handles users with no history and videos with no engagement data while meeting strict latency requirements.

    Machine Learningrecommendation systemscold startmachine learningsystem design
  • Machine LearningHardModel answer
    Metrics, Monitoring, and Rollout for an Audio Moderation Pipeline

    Design the full measurement stack for an ML-powered audio moderation system: product and model metrics, SLOs, alerting, and safe rollout strategy.

    Machine Learningmetrics-designml-monitoringexperimentationtrust-and-safety
  • Machine LearningHardModel answer
    Building an Intelligent Technical Support Agent with RAG and RL

    Design a multi-turn AI support agent that retrieves documentation, reasons about queries, and optimizes conversation strategy using retrieval systems and RL.

    Machine Learningnlpreinforcement-learningragllm-agents
  • Machine LearningMediumModel answer
    Regularization Penalties, Regression Basics, and Classification Metrics

    Define precision and recall, compare L0/L1/L2/L∞ penalties, state linear regression assumptions, and contrast linear with logistic regression.

    Machine Learningregularizationclassification-metricsregressionlogistic-regression
  • Machine LearningHardModel answer
    Build and Serve a Domain-Adapted LLM Without Hallucinating

    Design, fine-tune, and operate a Transformer-based LLM on a specialized corpus while preserving general capabilities and controlling hallucinations in production.

    Machine Learningtransformersllmfine-tuninghallucination
  • Machine LearningHardModel answer
    End-to-End Pipeline for Penalized Linear Regression

    Build a complete scikit-learn pipeline with preprocessing, regularization, proper validation, and interpretation for predicting marketing signups.

    Machine Learningregressionregularizationcross-validationfeature-engineering
  • Machine LearningMediumModel answer
    Design a Documentation Q&A System Using LLM APIs

    Build a retrieval-augmented generation system that answers developer questions from internal documentation using embeddings and language model APIs.

    Machine Learningretrieval-augmented-generationembeddingsllm-orchestrationvector-search
  • Machine LearningEasyModel answer
    Decision Trees: Splits, Hyperparameters, and Ensembles

    Explain 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.

    Machine Learningdecision-treesrandom-forestgradient-boostingbias-variance
  • Machine LearningHardModel answer
    Real-Time Anomaly Detection System for High-Traffic Platform

    Build a streaming anomaly detection architecture that processes millions of requests per second, handles extreme class imbalance, and maintains feature consistency.

    Machine Learningml-systemsstreamingfeature-engineeringlabeling
  • Machine LearningMediumModel answer
    End-to-End ML Pipeline with NumPy and Pandas Only

    Build a complete, leak-free machine learning pipeline — preprocessing, training, and evaluation — using only NumPy and pandas, no ML libraries.

    Machine Learningsupervised-learninggradient-descentfeature-engineering
  • Machine LearningHardModel answer
    Design an NL-to-Formula Assistant for a No-Code Spreadsheet Tool

    Design 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.

    Machine Learningllm-orchestrationschema-groundingstructured-outputprompt-engineering
  • Machine LearningHardModel answer
    Predicting Delivery Lateness Risk for a Food Delivery Platform

    Design an ML system to forecast whether orders will arrive after their promised time, covering feature engineering, temporal validation, calibration, and production deployment.

    Machine Learningml-system-designclassificationtemporal-datacalibration
  • Machine LearningMediumModel answer
    Core ML and LLM Concepts for Production Systems

    Explain key machine learning and large language model concepts including metrics, model types, benchmarking, inference optimization, and deployment considerations.

    Machine Learningmachine-learningllmproductionevaluation
  • Machine LearningMediumModel answer
    Building a Safety Layer for Medical Text Generation

    Design a system to detect and prevent fabricated information in AI-generated clinical summaries, addressing severe class imbalance in the detection model.

    Machine Learningllmclass-imbalancehealthcarerag
  • Machine LearningHardModel answer
    Month-by-Month Employee Departure Forecasting System

    Design 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.

    Machine Learningsurvival-analysishazard-modelingfeature-engineeringleakage-prevention
  • Machine LearningMediumModel answer
    Bias-Variance Tradeoff and Attention Mechanisms

    Explain model generalization, learning curve diagnosis, regularization methods, and the computational mechanics of attention in sequence models.

    Machine Learningoverfittingregularizationtransformersattention
  • Machine LearningHardModel answer
    Build a Production RAG Pipeline with Strict Latency Requirements

    Design 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.

    Machine Learningretrieval-augmented-generationsystem-designlatency-optimizationvector-search
  • Machine LearningMediumModel answer
    Hardware-Aware Routing for Multi-Phase LLM Inference

    Build a system that dynamically assigns prefill and decode stages of large language model inference to heterogeneous hardware pools based on profiled capabilities.

    Machine Learningml-systemsinferenceschedulingresource-management