Easy interview questions in AI & ML, page 2
What is the difference between lossy and lossless image compression?
This tests irreversible discard versus perfect reconstruction. A strong answer defines lossy as dropping detail, lossless as fully reversible, names JPEG, PNG, and chooses lossless for masters, lossy for web. Red flag: claiming lossless is always smaller.

Describe a grayscale histogram and its use in exposure and equalization
Tests pixel distribution intuition. A strong answer covers intensity bin counts, left or right clustering for exposure errors, and CDF-based redistribution for equalization. Red flag: calling equalization min-max stretching without cumulative mapping.
Self-Attention versus Recurrent Architectures
Each token attends to all others via query-key-value, enabling parallelism and direct long-range links.

Design ingestion for clickstream and batch product metadata
Use a data lake for raw data, a feature store for joins, columnar formats for batch, and row formats for events.

ETL vs ELT: when to prefer each for ML?
Tests architecture tradeoffs. Contrast ETL's pre-load transformation with ELT's in-warehouse transformation, map structured legacy to ETL and raw lakes to ELT, and cite ML iteration needs. Red flag: calling one better ignoring compute placement or volume.

How would you implement a simple box blur on a grayscale image?
Iterate interior pixels, sum the N by N neighborhood, divide by kernel area, write to a new buffer.
What data validation strategy prevents new categories from breaking your encoder?
Lock categorical domains in a schema, reject unseen categories before encoding, and use an OOV bucket as fallback.
What is an image histogram and how does histogram equalization improve contrast?
Define a histogram as pixel counts per intensity; explain equalization normalizes the CDF to spread intensities across the full range.
Causal versus Masked Language Modeling
Pre-training learns general language from unlabeled text; CLM predicts the next token left-to-right, MLM predicts masked tokens using both sides.
Harris corner detector and corner stability
Harris finds points where intensity changes strongly in all directions using the structure tensor of gradients; corners are well localized in two directions, unlike edges.
Image gradients, Sobel, and Canny
The gradient measures local intensity change in x and y; Sobel approximates it via convolution kernels; Canny uses gradient magnitude and direction plus non-max suppression and hysteresis.

What problems does a Feature Store solve in ML systems?
Tests understanding of feature store value beyond storage. Great answers cover: feature reuse across teams, managed transformation pipelines, and online/offline consistency to prevent training-serving skew. Red flag: calling it simply a database or cache.
How would you construct zero-shot and few-shot prompts for feedback classification?
Tests knowledge of zero-shot versus few-shot prompt structure. Zero-shot gives instructions, labels, and format without examples; few-shot prepends 2-4 labeled demonstrations before the target input. Red flag: calling an example-containing prompt zero-shot.

Online vs offline feature store architecture and use cases
This tests latency trade-offs between real-time and batch infrastructure. Contrast fast online lookups against batch offline stores; fraud detection maps to online and model training to offline. Red flag: treating them as interchangeable and ignoring latency.
Explain Chain-of-Thought prompting, its reasoning mechanism, and ideal use cases
This tests reasoning scaffolding. A good answer says CoT makes the model emit intermediate steps before the final answer, excelling at multi-step math and logic versus direct instructions.
Describe supervised fine-tuning for a pre-trained language model
Tests if you know SFT aligns a base model to instructions using curated prompt-completion data. A strong answer covers next-token prediction on completions, conversational formats, and small learning rates.
Pre-training versus fine-tuning an LLM
Pre-training is broad self-supervised next-token prediction on huge corpora at massive cost; fine-tuning adapts on small labeled data cheaply.
Epipolar constraint for correspondence search
The match for p1 must lie on its epipolar line in the second image, reducing a 2D search to 1D; the relation is encoded by the fundamental matrix.
Disparity and depth in stereo vision
Disparity is the horizontal shift of a point between left and right images; depth is inversely proportional to disparity given baseline and focal length.
What is robots.txt, why respect it, and consequences of ignoring it?
It disallows crawler paths via the Robots Exclusion Protocol; honoring it prevents server strain, legal risk, and broken trust.
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