Advanced interview questions in AI & ML, page 3
Adapting a classification CNN for segmentation
Replace the dense head with conv layers, upsample via transposed convolutions, and fuse encoder skip connections to recover spatial detail lost to downsampling.
Identify RAG latency bottlenecks and propose optimizations
This tests systems thinking across the RAG pipeline. A strong answer names four bottlenecks—embedding, search, chunking, and generation—and pairs each with caching, index tuning, and distillation. Red flag: GPU scaling without indexing fixes.
Depthwise separable convolution cost savings
Separable conv splits standard conv into per-channel spatial filtering plus a 1x1 pointwise mix, cutting cost by roughly 1/N plus 1/k².

How would you architect a multi-turn conversational RAG system?
This tests memory and query reformulation design beyond single-turn RAG. A strong answer covers 5-10 turn windows, LLM-based rewriting with coreference resolution, hybrid fallbacks, and summarized memory.
Translation equivariance versus invariance in CNNs
Convolution is equivariant, shifting input shifts feature maps; invariance comes only from pooling and global aggregation. Strict invariance is partial and broken by strided sampling.
How do you prevent future leakage in time-series preprocessing?
This tests temporal causality in feature engineering and validation. Use only past data for lags and rolling windows and enforce a rolling validation split without shuffling. Red flags are random k-fold CV and global standardization leaking future information.
How would you standardize a 500GB dataset that does not fit in RAM?
This tests two-pass statistics for out-of-core scaling. A good answer outlines: first compute mean and variance via sums and counts; second apply z = (x - mean) / std; mention Dask-ML or PySpark. A red flag is averaging chunk-wise means without weighting.
Stemming versus lemmatization in text preprocessing
Stemming chops affixes fast but crudely, yielding non-words; lemmatization maps to real dictionary base forms using POS, slower but accurate; skip both for embedding or transformer models.
Securing tool-using LLM agents
Name indirect prompt injection, data exfiltration, and unsafe tool execution, then defend with sandboxing, least-privilege scoped tools, input/output filtering, and human-in-the-loop on risky actions.
Focal Loss and class imbalance in detectors
Focal loss multiplies cross-entropy by a (1-p)^gamma factor that down-weights easy, well-classified examples so the vast easy background does not swamp the loss.

Design multi-tenant GPU cluster scheduling and preemption policies
Tests ability to design fair GPU scheduling preventing starvation and noisy-neighbor issues. Answer: Kueue for fair-share, namespace quotas with MIG, priority classes with backoff.
Designing an agent that resolves ambiguity
Detect ambiguity, gather evidence with the contact API, resolve relative time deterministically, ask the user only when genuinely uncertain, then confirm before the irreversible booking.
Deploying real-time detection on edge devices
Pick an efficient one-stage detector, train with augmentation, then quantize, prune, and compile to a hardware-accelerated runtime, measuring latency and accuracy tradeoffs.
Detector head losses: regression versus classification
The head splits into a classification branch using cross-entropy over classes and a regression branch using a robust Smooth L1 or IoU loss on box offsets, combined as a weighted sum.

How would you monitor data quality for a C-level dashboard pipeline?
Designing production data observability for executive dashboards. A strong answer maps freshness SLAs, completeness checks, and distribution drift detection to business impact.

Design a clickstream pipeline from ingestion to data warehouse
Tests data pipeline design under load: buffering, idempotent transform, and warehouse modeling. A strong answer orders ingestion via Kinesis or MSK, Spark EMR sessionization, and Redshift star schemas. Red flag: no buffer and direct warehouse writes.
Fairness and robustness gates in CI/CD
Sliced fairness metrics across subgroups, robustness checks via perturbation and adversarial sets, all compared to thresholds that fail the build.
Explain panoptic segmentation and Panoptic Quality
Panoptic assigns every pixel a class and instance id over things and stuff; PQ factors into SQ, average IoU of matches, times RQ, an F1 over matched segments.
DDIM: faster diffusion sampling
DDIM defines a non-Markovian deterministic process sharing DDPM's training, letting you skip steps and sample in far fewer iterations.
Adapting ViT for dense semantic segmentation
Reassemble patch tokens into a 2D feature map, add a decoder, and handle low resolution plus quadratic attention cost.
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