KatInterview

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

ML Interview Problems

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

5971
Problems
2211
Auto-graded
15
Topics
272
Added today

Showing 421–450 of 511 results

  • Machine LearningHardModel answer
    Multi-Horizon Dock Availability Prediction System

    Design a real-time forecasting system to predict bike-share dock availability 24 hours ahead, handling temporal dependencies and asymmetric costs.

    Machine Learningtime-seriesforecastingfeature-engineeringmodel-selection
  • Machine LearningHardModel answer
    Design a Product Discovery and Ranking Platform

    Design an end-to-end search system for a large online marketplace, covering query understanding, retrieval, ranking, indexing pipelines, and serving infrastructure.

    Machine Learningsearchrankinginformation-retrievalsystem-design
  • Machine LearningMediumModel answer
    Optimizing ML Models for Different Hardware Platforms

    Describe key compiler optimizations for machine learning workloads and how hardware constraints shape which techniques to apply.

    Machine Learningml-systemscompilersoptimizationhardware-acceleration
  • Machine LearningHardModel answer
    Matrix Cumulative Product with Autodifferentiation

    Implement forward and backward passes for cumulative matrix multiplication with correct gradient propagation in an autodiff system.

    Machine Learningautomatic-differentiationbackpropagationmatrix-operationscomplexity-analysis
  • Machine LearningMediumModel answer
    Handle Class Imbalance in Fraud Detection

    Design and evaluate an ML pipeline for detecting rare fraudulent transactions, navigating class imbalance at every stage from data to deployment.

    Machine Learningmachine learningclass imbalancefraud detectionevaluation metrics
  • Machine LearningHardModel answer
    Predict Property Sale Prices from Multi-Year Transaction Records

    Design an end-to-end supervised ML pipeline to estimate residential sale prices from historical transaction data, including market shocks and missing values.

    Machine Learningregressionfeature-engineeringtime-series-validationdrift-detection
  • Machine LearningMediumModel answer
    NER for E-Commerce Text: Design, Models, and Evaluation

    Design a named entity recognition system for short e-commerce text, covering task framing, model families, data pipeline, and the right metrics.

    Machine LearningNERsequence labelingtransformerse-commerce ML
  • Machine LearningHardModel answer
    Critique and redesign a flight delay prediction analysis

    Review a flawed delay-forecasting slide deck, fix the modeling and feature engineering, redesign two charts, and deliver an actionable ops recommendation.

    Machine Learningfeature-engineeringtime-seriesmodel-evaluationdata-leakage
  • Machine LearningMediumModel answer
    Building a Query Completion Prediction System

    Design an ML system that predicts and ranks query completions in real-time as users type search terms.

    Machine Learningml-system-designrankinginformation-retrievalpersonalization
  • Machine LearningHardModel answer
    Build a text-to-image generation platform from scratch

    Design the complete ML pipeline for producing images from text prompts: data, architecture, training, safety, evaluation, and serving at scale.

    Machine Learninggenerative-modelsml-systemsinference-optimization
  • Machine LearningHardModel answer
    Design a Short-Video Feed Ad Ranking System

    Design an end-to-end ML pipeline that selects, scores, and ranks ads in a short-video feed under strict latency, handling position bias and multiple competing objectives.

    Machine Learningads rankingmulti-task learningposition biasreal-time ML
  • Machine LearningMediumModel answer
    Explaining an ML Project You Built

    Present a machine learning project from problem definition through deployment, showing technical judgment, validation rigor, and awareness of real-world constraints.

    Machine Learningml-fundamentalsproject-experiencevalidationcommunication
  • Machine LearningMediumModel answer
    Building a Production LLM Agent with Tool Access and State

    Design a production system where an LLM agent uses external APIs to complete multi-step tasks, handling state, failures, security, and evaluation.

    Machine Learningllm-agentssystem-designproduction-mlsafety
  • Machine LearningMediumModel answer
    Build a High-Throughput Audio ML Pipeline

    Design a distributed backend that runs multi-stage audio AI workloads at scale, handling both real-time and batch requests with efficient GPU use and granular recovery.

    Machine Learningml-systemsdistributed-systemsgpu-schedulingpipeline-orchestration
  • Machine LearningMediumModel answer
    Regression Loss Functions, Imbalanced Classification Metrics, and Thresholding

    Compare MAE vs MSE for regression, interpret ROC-AUC and PR-AUC under severe class imbalance, design loss functions for imbalanced neural networks, and select classification thresholds rigorously.

    Machine Learningloss-functionsclass-imbalanceevaluation-metricsclassification
  • Machine LearningHardModel answer
    Designing a Critic-Free RL Pipeline for Training Reasoning Models

    Build a post-training system for a 70B reasoning LLM using group-relative optimization, exploring advantage estimation, memory efficiency, and reward design.

    Machine Learningreinforcement-learningllm-trainingoptimizationdistributed-systems
  • Machine LearningHardModel answer
    Predict customer spend with zero-inflated heavy-tailed regression

    Build a complete pipeline to forecast 90-day customer value from marketing and behavioral data, addressing zero inflation, multicollinearity, and leakage.

    Machine Learningregressionfeature-engineeringmodel-validationinterpretability
  • Machine LearningMediumModel answer
    ML Opportunities in a Task Fulfillment Platform

    Design ML systems for a platform where customers create tasks and workers complete them with proof: identify opportunities across the workflow and detail the most impactful.

    Machine Learningml-system-designprioritizationevaluationrisk-mitigation
  • Machine LearningHardModel answer
    Diagnosing and Fixing Stalled Optimization in Deep Networks

    Identify why gradient descent halts at high loss and apply targeted fixes for saddles, poor conditioning, vanishing gradients, or true minima.

    Machine Learningoptimizationdeep-learningdebugginggradient-descent
  • Machine LearningHardModel answer
    Bootstrapping a Labeled Dataset from Scratch

    Design a complete pipeline to generate high-quality labeled training data when starting with zero labels for a machine learning task.

    Machine Learningdata-collectionlabel-qualityweak-supervisionhuman-labeling
  • Machine LearningMediumModel answer
    LLM Core Mechanics: Attention, Decoding Strategies, and LoRA

    Walk through how Transformers process sequences, how beam search compares to other decoding methods, and how LoRA cuts fine-tuning costs.

    Machine Learningtransformersdecodingfine-tuningLLM
  • Machine LearningMediumModel answer
    Build a Document Embedding Pipeline with Filtered Retrieval

    Design ingestion and search functions for a vector-based document retrieval system with metadata filtering and production-grade error handling.

    Machine Learningembeddingsvector-searchml-systemsproduction-ml
  • Machine LearningMediumModel answer
    Build a Clustering Algorithm and Analyze Its Behavior

    Write a clustering algorithm that groups data points iteratively, then explain the cost function it optimizes and why it terminates.

    Machine Learningclusteringunsupervised-learningoptimizationalgorithms
  • Machine LearningMediumModel answer
    Build a Log Structuring Pipeline with LLM-Generated Parsers

    Design a scalable system that transforms unstructured log lines into structured JSON using LLM-generated regex parsers cached for high-volume processing.

    Machine Learningml-systemsdata-pipelinesparsingproduction-ml
  • Machine LearningMediumModel answer
    Architecture and Ensemble Trade-offs for Text Classifiers

    Compare sequential and attention-based architectures for long-text classification, then explain variance vs bias reduction in ensemble methods.

    Machine Learningdeep-learningnlpensemblesmodel-selection
  • Machine LearningEasyModel answer
    Choose between fine-tuning and RAG for a knowledge update

    Decide whether to fine-tune an LLM or add a RAG pipeline when a product's underlying knowledge base changes frequently.

    Machine Learningmachine learningLLMfine-tuningRAG
  • Machine LearningMediumModel answer
    Debug a GRPO Training Loop and Explain Ratio Drift

    Walk through a GRPO policy-gradient loop, identify three subtle implementation bugs, and explain why the importance-sampling ratio drifts from 1 even in an on-policy setup.

    Machine Learningreinforcement-learningRLHFpolicy-gradientLLM-training
  • Machine LearningMediumModel answer
    Content moderation classifier for social platforms

    Design an ML system to flag inappropriate user posts in real time, covering data collection, model architecture, threshold tuning, and production monitoring.

    Machine Learningclassificationimbalanced-dataproduction-mlmodel-deployment
  • Machine LearningHardModel answer
    Components and Semantics of MDPs

    Define the formal structure of a Markov decision process and explain how policies generate trajectories that accumulate discounted return.

    Machine Learningreinforcement-learningdecision-processesmarkov-property
  • Machine LearningHardModel answer
    Build a Real-Time Comment Ranking System

    Design an ML-powered system to rank comments in discussion threads, balancing quality, safety, and latency at scale.

    Machine Learningrankingml-system-designreal-timecontent-moderation