Skip to content
tezvyn:

🤖AI & ML

Artificial intelligence, machine learning, and data science

546 bites

Test yourself: Top 30 AI & ML interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Interview questions in AI & ML, page 13

Describe the difference between online and batch inference.
easy2 min read

Describe the difference between online and batch inference.

Online uses autoscaling APIs for millisecond-to-second latency; batch uses scheduled compute for minute-to-hour latency.

How can EDA and visualization identify dataset bias before modeling?
advanced2 min read

How can EDA and visualization identify dataset bias before modeling?

Tests operationalizing bias detection before modeling. Strong answers compare sample distributions to population norms, audit feature coverage with heatmaps, and track missingness by subgroup. Red flag: citing only class imbalance or ignoring sampling frame.

advanced1 min read

LLaVA versus Flamingo vision-LLM design

LLaVA projects image features into the LLM input space and feeds them as tokens, keeping the LLM mostly intact; Flamingo inserts gated cross-attention layers inside a frozen LLM.

advanced2 min read

Scene flow versus optical flow

Optical flow is 2D pixel motion in the image plane; scene flow is the 3D motion field of points in space, needing depth via stereo, RGB-D, or LiDAR.

easy2 min read

Deploy a trained model as a containerized REST API

This tests practical MLOps fluency. A strong answer covers loading the artifact, wrapping it in a web server, building a Dockerfile, and exposing health and predict endpoints. Red flag: conflating training with serving or omitting resource limits.

advanced1 min read

Batching strategy for multimodal training

Control dataset mixing ratios, use balanced sampling and per-source weighting, keep enough text-only data to avoid forgetting, and handle variable shapes via grouping or padding.

easy2 min read

How ViT and CNN process an image differently

A CNN slides local filters over the raw pixel grid; a ViT splits the image into patches, flattens and linearly embeds each into a token, adds positional embeddings, and feeds the sequence to…

intermediate2 min read

How would you systematically diagnose high latency in an online inference service?

Check p90/p99 and TTFT to split queuing from compute; inspect queue depth, batch size, GPU, and benchmarks; check cache.

easy1 min read

Perplexity versus BLEU for LMs

Perplexity measures intrinsic next-token prediction quality needing no references; BLEU measures n-gram overlap with reference outputs for tasks like translation.

easy1 min read

Self-attention over image patches explained

Each patch projects to query, key, value; a patch's query is scored against all keys, softmax-normalized into weights, used to combine all values.

Explain model quantization, its benefits, drawbacks, and validation approach
intermediate2 min read

Explain model quantization, its benefits, drawbacks, and validation approach

Tests precision trade-offs in production. Answer: define lowering weights from fp32 to int8/int4; cite memory and latency gains versus accuracy loss; validate with downstream benchmarks and shadow A/B. Red flag: treating as lossless or skipping task metrics.

Explain bias-variance tradeoff and how regularization or tree depth manage it
intermediate2 min read

Explain bias-variance tradeoff and how regularization or tree depth manage it

Tests understanding of generalization error decomposition. Define bias as underfitting and variance as sensitivity to training noise; show regularization and shallow trees trade excess variance for slightly higher bias. Red flag: claiming both can hit zero.

easy1 min read

Why human evaluation is the gold standard

Humans judge fluency, helpfulness, and correctness that n-gram or distribution metrics miss; automated scores correlate weakly with quality, are gameable, and penalize valid diverse outputs.

intermediate1 min read

Inductive biases of ViT versus CNN

CNNs bake in locality and translation equivariance; a plain ViT has almost none beyond patch structure, so it must learn spatial relations from data, needing large datasets or strong pretraining.

intermediate2 min read

How would you design an A/B test for two live ML models?

Tests production experimentation rigor beyond random splitting. Strong answers cover: consistent user hashing for sticky assignment, isolated feature stores, guardrail metrics, and pre-calculated statistical power.

How would feature engineering for categoricals differ for logistic regression versus LightGBM?
intermediate2 min read

How would feature engineering for categoricals differ for logistic regression versus LightGBM?

It tests model-specific encoding decisions. Logistic regression needs one-hot to avoid false ordinality; tree models like LightGBM use ordinal encoding since splits rely on thresholds, not distance.

easy1 min read

Standard metric for image generation quality

Name FID, explain it compares feature distributions of real and generated images via a pretrained network.

intermediate1 min read

Random Forest versus Gradient Boosting

Random Forest trains deep trees in parallel and averages to cut variance; boosting builds shallow trees sequentially, each correcting prior errors to cut bias, often higher accuracy but…

intermediate2 min read

How Swin Transformer achieves linear attention

Swin computes attention within local non-overlapping windows of fixed size, making cost linear in patches, then shifts windows between layers so information crosses boundaries.

Design cost-effective inference for spiky traffic without idle GPUs
advanced2 min read

Design cost-effective inference for spiky traffic without idle GPUs

Tests designing inference that cuts idle GPU cost during troughs yet handles spiky peaks with low latency via SageMaker blue/green fleets, production variants, and CloudWatch baking periods. Red flag: always-on GPU pools with naive auto-scaling.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles