Interview questions in AI & ML, page 20
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.
Visualizing long-term trend versus seasonality
A line chart over the full three years, often with a moving average, shows the long-term trend; a seasonal plot overlaying each year by month, or a month-of-year box plot, reveals…
How does a plenoptic camera enable post-capture refocus?
Light field records ray direction plus position via a microlens array, refocusing shears and integrates the 4D data to choose a virtual focal plane.

Describe a basic lifecycle policy to manage cloud storage costs
This tests cost optimization via tiered storage and automated expiration. Strong answers list transitions from Standard to IA to Glacier, then deletion after set days, plus retrieval costs. A red flag is using manual scripts instead of native lifecycle rules.
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.
Why merge a burst instead of one long low-light exposure?
Short frames avoid motion blur and clipping while averaging cuts noise; align frames and merge robustly, rejecting misaligned regions to avoid ghosting.
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.
How does focus stacking build an all-in-focus image?
Align frames, measure local sharpness as a focus metric, select or blend the sharpest source per region, then composite.
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.
What data augmentations help small image datasets?
Apply label-preserving transforms like flips, crops, rotation, color jitter, and mixing to enlarge effective data and reduce overfitting.
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.
Deploy a saved model as a REST prediction service
Load the artifact, wrap it in a predict API, containerize, host with autoscaling, add monitoring.
Precision vs recall in object detection.
Precision is fraction of detections that are correct, recall is fraction of true objects found; prioritize recall for safety-critical detection, precision when false alarms are costly.

Design a showback or chargeback system for ML infrastructure costs
Tag workloads to cost centers; define shared-resource formulas; automate reconciliation; use showback.
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