Urise
  • Forum
  • Feed
  • Jobs
  • Blog
Log inGet started free
Get started free

🤖AI Engineer

Real AI engineer interview questions on deep learning, NLP, MLOps, and evaluation.

Back to Prep
Table of Contents
Table of Contents (75 questions)

Concepts

Deep Learning

NLP

MLOps

Evaluation

Concepts

1.Explain the difference between AI, ML, and Deep Learning

Answer

AI: The broad field of building systems that perform tasks requiring human-like intelligence, from search and recommendations to robotics. ML: A subset of AI where systems learn patterns from data instead of hand-coded rules, covering regression, classification and clustering. Deep Learning: A further subset of ML using multi-layer neural networks, which excels at images, speech and language given enough data and compute. Draw the nesting in the interview: AI contains ML, and ML contains deep learning.
Asked at:GoogleOpenAIDeepMind
Share:

2.What is the difference between generative and discriminative models?

Answer

Discriminative: Learns P(label given input), the decision boundary, such as logistic regression, SVMs and classifiers. Use it for classification. Generative: Learns P(input) or P(input, label) and can synthesize new samples, such as GANs, VAEs, diffusion models and LLMs. Use it for creation, imputation or density estimation.
Asked at:GoogleOpenAIDeepMind
Share:

3.What is self-supervised learning and give two examples

Answer

Self-supervised learning creates labels from the data itself via pretext tasks, unlocking web-scale training without annotators. Examples include masked language modeling (BERT), next-token prediction (GPT), and contrastive image-text matching (CLIP). Mention that fine-tuning or prompting then adapts these general representations cheaply.
Asked at:MetaGoogleOpenAI
Share:

4.What is the difference between feature engineering and representation learning?

Answer

Feature engineering hand-crafts inputs from domain knowledge, such as ratios and aggregations, and dominates classical ML quality. Representation learning lets deep networks discover features from raw data during training, trading interpretability and data hunger for less manual effort. Mention that embeddings are the canonical learned representation.
Asked at:GoogleMetaAmazon
Share:

5.What is an AI agent versus a plain LLM call?

Answer

An agent loops perception, reasoning, tool use, and memory toward a goal, handling multi-step tasks like research or code repair. A plain LLM call is one stateless transformation of prompt to completion. Mention the scaffolding that makes agents work: tool schemas, planners, critics, and bounded retry budgets to control cost and failure modes.
Asked at:OpenAIAnthropicGoogle
Share:

6.What is the curse of dimensionality for nearest-neighbor methods?

Answer

In high dimensions distances concentrate so every point looks roughly equidistant, breaking nearest-neighbor notions of similarity. Mitigate with dimensionality reduction, learned embeddings, or tree and hashing indexes, and validate neighbor quality directly. Mention this is why raw kNN on pixels or bag-of-words underperforms learned representations.
Asked at:GoogleMetaAmazon
Share:

7.What is the difference between parametric and non-parametric models?

Answer

Parametric models fix capacity up front with a bounded parameter set, like linear models and fixed-size networks, training fast but potentially underfitting complexity. Non-parametric models grow with data, like kNN, trees, and Gaussian processes, flexibly fitting structure at higher inference cost. Mention choosing by data scale and latency budgets.
Asked at:GoogleMetaAmazon
Share:

8.What is the bias-variance tradeoff in one minute?

Answer

Bias is error from oversimplified assumptions while variance is error from over-sensitivity to training noise, and total error splits into bias plus variance plus irreducible noise. Bigger models cut bias but raise variance, so tune capacity, regularization, and ensembles via validation curves. Mention that more data reduces variance without raising bias.
Asked at:GoogleMetaAmazon
Share:

9.What is federated learning and what makes it hard?

Answer

Federated learning trains across decentralized devices by aggregating model updates instead of centralizing raw data, preserving privacy for phones and hospitals. Hard parts include non-IID client data, stragglers and dropouts, communication budgets, and poisoning or inference attacks on shared updates. Mention FedAvg plus secure aggregation as the baseline stack.
Asked at:GoogleAppleNVIDIA
Share:

10.What is the difference between strong and weak AI?

Answer

Weak (narrow) AI masters specific tasks like translation or driving without general understanding, which covers everything deployed today. Strong AI (AGI) would match humans across domains with transfer and agency, which remains hypothetical with debated timelines. Mention using the distinction to scope safety and evaluation claims honestly.
Asked at:DeepMindOpenAIAnthropic
Share:

11.What is AI alignment in practical terms?

Answer

Alignment means models pursue intended goals safely: following instructions faithfully, avoiding harmful side effects, and staying corrigible to oversight. In practice it spans RLHF, red-teaming, evals for deception and power-seeking, and deployment policies with staged rollouts. Mention that capability gains without matching evals widen the risk gap.
Asked at:AnthropicOpenAIDeepMind
Share:

12.What is the difference between open and closed model releases?

Answer

Open releases publish weights for inspection, fine-tuning, and self-hosting, accelerating research at the cost of irreversible misuse potential. Closed releases gate access behind APIs with monitoring and revocation, trading openness for control and business capture. Mention staged and gated releases as middle paths with researcher access programs.
Asked at:MetaOpenAIGoogle
Share:

13.How do you stay current in AI engineering without drowning?

Answer

Triangulate a few high-signal sources like key lab blogs, benchmark leaderboards, and one practitioner community, then learn by reproducing one technique monthly. Timebox paper reading to abstracts plus methods, and convert findings into tiny experiments on your own data. Mention teaching or writing as the retention multiplier that compounds the habit.
Asked at:GoogleMetaHugging Face
Share:

Deep Learning

14.What is a neural network and how does it work?

Answer

A neural network is layers of neurons where each computes a weighted sum plus bias followed by a non-linear activation such as ReLU, sigmoid or tanh. Data flows forward to produce predictions; training uses backpropagation to compute gradients of a loss function and update weights via gradient descent. Depth lets the network learn hierarchical features, from edges to objects or from characters to meaning.
Asked at:GoogleOpenAIDeepMind
Share:

15.What is transfer learning and when should you use it?

Answer

Transfer learning reuses a model pretrained on a large dataset and adapts it to a smaller target task via feature extraction with a frozen backbone or fine-tuning of some or all layers. Use it when labeled data is scarce, training from scratch is expensive, or domains overlap. Mention domain mismatch risks, catastrophic forgetting, and validating with a held-out target set.
Asked at:GoogleOpenAIMeta
Share:

16.How do you handle overfitting in deep learning models?

Answer

Fight overfitting with more or augmented data, dropout, weight decay (L2), early stopping on a validation set, label smoothing, batch or layer normalization, and reduced model capacity. Also use cross-validation, ensembling and careful train, validation and test splits to detect it. Training loss falling while validation loss rises is the classic signal.
Asked at:GoogleOpenAIDeepMind
Share:

17.What is the difference between CNN and RNN?

Answer

CNN: Uses convolutional filters with local receptive fields and pooling, making it ideal for spatial data like images where translation invariance matters, and it remains strong in vision. RNN: Processes sequences step by step with hidden state, suiting time series and text, but struggles with long dependencies, partly mitigated by LSTM and GRU cells. Today transformers have largely replaced vanilla RNNs for language.
Asked at:GoogleMetaMicrosoft
Share:

18.What is backpropagation and why is it efficient?

Answer

Backpropagation computes gradients of the loss with respect to every weight by applying the chain rule layer by layer from output back to input, reusing intermediate results. It is efficient because each layer's gradients are computed once in a single backward pass instead of perturbing weights one by one. Mention the forward pass caching activations needed for the backward computation.
Asked at:GoogleDeepMindMeta
Share:

19.What are vanishing and exploding gradients and how do you fix them?

Answer

In deep networks repeated multiplication of small Jacobians shrinks gradients (vanishing) while large values amplify them (exploding), stalling or destabilizing training. Mitigate with careful initialization (Xavier, He), normalization layers, residual connections, gradient clipping, and gated architectures like LSTM or GRU. Mention that ReLU helps vanishing but can die without proper learning rates.
Asked at:GoogleOpenAIDeepMind
Share:

20.What is batch normalization and how does layer normalization differ?

Answer

Batch normalization standardizes each feature across the mini-batch, stabilizing training and permitting higher learning rates, with running stats used at inference. Layer normalization standardizes across features per example instead, making it independent of batch size, which suits sequences and transformers. Mention the train versus inference behavior difference as a common interview follow-up.
Asked at:GoogleMetaMicrosoft
Share:

21.What is dropout and when should you avoid it?

Answer

Dropout randomly zeroes a fraction of activations during training, forcing redundant representations that generalize better, and is disabled at inference with appropriate scaling. Avoid it where it harms signal, such as very small models, early convolutional layers, or recurrent connections without variational variants. Mention tuning the rate per layer rather than using one global value.
Asked at:GoogleAmazonMeta
Share:

22.Explain the difference between SGD, Adam, and AdamW

Answer

SGD updates weights along the mini-batch gradient, optionally with momentum that smooths the trajectory. Adam adds per-parameter adaptive rates from first and second moment estimates, converging fast with little tuning. AdamW decouples weight decay from the adaptive update, which fixes Adam's poor generalization on transformers and is now the default for LLM training.
Asked at:OpenAIGoogleMeta
Share:

23.What is a learning rate scheduler and which schedules matter?

Answer

Schedulers vary the learning rate during training: step decay drops it at milestones, cosine annealing decays smoothly to near zero, warmup ramps it up first to stabilize early gradients, and ReduceLROnPlateau reacts to stalled validation loss. Warmup plus cosine decay is the standard recipe for transformers. Mention matching the schedule to total training steps.
Asked at:GoogleOpenAIAnthropic
Share:

24.What is LoRA and why is it popular for fine-tuning LLMs?

Answer

LoRA freezes pretrained weights and trains small low-rank adapter matrices injected into attention layers, cutting trainable parameters by orders of magnitude. Adapters merge back at inference for zero latency cost and can be swapped per task on one base model. Mention rank and alpha as the key hyperparameters and QLoRA for quantized-memory setups.
Asked at:MetaMicrosoftGoogle
Share:

25.What is reinforcement learning from human feedback?

Answer

RLHF trains a reward model on human preference rankings of model outputs, then optimizes the policy against it with algorithms like PPO or DPO while constraining drift from the base model. It aligns assistants toward helpful, harmless behavior beyond next-token prediction. Mention reward hacking and the need for held-out preference evaluation.
Asked at:OpenAIAnthropicDeepMind
Share:

26.What is model quantization and what does it cost?

Answer

Quantization lowers weight and activation precision (FP16, INT8, INT4), shrinking memory and speeding inference with modest accuracy loss. Costs include calibration effort, occasional quality drops on sensitive tasks, and hardware or kernel support requirements. Mention GPTQ, AWQ, and GGUF as common formats for serving quantized LLMs.
Asked at:MetaMicrosoftGoogle
Share:

27.What is knowledge distillation in neural networks?

Answer

Distillation trains a small student to mimic a large teacher's soft outputs (and optionally intermediate features), transferring dark knowledge the hard labels lack. Students reach near-teacher quality at a fraction of serving cost, ideal for latency-sensitive products. Mention temperature-scaled softmax as the classic mechanism from Hinton's paper.
Asked at:GoogleAppleMicrosoft
Share:

28.What are diffusion models and how do they generate images?

Answer

Diffusion models learn to reverse a gradual noising process: training predicts the noise added at each timestep, and sampling starts from pure noise, denoising step by step, optionally steered by text embeddings. They trade slower sampling for high fidelity and stable training versus GANs. Mention latent diffusion (Stable Diffusion) operating in compressed space for efficiency.
Asked at:OpenAIGoogleStability
Share:

29.What is a GAN and why is it hard to train?

Answer

A GAN pits a generator against a discriminator in a minimax game, with the generator improving as the discriminator gets fooled. Training is unstable because the players must stay balanced: mode collapse, vanishing gradients, and oscillation are common failures. Mention Wasserstein loss and spectral normalization as stabilizers, and why diffusion displaced GANs for top-tier image quality.
Asked at:GoogleNVIDIAMeta
Share:

30.What is contrastive learning and how does CLIP use it?

Answer

Contrastive learning pulls matching pairs together and pushes mismatches apart in embedding space using losses like InfoNCE. CLIP trains image and text encoders jointly on captioned photos, enabling zero-shot classification by comparing an image to text prompts. Mention batch size and hard negatives as the main quality levers.
Asked at:OpenAIGoogleMeta
Share:

31.What is the difference between fine-tuning and instruction tuning?

Answer

Fine-tuning adapts a model to a domain or task with labeled examples, shifting its knowledge and style. Instruction tuning specifically trains on instruction-response pairs so the model follows diverse user requests helpfully, which is the step that turns base models into assistants. Mention that most production assistants combine pretraining, instruction tuning, and preference optimization.
Asked at:GoogleMetaAnthropic
Share:

32.What is catastrophic forgetting and how do you prevent it?

Answer

Networks overwrite old skills when trained sequentially on new tasks because shared weights drift toward the latest objective. Prevent it with rehearsal buffers mixing old data, elastic weight consolidation penalizing key weight moves, progressive networks freezing old columns, or joint multi-task training. Mention measuring retention on old benchmarks after each adaptation.
Asked at:DeepMindGoogleMeta
Share:

33.What are residual connections and why did they enable very deep networks?

Answer

Residual connections add each block's input to its output, giving gradients a shortcut path that prevents degradation as depth grows. This turned 100-plus-layer training from failing to routine, as shown by ResNet. Mention that transformers use the same idea around attention and feed-forward sublayers.
Asked at:MicrosoftGoogleMeta
Share:

34.What is gradient clipping and when do you use norm versus value clipping?

Answer

Clipping caps gradient magnitude to stop explosive updates from destabilizing training, common in RNNs and large-batch setups. Norm clipping rescales the whole gradient vector preserving direction, while value clipping truncates element-wise and can distort direction. Prefer norm clipping as the default and monitor gradient norms to set the threshold.
Asked at:GoogleDeepMindOpenAI
Share:

35.What is weight decay and how does it differ from L2 in Adam?

Answer

Weight decay shrinks weights toward zero each step, favoring simpler solutions that generalize. In classic SGD it equals L2 regularization, but in Adam the adaptive denominator distorts the penalty, which AdamW fixes by decoupling decay from the gradient update. Mention tuning decay separately from learning rate in modern setups.
Asked at:GoogleMetaOpenAI
Share:

36.What is the difference between batch, mini-batch, and stochastic gradient descent?

Answer

Batch uses the full dataset per update for stable but slow and memory-heavy steps. Stochastic uses one example for fast noisy updates that can escape sharp minima but oscillate. Mini-batch splits the difference with hardware-efficient parallel updates and is the universal default. Mention batch-size effects on generalization and learning-rate scaling rules.
Asked at:GoogleMetaAmazon
Share:

37.What are vision transformers and how do they differ from CNNs?

Answer

Vision transformers split images into patches, embed them like tokens, and apply self-attention globally instead of local convolutions. They need more data or pretraining to match CNN inductive biases but scale better and unify vision with language stacks. Mention hybrid and hierarchical variants like Swin that reintroduce locality.
Asked at:GoogleMetaOpenAI
Share:

38.What is object detection versus image segmentation?

Answer

Detection draws bounding boxes with class labels around instances, optimized for counting and localization speed. Segmentation classifies every pixel, with semantic variants labeling regions and instance variants separating overlapping objects of the same class. Mention mAP for detection versus IoU and Dice for segmentation evaluation.
Asked at:GoogleTeslaMeta
Share:

NLP

39.Explain the transformer architecture

Answer

The transformer replaces recurrence with self-attention, letting every token attend to every other token in parallel. Each block has multi-head self-attention over queries, keys and values with scaled dot-product, plus residual connections, layer norm, a feed-forward network and positional encodings for order. This design scales to long contexts and underpins BERT, GPT and vision transformers. Mention encoder versus decoder versus encoder-decoder variants.
Asked at:OpenAIGoogleMeta
Share:

40.Explain the concept of attention in NLP

Answer

Attention lets a model weigh the relevance of different input positions when producing each output, instead of compressing everything into one fixed vector. Self-attention computes query-key-value interactions within the same sequence, and multi-head attention runs several such projections in parallel to capture different relations like syntax, coreference and position. This is the core mechanism behind transformers and modern LLMs.
Asked at:OpenAIGoogleMeta
Share:

41.What are embeddings and why are they better than one-hot encodings?

Answer

Embeddings are dense learned vectors where geometric closeness reflects semantic similarity, unlike sparse one-hot vectors that treat every token as equidistant. They compress vocabulary into a few hundred dimensions, enable transfer across tasks, and support arithmetic analogies. Mention subword tokenization feeding the embedding layer in modern LLMs.
Asked at:GoogleOpenAIMeta
Share:

42.How does Byte-Pair Encoding tokenization work?

Answer

BPE starts from characters and iteratively merges the most frequent adjacent pair into a new token until reaching the target vocabulary size. It balances word-level meaning with character-level coverage, so rare words split into known subwords instead of unknowns. Mention its role in GPT-style models and quirks like leading-space markers.
Asked at:OpenAIGoogleAnthropic
Share:

43.What is masked language modeling and how does it differ from causal modeling?

Answer

Masked modeling (BERT) hides random tokens and predicts them using both left and right context, producing strong bidirectional encoders for classification and retrieval. Causal modeling (GPT) predicts the next token left to right, which suits generation but sees only past context. Mention why bidirectional models cannot generate fluently and vice versa.
Asked at:GoogleMetaMicrosoft
Share:

44.What is temperature in LLM sampling and how does it interact with top-p?

Answer

Temperature rescales logits before softmax: low values sharpen the distribution toward greedy picks, high values flatten it for diverse but riskier output. Top-p (nucleus) sampling instead keeps the smallest set covering probability p and renormalizes, cutting the unreliable tail adaptively. In practice tune temperature for creativity and top-p around 0.9 to bound nonsense.
Asked at:OpenAIAnthropicGoogle
Share:

45.What is retrieval-augmented generation and when does it beat fine-tuning?

Answer

RAG retrieves relevant documents into the prompt so the model grounds answers in fresh or private knowledge without retraining. It beats fine-tuning when facts change often, sources must be cited, or data cannot leave the vault, while fine-tuning wins for style, format, or deeply internalized skills. Mention chunking, embedding quality, and reranking as the levers that decide RAG quality.
Asked at:GoogleMicrosoftAmazon
Share:

46.What is prompt engineering and what are its limits?

Answer

Prompt engineering shapes model behavior through instructions, few-shot examples, and structured output schemas without changing weights. Its limits are context-window costs, brittleness to phrasing, inability to teach truly new knowledge reliably, and prompt-injection exposure. Mention evaluation harnesses so prompt tweaks are measured, not vibes.
Asked at:OpenAIAnthropicGoogle
Share:

47.What is chain-of-thought prompting and why does it help reasoning?

Answer

Chain-of-thought asks the model to spell out intermediate steps before the final answer, which allocates more compute to hard problems and exposes faulty steps for checking. It helps most on math, logic, and multi-hop tasks, especially with self-consistency sampling over several chains. Mention that it costs tokens and can rationalize wrong answers convincingly.
Asked at:GoogleOpenAIDeepMind
Share:

48.What is positional encoding and why do transformers need it?

Answer

Self-attention is permutation-invariant, so without order signals the model cannot tell word sequences apart. Sinusoidal or learned positional encodings inject position info into embeddings, with rotary variants (RoPE) now standard for long-context LLMs. Mention extrapolation limits when contexts exceed training length.
Asked at:GoogleMetaOpenAI
Share:

49.What is hallucination in LLMs and how do you reduce it?

Answer

Hallucination is fluent but false output, stemming from likelihood training without grounding and from gaps in parametric knowledge. Reduce it with RAG grounding, constrained decoding and schemas, citation requirements, lower temperatures for factual tasks, and human or automated fact-checking loops. Mention measuring hallucination rates on domain benchmarks before claiming fixes.
Asked at:GoogleOpenAIAnthropic
Share:

50.What is prompt injection and how do you defend against it?

Answer

Prompt injection smuggles instructions through untrusted content (webpages, documents) that the model obeys over system intent. Defenses include privilege separation between system and data, input sanitization and delimiters, least-privilege tool scopes with human confirmation for actions, and monitoring for exfiltration patterns. Mention there is no airtight fix, only layered mitigation.
Asked at:OpenAIAnthropicMicrosoft
Share:

51.What is attention pooling versus mean pooling for sentence embeddings?

Answer

Mean pooling averages token vectors equally, which is simple but lets filler tokens dilute meaning. Attention pooling learns weights per token so salient words dominate the sentence vector, at the cost of extra parameters and tuning. Mention SBERT-style siamese training as the setup where pooling choice matters most.
Asked at:GoogleMetaHugging Face
Share:

52.What is the transformer decoder mask and what breaks without it?

Answer

The causal mask sets future positions to negative infinity before softmax so each token attends only to past tokens during training. Without it the model peeks at answers, training loss looks great, and generation fails because future context is unavailable at inference. Mention key-value caching as the inference-side counterpart that reuses past computations.
Asked at:OpenAIGoogleMeta
Share:

53.What is multi-head attention and why multiple heads?

Answer

Multi-head attention runs several query-key-value projections in parallel, letting each head specialize in different relations like syntax, coreference, or position. Heads concatenate and reproject into one representation richer than any single head. Mention interpretability studies showing distinct head roles emerging naturally.
Asked at:GoogleOpenAIMeta
Share:

54.What is the difference between encoder-only and decoder-only models?

Answer

Encoder-only models like BERT read bidirectionally into rich representations, excelling at classification, retrieval, and extraction. Decoder-only models like GPT generate left to right, excelling at open-ended creation and chat. Mention encoder-decoder hybrids like T5 for translation-style sequence-to-sequence tasks.
Asked at:GoogleMetaMicrosoft
Share:

MLOps

55.What is MLOps and why is it important?

Answer

MLOps applies DevOps practices to ML: reproducible training pipelines, experiment tracking, model versioning and registries, CI and CD for models, staged deployment with shadow and canary releases, production monitoring for drift and performance, and automated retraining. It matters because models decay as data shifts, and without versioning plus monitoring you cannot reproduce results or detect silent failures.
Asked at:GoogleMicrosoftAmazon
Share:

56.What is concept drift versus data drift and how do you respond?

Answer

Data drift shifts input distributions while the true mapping stays fixed, whereas concept drift changes the mapping itself, such as fraud patterns evolving. Detect both with PSI, KS tests, and prediction-distribution monitors, then respond with retraining, reweighting, or fresh labels depending on severity. Mention pairing statistical alerts with business-metric guardrails.
Asked at:GoogleUberAmazon
Share:

57.How do you version datasets and models reproducibly?

Answer

Version datasets with content hashes and immutable snapshots (DVC, Delta Lake time travel), recording exact train splits alongside code commits. Version models in a registry with lineage linking data version, code, hyperparameters, and metrics, promoting artifacts through staged environments. Mention that reproducibility requires pinning data, code, seeds, and environments together.
Asked at:GoogleMicrosoftDatabricks
Share:

58.What belongs in a model monitoring dashboard post-launch?

Answer

Track prediction distributions, feature drift scores, ground-truth-joined accuracy where labels arrive, latency and error rates, and business KPIs the model should move. Alert on symptom-level SLO breaches with runbooks, not on every metric wiggle. Mention shadow or canary comparisons to separate model regressions from traffic shifts.
Asked at:GoogleUberNetflix
Share:

59.What is a feature store and when is it overkill?

Answer

A feature store centralizes feature definitions with point-in-time correct serving so training and inference see identical values. It pays off with many models sharing features or strict consistency needs, and is overkill for a single model with a handful of stable features. Mention online versus offline stores for low-latency versus training access.
Asked at:UberAirbnbDoorDash
Share:

60.What is canary deployment for ML models specifically?

Answer

Canary routes a small traffic slice to the new model while the champion serves the rest, comparing business and quality metrics before full rollout. For ML add prediction-distribution checks and delayed-label handling, since model harm often appears in slices rather than averages. Mention automatic rollback triggers on guardrail breaches.
Asked at:GoogleAmazonUber
Share:

61.What is the difference between batch and online inference?

Answer

Batch inference scores large datasets on a schedule with high throughput and relaxed latency, ideal for recommendations refreshes or nightly risk scoring. Online inference serves single requests in real time behind strict latency SLOs, needing optimized runtimes and autoscaling. Mention cost profiles: batch uses cheap interruptible compute, online pays for always-warm capacity.
Asked at:GoogleAmazonNetflix
Share:

62.What is shadow deployment and when do you use it over canary?

Answer

Shadow mirrors live traffic to the new model without serving its outputs, scoring quality safely at full volume. Prefer it over canary when outputs affect money, safety, or compliance and cannot risk any user exposure. Mention the doubled inference cost and the need for joined logging to compare decisions.
Asked at:UberGoogleAmazon
Share:

Evaluation

63.How do you evaluate the performance of an AI model?

Answer

Choose metrics for the task: accuracy, precision, recall, F1 and ROC-AUC for classification (PR-AUC for imbalanced data), MAE and RMSE for regression, BLEU and ROUGE or human eval for generation, plus latency and cost. Always evaluate on a held-out test set, use cross-validation for small data, and slice metrics by cohort to catch hidden failures. Mention confusion matrices and calibrating thresholds to business costs.
Asked at:GoogleOpenAIMeta
Share:

64.What is cross-validation and when is stratified k-fold needed?

Answer

Cross-validation rotates train and validation splits to estimate generalization robustly instead of trusting one split. Stratified k-fold preserves class ratios per fold and is needed for imbalanced data, where plain splits could starve the minority class. Mention nested variants when tuning hyperparameters and estimating performance simultaneously.
Asked at:GoogleAmazonMicrosoft
Share:

65.How do precision, recall, and F1 differ and when does each matter?

Answer

Precision measures correctness among positive predictions, punishing false alarms, while recall measures coverage of actual positives, punishing misses. F1 is their harmonic mean for a single balanced number. Choose precision for spam or fraud alerts, recall for disease screening, and PR-AUC over ROC-AUC under heavy imbalance.
Asked at:GoogleMetaAmazon
Share:

66.What is data leakage and how do you detect it?

Answer

Leakage feeds future or target-derived information into training features, producing unrealistically good validation that collapses in production. Detect it with suspiciously perfect scores, temporal validation splits, and feature-importance reviews flagging impossible predictors. Mention strict time-based cutoffs and pipeline audits as prevention.
Asked at:GoogleUberAirbnb
Share:

67.What is the difference between online and offline model evaluation?

Answer

Offline evaluation scores models on historical held-out data with metrics like AUC, which is cheap but blind to feedback loops and UX effects. Online evaluation (A/B tests, interleaving) measures live business impact with real users at higher cost and risk. Mention shadow deployment as a middle ground that scores production traffic without influencing it.
Asked at:GoogleMetaNetflix
Share:

68.What is BLEU versus ROUGE and when is human eval still needed?

Answer

BLEU measures n-gram precision for translation-likeness while ROUGE measures recall-oriented overlap for summarization coverage. Both correlate weakly with real quality on open-ended generation, so human or strong-model judging on rubrics remains the standard for assistants. Mention task-specific suites like MMLU alongside human review.
Asked at:GoogleMicrosoftMeta
Share:

69.What is the difference between validation and test sets?

Answer

The validation set guides decisions during development: tuning, early stopping, and model selection. The test set is locked away and run once at the end for an unbiased final estimate. Reusing test data for choices leaks it into training by another name, which is why disciplined teams version and gate access to it.
Asked at:GoogleAmazonMeta
Share:

70.What is class imbalance and which techniques actually help?

Answer

Imbalance starves the model of minority-class signal, collapsing recall while accuracy looks fine. Techniques that help include class weights and focal loss, smart resampling (SMOTE cautiously), threshold tuning on PR curves, and collecting targeted data. Mention evaluating with PR-AUC and sliced metrics rather than accuracy.
Asked at:GoogleUberAirbnb
Share:

71.What is early stopping and what are its pitfalls?

Answer

Early stopping halts training when validation loss stops improving for a patience window, saving compute and curbing overfitting. Pitfalls include noisy validation triggering premature stops, stopping before grokking-style late gains, and masking problems better fixed with data or architecture. Mention checkpointing the best weights rather than the final ones.
Asked at:GoogleAmazonMicrosoft
Share:

72.What is A/B testing for ML features and what ruins the readout?

Answer

Randomized control versus treatment isolates the feature's causal lift on north-star and guardrail metrics. Readouts get ruined by peeking without sequential methods, novelty effects, network interference between users, and underpowered runtimes. Mention pre-registered metrics, minimum runtime covering weekly cycles, and CUPED variance reduction.
Asked at:GoogleMetaNetflix
Share:

73.What is feature importance versus SHAP values?

Answer

Built-in importance scores rank features by split gains or weights, which is fast but biased toward high-cardinality features and silent on direction. SHAP values attribute each prediction fairly per game theory, showing magnitude and direction per feature and instance. Mention using SHAP for audits and debugging individual bad predictions.
Asked at:GoogleMicrosoftAirbnb
Share:

74.What is model calibration and why does it matter?

Answer

Calibration aligns predicted probabilities with observed frequencies, so a 70 percent prediction happens about 70 percent of the time. It matters wherever thresholds drive actions: triage queues, fraud holds, and abstention policies. Mention Platt scaling, isotonic regression, and reliability diagrams for checking.
Asked at:GoogleMicrosoftUber
Share:

75.What is red-teaming for AI models?

Answer

Red-teaming adversarially probes models for jailbreaks, bias, disallowed content, and dangerous capabilities before release. Findings feed mitigations, refusal tuning, and monitoring rules, then get retested in later versions. Mention combining expert humans with automated attack generation for coverage.
Asked at:OpenAIAnthropicMicrosoft
Share:

💰 Salary Insights

AI Engineer in

Loading salary data…
View full salary data on SalaryByRole →

Platform

  • Features
  • Launch Guide
  • Weekly Battle
  • Leaderboard
  • Rules
  • Brand Attribution

Collective

  • Founders
  • Hall of Fame
  • Post Mortem
  • Events

Topics

  • Tech News

Job Hunt

  • Find Jobs
  • Interview Prep
  • Layoff Tracker

Compare

  • vs. ProductHunt
  • vs. BetaList

Company

  • About
  • Support

Legal

  • Privacy
  • Terms
  • Code of Conduct

Resources

  • Blog
  • Launch Checklist

Free Tools

  • Name Generator
  • Analytics Generator
  • OG Preview
Stay in the LoopEnter your EmailGet The Latest Updates
X (Twitter)GitHub