Skip to content
tezvyn:

🤖AI & ML

Artificial intelligence, machine learning, and data science

298 bites

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

Intermediate interview questions in AI & ML, page 6

intermediate1 min read

Re-identification in multi-object tracking

Re-ID matches an object to its prior id using appearance embeddings, not just position; store track features and match re-entering detections by embedding similarity.

intermediate1 min read

Aligning text and image representations

Contrastive learning like CLIP pulls matched image-text pairs together and pushes mismatches apart; alternatively projection layers map one modality into a frozen model's space.

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.

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.

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.

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.

intermediate1 min read

How FID is calculated versus Inception Score

FID fits Gaussians to Inception features of real and fake images then measures Frechet distance; it uses real references and detects mode collapse.

intermediate1 min read

Cross-attention for visual question answering

In cross-attention queries come from one modality and keys/values from the other, e.g. text queries attend over image features so the question selects relevant regions.

What is cross-validation and why is it more robust than a holdout split?
intermediate2 min read

What is cross-validation and why is it more robust than a holdout split?

A single split is noisy and wastes data; k-fold rotates each fold as test, averages scores, and trains on all data.

intermediate1 min read

How to evaluate a RAG system end to end

Measure retrieval (recall, precision, MRR, NDCG) and generation (faithfulness, answer relevance) separately, plus end-to-end correctness.

intermediate2 min read

Why ViTs need positional embeddings

Self-attention is permutation invariant so patch order is lost; positional embeddings restore spatial location. CNNs encode position implicitly via the fixed convolution grid.

intermediate1 min read

How MMLU works and the contamination problem

MMLU is multiple-choice across 57 subjects scored by accuracy; contamination means test items leaked into pretraining, inflating scores.

intermediate1 min read

Reference-free evaluation for open-ended dialogue

ROUGE punishes valid paraphrases; use reference-free LLM-as-judge or learned scorers rating coherence, relevance, and groundedness.

Design a system to monitor a real-time prediction service for feature drift
intermediate2 min read

Design a system to monitor a real-time prediction service for feature drift

Async feature logging, distribution comparison via PSI/KS against training baseline, and threshold-based anomaly alerts.

Model output distribution shifts. What are root causes and next steps?
intermediate2 min read

Model output distribution shifts. What are root causes and next steps?

This tests covariate vs label shift vs concept drift when outputs shift. A strong answer checks features before labels, then feedback loops or staleness. A red flag is generic drift without separating P(X), P(Y), and P(Y|X).

intermediate1 min read

Designing input and output guardrails for a chatbot

Input guardrails filter or classify user prompts (injection, off-topic, PII) before the model; output guardrails validate responses for toxicity, leakage, and policy before sending.

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