KatInterview

Topic

Machine Learning interview problems

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

Problems511

27 easy274 medium210 hard

Showing 361–390 of 511 results

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

    Model answerrankingrecommendation-systemsml-systemsproduction-ml
  • Derive gradients for each weight matrix in a chain of matrix products using the chain rule and implement an efficient backward pass.

    Model answerbackpropagationmatrix-calculusgradient-descent
  • 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.

    Model answerdata-leakagefeature-driftmodel-calibrationcross-validation
  • Design an approach to evaluate applicants below your model's training range when historical approval data exists only above a credit score threshold.

    Model answermodel-extrapolationdistribution-shiftreject-inference
  • Build a complete ML classification system: data splits, preprocessing, model training and tuning, evaluation metrics, serialization, and a batch inference entry point.

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

    Model answerml-system-designtime-to-eventfeature-engineeringdata-leakage
  • Design a personalized restaurant ranking system for a food-ordering app, covering retrieval, ranking, cold start, implicit feedback, and offline/online evaluation.

    Model answerrecommendation systemstwo-tower modelcold startimplicit feedback
  • Walk through how you evaluate NLP classification models, covering core metrics, business tradeoffs, class imbalance, and connecting evaluation choices to real decisions.

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

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

    Model answermachine-learningclassificationimbalanced-datafeature-engineering
  • 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.

    Model answerrankingmulti-task-learningdelayed-feedbackrecommendation-systems
  • Design a machine learning system that delivers personalized, geographically relevant place recommendations with sub-200ms latency at scale.

    Model answerrecommender-systemsgeospatialreal-time-mlranking
  • Design a video recommendation system that handles users with no history and videos with no engagement data while meeting strict latency requirements.

    Model answerrecommendation systemscold startmachine learningsystem design
  • Design the full measurement stack for an ML-powered audio moderation system: product and model metrics, SLOs, alerting, and safe rollout strategy.

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

    Model answernlpreinforcement-learningragllm-agents
  • Define precision and recall, compare L0/L1/L2/L∞ penalties, state linear regression assumptions, and contrast linear with logistic regression.

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

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

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

    Model answerretrieval-augmented-generationembeddingsllm-orchestrationvector-search
  • 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.

    Model answerdecision-treesrandom-forestgradient-boostingbias-variance
  • Build a streaming anomaly detection architecture that processes millions of requests per second, handles extreme class imbalance, and maintains feature consistency.

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

    Model answersupervised-learninggradient-descentfeature-engineering
  • 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.

    Model answerllm-orchestrationschema-groundingstructured-outputprompt-engineering
  • Design an ML system to forecast whether orders will arrive after their promised time, covering feature engineering, temporal validation, calibration, and production deployment.

    Model answerml-system-designclassificationtemporal-datacalibration
  • Explain key machine learning and large language model concepts including metrics, model types, benchmarking, inference optimization, and deployment considerations.

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

    Model answerllmclass-imbalancehealthcarerag
  • 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.

    Model answersurvival-analysishazard-modelingfeature-engineeringleakage-prevention
  • Explain model generalization, learning curve diagnosis, regularization methods, and the computational mechanics of attention in sequence models.

    Model answeroverfittingregularizationtransformersattention
  • 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.

    Model answerretrieval-augmented-generationsystem-designlatency-optimizationvector-search
  • Build a system that dynamically assigns prefill and decode stages of large language model inference to heterogeneous hardware pools based on profiled capabilities.

    Model answerml-systemsinferenceschedulingresource-management

More topics