MMagic
.ai
Jobs
Companies
Interview Prep
Resume Analyzer
Pricing
Sign in
Post a Job
Jobs
Companies
Interview Prep
Resume Analyzer
Pricing
Interview prep
AI & Machine Learning Interview Questions
All
Foundations & Math Intuition
Classical Machine Learning
Deep Learning
Large Language Models & GenAI
MLOps & Production Systems
Computer Vision
Natural Language Processing
Reinforcement Learning
Model Evaluation & Statistics
ML System Design
All
easy
medium
hard
Foundations & Math Intuition
easy
What's the difference between bias and variance, and why can't you minimize both freely?
medium
Explain gradient descent as if teaching someone with no ML background, then show the update rule in code.
medium
What is the curse of dimensionality, and why does it hurt distance-based models like k-NN?
easy
Why do we use cross-entropy loss instead of mean squared error for classification?
medium
What is the difference between a generative and a discriminative model?
medium
Explain the intuition behind eigenvectors/eigenvalues in the context of PCA.
hard
What is the difference between Maximum Likelihood Estimation (MLE) and Maximum A Posteriori (MAP) estimation?
easy
What is the difference between parametric and non-parametric models?
medium
Why is the softmax function used for multi-class classification, and what's a numerically stable implementation?
hard
What is the difference between convex and non-convex optimization, and why does it matter for training neural networks?
Classical Machine Learning
medium
How does a Random Forest reduce overfitting compared to a single Decision Tree?
hard
Explain how gradient boosting (e.g., XGBoost) differs fundamentally from bagging methods like Random Forest.
easy
Why do we scale/normalize features before training models like SVM or k-NN, but not for tree-based models?
medium
What's the difference between L1 and L2 regularization, and why does L1 tend to produce sparse models?
medium
How does the kernel trick let SVMs handle non-linearly separable data without explicitly computing high-dimensional features?
easy
What is k-means clustering, and what's a major limitation of the algorithm?
medium
What's the difference between bagging and stacking as ensemble techniques?
hard
Explain the exploration-exploitation tradeoff via Bayesian optimization for hyperparameter tuning.
medium
What is feature leakage, and give a concrete example of how it silently inflates reported performance.
easy
What is the difference between a validation set and a test set, and why do you need both?
Deep Learning
medium
What is the vanishing gradient problem, and how do architectures like ResNet or LSTMs address it?
hard
Explain self-attention in Transformers in plain terms, then show the scaled dot-product formula.
medium
What is batch normalization, and why does it help training converge faster?
medium
Dropout seems like it should hurt performance — why does it actually help generalization?
hard
Why do we need positional encodings in Transformers, when RNNs don't need them?
medium
Why is ReLU generally preferred over sigmoid/tanh as an activation function in deep networks?
medium
What's the difference between a CNN's convolutional layer and a fully connected layer, and why are CNNs so effective for images?
hard
What is the difference between an autoencoder and a variational autoencoder (VAE), and why does the VAE's latent space enable generation?
medium
What is transfer learning, and why does fine-tuning a pretrained model usually beat training from scratch on a small dataset?
hard
What is the difference between layer normalization and batch normalization, and why do Transformers use LayerNorm?
Large Language Models & GenAI
medium
What is Retrieval-Augmented Generation (RAG), and why do we need it if the model already 'knows' things?
hard
What causes LLM hallucination, and what practical strategies reduce it?
medium
Explain the difference between fine-tuning and prompt engineering/few-shot learning — when would you choose each?
medium
What is LoRA (Low-Rank Adaptation), and why has it become so popular for fine-tuning large models?
hard
What is RLHF (Reinforcement Learning from Human Feedback), and why is it needed on top of standard pretraining?
medium
Why is tokenization (e.g., Byte Pair Encoding) important, and what problems can it cause?
medium
What is the difference between temperature and top-p (nucleus) sampling when generating text from an LLM?
hard
What is chain-of-thought (CoT) prompting, and why does it improve performance on multi-step reasoning tasks?
medium
What is an embedding, and why does cosine similarity tend to be preferred for comparing text embeddings?
hard
What is model distillation, and how does it differ from quantization as a compression technique?
MLOps & Production Systems
medium
What is data/concept drift, and how would you detect it in a production ML system?
hard
Why is 'accuracy' often a misleading metric, and what would you use instead for an imbalanced fraud-detection dataset?
medium
What's the difference between online (real-time) and batch inference, and how do you decide which to use?
medium
What is model quantization, and why does it matter for deploying LLMs?
hard
How would you design an A/B test to validate a new ML model before fully replacing the current production model?
medium
What is a feature store, and what problem does it solve in ML systems?
medium
What is the difference between model monitoring and data quality monitoring, and why do you need both?
hard
What is canary deployment in the context of ML models, and how does it differ from a full A/B test?
medium
Why is reproducibility hard in ML pipelines, and what practices help ensure it?
hard
How would you design a system to serve an LLM cost-effectively at scale while keeping latency acceptable?
Computer Vision
easy
What is the difference between image classification, object detection, and semantic segmentation?
medium
What is data augmentation in computer vision, and why does it help even without new real information?
medium
What is the purpose of anchor boxes in object detection models like Faster R-CNN or YOLO?
hard
What is Non-Maximum Suppression (NMS), and why is it necessary in object detection?
medium
What is the intuition behind Intersection over Union (IoU), and how is it used to evaluate detection models?
medium
What is the difference between a Vision Transformer (ViT) and a CNN in how they process images?
hard
What is the difference between how GANs and diffusion models generate images?
medium
Why do we use transfer learning with ImageNet-pretrained backbones even for very different domains (e.g., medical imaging)?
medium
What is the purpose of pooling layers (e.g., max pooling) in a CNN?
hard
What is contrastive learning (e.g., CLIP or SimCLR), and why is it useful for learning representations without labels?
Natural Language Processing
easy
What is the difference between stemming and lemmatization?
medium
What is TF-IDF, and what problem does it solve compared to raw word counts?
medium
What is Named Entity Recognition (NER), and why is it framed as a sequence-labeling problem?
hard
What is the difference between encoder-only, decoder-only, and encoder-decoder Transformer architectures, and when is each used?
medium
What is word2vec, and how do the skip-gram and CBOW variants differ?
medium
What is the difference between extractive and abstractive text summarization?
hard
Why does perplexity matter as a language model evaluation metric, and what does a lower perplexity actually mean?
medium
What is the difference between a sparse retriever (like BM25) and a dense retriever (embedding-based) in a search/RAG pipeline?
medium
What are subword tokens, and why do modern NLP models almost never tokenize whole words directly?
hard
What is catastrophic forgetting, and why is it a risk when fine-tuning a pretrained language model on a narrow new task?
Reinforcement Learning
easy
What are the core components of a reinforcement learning problem (agent, environment, state, action, reward)?
medium
What is the exploration-exploitation tradeoff in RL, and how does epsilon-greedy address it?
hard
What is the difference between value-based methods (Q-learning) and policy-based methods (REINFORCE/PPO)?
medium
What is the discount factor (gamma) in reinforcement learning, and what happens at the extremes?
hard
What is reward hacking, and give a concrete example of an RL agent 'gaming' a poorly designed reward function.
medium
What is the difference between on-policy and off-policy reinforcement learning algorithms?
medium
Why is PPO (Proximal Policy Optimization) so widely used in practice, including for RLHF?
hard
What is the credit assignment problem in RL, and how do techniques like advantage estimation help?
medium
What is a Markov Decision Process (MDP), and what does the 'Markov property' actually assume?
hard
Why is RL generally considered more sample-inefficient than supervised learning, and how does this affect real-world applicability?
Model Evaluation & Statistics
easy
What is the difference between precision and recall, and why is there usually a tradeoff between them?
medium
What does the ROC-AUC score actually measure, and what's a common misinterpretation of it?
medium
What is k-fold cross-validation, and why is it generally more reliable than a single train/test split?
hard
What is statistical significance, and why can a result be significant but not practically meaningful?
medium
What is calibration in the context of a classifier's predicted probabilities?
medium
What is the difference between Type I and Type II errors, and how does adjusting a significance threshold affect the tradeoff?
hard
What is the difference between epistemic and aleatoric uncertainty in a model's predictions?
medium
Why is a confusion matrix often more informative than a single accuracy number, especially for multi-class problems?
hard
What is bootstrapping, and how can it estimate a confidence interval around a model's performance metric?
medium
What is the difference between R-squared and adjusted R-squared?
ML System Design
medium
How would you approach designing a recommendation system for an e-commerce site from scratch?
hard
How would you design a real-time fraud detection system that needs to score transactions in under 100ms?
medium
What tradeoffs would you weigh when deciding whether to build a custom ML model or use a pretrained/off-the-shelf model or API?
hard
How would you design a scalable system to generate and serve embeddings for millions of products, supporting fast similarity search?
medium
How would you handle the cold-start problem for a brand-new user with no interaction history?
hard
How would you design a system to detect and moderate harmful content at scale, balancing accuracy, cost, and user experience?
medium
What key considerations go into choosing between a monolithic ML pipeline and a microservices-based ML architecture?
hard
How would you design an experimentation platform to safely test many ML model variants simultaneously without experiments interfering?
medium
How would you design a system to keep a RAG-based chatbot's knowledge base up to date as source documents change frequently?
hard
What would you consider when designing an ML pipeline that must support both batch retraining and online/incremental learning?