KatInterview

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

ML Interview Problems

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

5973
Problems
2212
Auto-graded
15
Topics
271
Added today

Showing 151–180 of 511 results

  • Machine LearningMediumModel answer
    Dropping the Mean: RMSNorm Versus LayerNorm in Transformers

    Contrast LayerNorm and RMSNorm formulas, what removing centering changes, and why many large language models adopt the simpler normalization.

    Machine Learningtransformersnormalizationlayernormrmsnorm
  • Machine LearningMediumModel answer
    Reviewing Machine Learning Data Cleaning Code and Pipeline Design

    Evaluate an ML preprocessing codebase for design decisions, sklearn API conventions, data leakage prevention, code quality issues, and critical unit testing strategy.

    Machine Learningdata-preprocessingscikit-learncode-reviewunit-testing
  • Machine LearningMediumModel answer
    LLM Systems Quick-Fire: Optimization, Evaluation, and Quantization

    Answer four high-frequency technical questions on LLM inference optimization, evaluation for tool use, and quantization trade-offs.

    Machine LearningLLMInference OptimizationKV CacheQuantization
  • Machine LearningMediumModel answer
    Build a Centroid-Based Point Grouper Using Numpy

    Write a vectorized k-means routine that groups N points into k clusters by alternating nearest-centroid assignment with mean updates, handling empty clusters and convergence.

    Machine Learningk-meansclusteringnumpyunsupervised-learning
  • Machine LearningMediumModel answer
    Design a Content Feed Ranking Pipeline & Objective Formulations

    Design a large-scale personalized social network feed architecture and compare pointwise, pairwise, and listwise ranking strategies across training, serving, and business metrics.

    Machine Learningmachine learning system designlearning to rankmulti-task learningrecommendation system
  • Machine LearningMediumModel answer
    Predicting Rising Products and Serving Them in a Personalized Feed

    Design a daily forecasting pipeline that spots products about to surge in sales, plus a sub-100ms personalized homepage feed that surfaces them, including cold-start handling.

    Machine Learningml-system-designrecommendationtime-series-forecastingcold-start
  • Machine LearningMediumModel answer
    Which Fix Fails to Cure Vanishing Gradients in Deep Nets?

    Pick the option that does not reliably address vanishing gradients in a deep network and justify it, while assessing how the other three techniques work and where they fall short.

    Machine Learningdeep-learningvanishing-gradientsbackpropagationbatch-normalization
  • Machine LearningMediumModel answer
    Keeping a Capable AI System Faithful to Its Intended Purpose

    Open-ended discussion on what alignment means, how to spot and reduce misalignment, how to handle misuse, and how to design one falsifiable research experiment.

    Machine Learningai-alignmentai-safetyevaluationinterpretability
  • Machine LearningMediumModel answer
    Why Boosting Works: Sequential Learners and Margins

    Decide which statement best explains boosting for classification and justify it using sequential fitting, signed margins, surrogate losses, and the limits of margin guarantees.

    Machine Learningboostingadaboostmarginensemble-methods
  • Machine LearningHardModel answer
    Design a Globally Scalable, High-Availability Generative AI Serving Platform

    Design a production-grade infrastructure for real-time generative AI inference that supports streaming, low-latency SLOs, multi-region failover, and efficient GPU utilization.

    Machine Learningml system designgenaillm servinggpu scheduling
  • Machine LearningMediumModel answer
    LLM Inference Memory and Phase Splitting: KV Cache and PD Disaggregation

    Explain why transformer decoders cache keys and values, size that cache for a given model, and reason about running prefill and decode on separate GPU pools.

    Machine Learningllm-servingkv-cacheinferencegpu-memory
  • Machine LearningMediumModel answer
    Designing a Repeat-and-Aggregate Pipeline for Noisy LLM Scores

    Design a latency-bounded pipeline that averages repeated LLM sentiment scores, measures run-to-run stability, and computes how many samples a 95% error target needs.

    Machine Learningllm-inferenceconfidence-intervalssample-sizevariance-reduction
  • Machine LearningHardModel answer
    Forecasting Hourly Rentals at a Single Bike-Share Dock Station

    Design an end-to-end model that forecasts hourly bike pickups at one docked station for the next 24 hours, covering target definition, features, models, and evaluation.

    Machine Learningtime-seriesforecastingcensored-datafeature-engineering
  • Machine LearningMediumModel answer
    Stress-Testing Your Own Published ML Paper Under Critique

    Prepare to present a paper you authored to a reviewer who has read it and will probe its experimental design, real-world usefulness, and how newer work changes its claims.

    Machine Learningresearch-paperexperimental-designself-critiqueablations
  • Machine LearningHardModel answer
    Designing a Scalable Audio Content Moderation Pipeline

    Architect an ML inference and labeling ecosystem for real-time speech moderation, covering cascading stages, calibration, metadata storage, and active learning loops.

    Machine Learningmachine-learningsystem-designaudio-processingactive-learning
  • Machine LearningHardModel answer
    Differentiable Routing Strategies for Mixture-of-Experts Models

    Explore techniques to make hard MoE routing differentiable, comparing straight-through estimation, Gumbel-Softmax, REINFORCE, and gate-scaling alongside auxiliary anti-collapse mechanisms.

    Machine Learningmixture of expertsgumbel softmaxreinforcegradient estimation
  • Machine LearningHardModel answer
    Build a Tiny Backpropagation Engine Over Torch Tensors

    Design a small tensor class that records a computation graph for add, mul, matmul, ReLU and sum, then runs reverse-mode differentiation to give correct gradients for every input.

    Machine Learningautogradbackpropagationreverse-mode-differentiationpytorch
  • Machine LearningMediumModel answer
    End-to-End E-Commerce Purchase Intent Prediction Pipeline

    Design a robust data cleaning, pipeline, validation, and threshold-tuning strategy to predict session conversions evaluated on weighted F1 score.

    Machine Learningdata-preprocessingfeature-engineeringcross-validationclassification
  • Machine LearningMediumModel answer
    Matching Error Costs to Metrics for Three Image Moderation Models

    Pick precision, recall, or F1 for three moderation models with different error costs, then reason about recall-oriented tuning and how thresholds move the operating point on a PR curve.

    Machine Learningprecision-recallf1-scoreclass-imbalancethreshold-tuning
  • Machine LearningHardModel answer
    Design a Baseline Credit Offer Engine

    Design an ML recommendation engine for financial credit offers that balances default risk prediction, user acceptance propensity, risk calibration, fair lending compliance, and feedback loop mitigation.

    Machine Learningmachine-learningsystem-designrecommendation-systemcredit-risk
  • Machine LearningMediumModel answer
    Design an Iterative Sequence Optimization Platform for Synthetic Biology

    Design an automated active learning system that iteratively proposes, screens, and refines DNA sequences to maximize gene expression within physical synthesis constraints.

    Machine Learningactive learningbayesian optimizationsequence encodingml system design
  • Machine LearningMediumModel answer
    Model Fit, CNNs, RNNs, Transformers and Ensembles: ML Fundamentals

    A broad machine-learning fundamentals question covering model fit diagnostics, augmentation, CNNs, RNNs, transformer encoders, dropout and ensemble methods.

    Machine Learningoverfittingbias-variancecnntransformers
  • Machine LearningHardModel answer
    Architecting an End-to-End Causal Machine Learning System

    Design a production-grade causal pipeline detailing DAG specifications, doubly robust estimation, off-policy evaluation, sensitivity bounds, and constrained policy deployment.

    Machine Learningcausal-inferenceuplift-modelingdouble-robustoff-policy-evaluation
  • Machine LearningMediumModel answer
    Loss, Batch Size, Regularization and Tree Depth: ML Core Review

    Four connected ML fundamentals: why log loss suits sigmoid outputs, how batch size shapes training, how L1 and L2 differ, and how leaf size controls bias and variance in trees.

    Machine Learningcross-entropysgdregularizationdecision-trees
  • Machine LearningMediumModel answer
    Assess Factuality and Domain Alignment in Specialized RAG Systems

    Select and justify the best two evaluation strategies for assessing the factual correctness and domain consistency of a specialized medical RAG pipeline.

    Machine Learningragllm-evaluationmachine-learningnlp
  • Machine LearningMediumModel answer
    Efficient Transformer Inference: Fused Attention, Caching, Rotary Positions

    Explain how IO-aware attention kernels, cached keys and values, and rotary position encoding each remove a different bottleneck in transformer training and decoding.

    Machine Learningtransformersflashattentionkv-cacherope
  • Machine LearningMediumModel answer
    Architecting a News Feed Comment Ranking System

    Design an end-to-end machine learning system to rank comments on high-traffic posts, balancing user engagement, content quality, low latency, and cold-start handling.

    Machine Learningranking-systemmulti-task-learningsystem-designrecommendation-systems
  • Machine LearningHardModel answer
    Predicting Goal Probability for Individual Soccer Shots

    Design a calibrated probability model that estimates how likely each soccer shot is to score, covering feature design, sparse regions, proper loss functions and calibration.

    Machine Learningprobability-estimationfeature-engineeringcalibrationlog-loss
  • Machine LearningMediumModel answer
    Life of a Prompt in a Block-Paged LLM Serving Engine

    Walk one request through an LLM serving engine that stores attention state in fixed-size memory blocks, covering scheduling, prefill, decode, block tables, memory reclamation and latency trade-offs.

    Machine Learningllm-inferencekv-cachepaged-attentioncontinuous-batching
  • Machine LearningEasyModel answer
    Choosing Between Standardization and Min-Max Normalization

    Demonstrate how to apply standardization to one column and min-max normalization to another using scikit-learn without data leakage, and explain the theoretical trade-offs of each.

    Machine Learningpreprocessingfeature-scalingscikit-learndata-leakage