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 211–240 of 511 results

  • Contrast transformer architectures with embedding models, then explain why models are pretrained, how fine-tuning adapts them, and which risks to monitor.

    Model answertransformersembeddingsfine-tuningtransfer-learning
  • Describe how k-fold cross-validation works, how the choice of k shifts bias, variance and cost, and which situations make a cross-validated score overly optimistic or unreliable.

    Model answercross-validationbias-variancedata-leakagemodel-evaluation
  • Design an end-to-end default-risk classifier for a lender, from label definition through approval cutoff, fairness testing, explainability and post-launch monitoring.

    Model answercredit-riskclassificationfairnesscalibration
  • Design an ML system that scores how closely any two employees in an organization collaborate, covering signals, proxy labels, training, evaluation, privacy and serving.

    Model answerml-system-designgraph-learningembeddingslink-prediction
  • Design an ML system that scores card payments inside the authorization path, handling extreme class imbalance, delayed labels, concept drift, and uneven costs of errors.

    Model answerfraud-detectionimbalanced-datafeature-storeconcept-drift
  • Design a multimodal agent that reads a desktop screen, plans multi-step tasks, drives the mouse and keyboard within a latency budget, and stays safe and measurable.

    Model answeragentsmultimodalvision-language-modelssystem-design
  • Design a sequential feed-ranking system for long-term retention: choose bandit vs MDP, evaluate offline with doubly robust estimators and overlap checks, and design rewards and A/B guardrails.

    Model answerreinforcement-learningoff-policy-evaluationdoubly-robustrecommendation-systems
  • Design an ML pipeline that forecasts 24 hours of bike demand per station, covering target framing, leakage-safe features, validation, and model choice.

    Model answertime-seriesforecastingfeature-engineeringdata-leakage
  • Design a pipeline that checks every uploaded image against a huge catalog of protected works, tolerating edits and partial reuse, at high throughput, under a tight latency limit, with a review workflow.

    Model answerml-system-designcomputer-visionann-searchembeddings
  • Plan how to screen, score, and test a big low-trust dataset before mixing it into SFT and preference tuning, with ablations and clear release gates to avoid regressions.

    Model answerllm-post-trainingdata-curationsftdpo
  • Build a scikit-learn pipeline for a 5%-positive churn dataset: mixed-type preprocessing, imbalance handling, stratified CV, and tuning on precision-recall area instead of accuracy.

    Model answerscikit-learnclass-imbalancepipelinescross-validation
  • Design a production ML system that estimates residential sale prices across a large city, covering features, leakage-safe validation, modeling, fairness, deployment and error analysis.

    Model answerml-system-designgeospatialfeature-engineeringcross-validation
  • Describe how attention-state caching works in decoder-only LLM serving: what is stored, why it speeds up generation, memory costs, and the production techniques that manage it.

    Model answertransformersllm-inferencekv-cacheattention
  • Design a production retrieval-augmented question-answering service over company documents, covering indexing, search, grounding, freshness, access control, evaluation and operations.

    Model answerragretrievalembeddingsllm
  • Plan a data-quality pipeline for a noisy, imbalanced small-image dataset, then derive and numerically verify backprop for a two-layer softmax network in NumPy.

    Model answerlabel-noiseclass-imbalancebackpropagationgradient-checking
  • Pick the model that is a canonical example of bootstrap aggregating from four options, and justify the choice by explaining how bagging reduces variance.

    Model answerbaggingensemble-methodsrandom-forestbias-variance
  • Design a causal ML pipeline that learns who should receive a standing promotion from observational logs, covering estimators, overlap, off-policy evaluation, fairness and a safe rollout.

    Model answercausal-inferenceuplift-modelingoff-policy-evaluationdoubly-robust
  • Debug a NumPy random-split decision-tree ensemble that crashes on constant columns and returns wrong shapes, until it matches scikit-learn's accuracy.

    Model answerdebuggingextra-treesrandom-forestnumpy
  • Discuss when a regularized linear probabilistic classifier beats a bagged tree ensemble on a small binary task, and how it compares with boosting.

    Model answerlogistic-regressionrandom-forestregularizationoverfitting
  • Present one of your own ML research projects so it survives repeated probing on model choices and coding practice, then explain how diffusion models are trained, built, conditioned and sampled.

    Model answerdiffusion-modelsresearch-communicationgenerative-modelsddpm
  • Design a production ML system that proposes search suggestions as users type, ranking them for clicks while controlling bias, safety, latency, and long-term search quality.

    Model answerml-system-designsearch-suggestionsctr-predictionranking
  • Describe the layers of memory in a persistent LLM agent, what each holds, how it is written and read, and how the layers are managed, secured and evaluated across many sessions.

    Model answerllm-agentsmemoryretrievalcontext-window
  • Diagnose a cumulative usage feature with many zeros and nulls, handle its absence at scoring time, and explain why it correlates negatively with completing a tax return.

    Model answerfeature-engineeringmissing-datadata-leakagetraining-serving-skew
  • Design a production ML system that predicts pickup and trip-duration estimates with calibrated uncertainty, covering features, models, serving, leakage control and A/B rollout.

    Model answereta-predictionuncertainty-quantificationfeature-storeconformal-prediction
  • Decide whether an LLM fits a seller-compliance help desk, choose an architecture, define offline and online accuracy measures, and design a safe improvement loop.

    Model answergenerative-airagllm-evaluationhallucination
  • Design a production ML pipeline that scores inbound mail within a tight latency budget, keeps hard-block false positives very low, and stays robust as attackers adapt.

    Model answerml-system-designspam-detectioncalibrationdrift-detection
  • Work out the forward and backward passes of a linear layer whose weight columns are split across devices, pinpoint the required collective, and design tests for sharding bugs.

    Model answertensor-parallelismbackpropagationdistributed-trainingcollectives
  • Design a system that converts predicted business value of a search-ad click into a bid, paces spend against a budget, handles delayed conversions, and proves incremental profit.

    Model answerbiddingadsbudget-pacingdelayed-feedback
  • Count FLOPs, memory bytes and network bytes for a matrix product, apply the roofline model on one device, then compare M, N and K sharding and put numbers on both.

    Model answerrooflinearithmetic-intensityshardingcollective-communication
  • Describe a recent ML experiment you owned, separate measurement from interpretation, and show how its findings would shape a concrete component of an autonomous agent.

    Model answerresearch-communicationai-agentsexperiment-designevaluation

More topics