Intermediate interview questions in AI & ML, page 9
Fixing a prompt that ignores key constraints
Move the critical constraint to a prominent position, state it positively and specifically, separate instructions from data with delimiters, and add a concrete example.
Diagnosing sycophancy from RLHF
Annotators reward agreeable, inoffensive answers so the reward model learns to favor them, fix by diversifying labelers, rewarding factual correctness over agreeableness, and…
Reconcile rising sign-ups with falling revenue per user
Reconcile the metrics via total revenue and segment mix, frame the tradeoff, recommend an action.
How do you adapt ML training for spot instance interruptions?
Tests resilience under preemption. Strong answers cover frequent checkpoints to durable storage, SIGTERM handling, idempotent retries with budgets, and compute-state separation. Red flag: saving checkpoints only on local ephemeral disks or solely at epoch end.
Three ways to cut LLM inference cost
Quantization to shrink the model, continuous batching with paged attention to raise GPU utilization, and distillation or smaller routed models for easy queries.
When to choose RAG over fine-tuning
RAG for fresh, factual, citable knowledge that changes often, fine-tuning for behavior, style, or format the model must internalize.
Two ways accurate data can still mislead in a chart
Name distortions like truncated axes or cherry-picked ranges, give the fix for each, explain why each misleads.
Chunking and embedding a RAG corpus
Choose chunk size and overlap balancing context vs precision, prefer semantic boundaries, then pick an embedding model matching domain and dimension, and store with metadata.
Explain k-means user segments to a marketing team
Name each segment, profile its defining traits, show size and value, recommend an action.
Design a near real-time cost visibility system for ML teams
Tests cost attribution across shared ML infrastructure and streaming pipeline design. Strong answers combine billing exports with resource labels, sub-hour aggregation, and anomaly detection for training spikes.
Evaluating a multi-tool LLM agent
Measure end-to-end task success, plus trajectory quality like correct tool choice and arguments, efficiency via steps and cost, and robustness to errors and edge cases.
Agent planning beyond a ReAct loop
ReAct adapts step by step but costs many calls, plan-then-execute drafts a full plan upfront for fewer calls but is brittle to surprises, hierarchical decomposition splits goals…
How do you speed up a slow detection model?
Quantization, pruning, distillation, lighter backbones, and resolution or batching tweaks, each trading some accuracy or effort for speed.
Detecting catastrophic forgetting in continual fine-tuning
Maintain a frozen held-out benchmark of original capabilities, evaluate after every fine-tune, track per-capability deltas, and alert on regressions.
Detecting and responding to model and concept drift
Define drift, pick a metric like PSI or falling AUC against labels, then investigate, retrain, validate.
How do you train and evaluate on imbalanced defect data?
Resampling, class weighting, focal loss, and anomaly framing for training; evaluate with precision, recall, PR-AUC, and F-beta, not accuracy.

How do you ensure ML experiment reproducibility beyond random seeds?
Tests system-level reproducibility through data versioning, environment capture, and pipeline automation. Strong answers cover versioned datasets, containerized dependencies, and immutable experiment logs.
Dynamic batching and the throughput-latency trade-off
The server groups concurrent requests into one batch to use the GPU fully, but larger batches and waiting to fill them raise per-request latency and time to first token.
What a feature store solves: skew and consistency
Central repository of computed features, one definition serving training and inference, reuse across models.
CPU vs GPU vs Edge TPU for inference.
CPU is flexible but slow, GPU offers massive parallelism at high power, Edge TPU gives efficient low-power int8 inference but is constrained; choose by latency, power, cost, and model fit.
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