KatInterview

Topic

Machine Learning interview problems

Modeling, evaluation, ML systems and LLM engineering. 510 original problems, each with a worked model answer.

Problems510

27 easy273 medium210 hard

Showing 421–450 of 510 results

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

    Model answersearchrankinginformation-retrievalsystem-design
  • Describe key compiler optimizations for machine learning workloads and how hardware constraints shape which techniques to apply.

    Model answerml-systemscompilersoptimizationhardware-acceleration
  • Implement forward and backward passes for cumulative matrix multiplication with correct gradient propagation in an autodiff system.

    Model answerautomatic-differentiationbackpropagationmatrix-operationscomplexity-analysis
  • Design and evaluate an ML pipeline for detecting rare fraudulent transactions, navigating class imbalance at every stage from data to deployment.

    Model answermachine learningclass imbalancefraud detectionevaluation metrics
  • Design an end-to-end supervised ML pipeline to estimate residential sale prices from historical transaction data, including market shocks and missing values.

    Model answerregressionfeature-engineeringtime-series-validationdrift-detection
  • Design a named entity recognition system for short e-commerce text, covering task framing, model families, data pipeline, and the right metrics.

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

    Model answerfeature-engineeringtime-seriesmodel-evaluationdata-leakage
  • Design an ML system that predicts and ranks query completions in real-time as users type search terms.

    Model answerml-system-designrankinginformation-retrievalpersonalization
  • Design the complete ML pipeline for producing images from text prompts: data, architecture, training, safety, evaluation, and serving at scale.

    Model answergenerative-modelsml-systemsinference-optimization
  • 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.

    Model answerads rankingmulti-task learningposition biasreal-time ML
  • Present a machine learning project from problem definition through deployment, showing technical judgment, validation rigor, and awareness of real-world constraints.

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

    Model answerllm-agentssystem-designproduction-mlsafety
  • 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.

    Model answerml-systemsdistributed-systemsgpu-schedulingpipeline-orchestration
  • 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.

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

    Model answerreinforcement-learningllm-trainingoptimizationdistributed-systems
  • Build a complete pipeline to forecast 90-day customer value from marketing and behavioral data, addressing zero inflation, multicollinearity, and leakage.

    Model answerregressionfeature-engineeringmodel-validationinterpretability
  • 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.

    Model answerml-system-designprioritizationevaluationrisk-mitigation
  • Identify why gradient descent halts at high loss and apply targeted fixes for saddles, poor conditioning, vanishing gradients, or true minima.

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

    Model answerdata-collectionlabel-qualityweak-supervisionhuman-labeling
  • Walk through how Transformers process sequences, how beam search compares to other decoding methods, and how LoRA cuts fine-tuning costs.

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

    Model answerembeddingsvector-searchml-systemsproduction-ml
  • Write a clustering algorithm that groups data points iteratively, then explain the cost function it optimizes and why it terminates.

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

    Model answerml-systemsdata-pipelinesparsingproduction-ml
  • Compare sequential and attention-based architectures for long-text classification, then explain variance vs bias reduction in ensemble methods.

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

    Model answermachine learningLLMfine-tuningRAG
  • 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.

    Model answerreinforcement-learningRLHFpolicy-gradientLLM-training
  • Design an ML system to flag inappropriate user posts in real time, covering data collection, model architecture, threshold tuning, and production monitoring.

    Model answerclassificationimbalanced-dataproduction-mlmodel-deployment
  • Define the formal structure of a Markov decision process and explain how policies generate trajectories that accumulate discounted return.

    Model answerreinforcement-learningdecision-processesmarkov-property
  • Design an ML-powered system to rank comments in discussion threads, balancing quality, safety, and latency at scale.

    Model answerrankingml-system-designreal-timecontent-moderation
  • Design a machine learning system that forecasts journey duration for ride-hailing trips, addressing data collection, feature design, model choice, and deployment.

    Model answerml-system-designproduction-mlregressionspatial-data

More topics