Skip to content
tezvyn:

🤖AI & ML

Artificial intelligence, machine learning, and data science

546 bites

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

Interview questions in AI & ML, page 5

easy2 min read

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.

advanced2 min read

FlashAttention and IO-Aware Attention

FlashAttention is IO-aware, tiling and fusing attention in fast SRAM to avoid materializing the n-by-n matrix in slow HBM.

easy2 min read

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?
easy2 min read

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.

easy2 min read

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.

intermediate2 min read

SIFT scale and rotation invariance

Scale-space extrema via difference-of-Gaussians give scale invariance; a dominant gradient orientation gives rotation invariance; the descriptor is a normalized gradient histogram.

Online vs offline feature store architecture and use cases
easy2 min read

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.

easy2 min read

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.

intermediate2 min read

SIFT versus SURF versus ORB

SIFT is most accurate but slow with float descriptors; SURF approximates SIFT for speed; ORB is fast, binary, and free, ideal for real-time and embedded.

intermediate2 min read

Design a system to detect training-serving skew for a numerical feature

Tests ML monitoring design via statistical distribution comparison between training and live data. Strong answers cover PSI/KS tests, windowed thresholding, and tiered alerting. Red flag: comparing raw values instead of distributions or ignoring alert fatigue.

intermediate2 min read

How do you select in-context examples for text-to-SQL prompts?

What it tests: practical ICL design for structured generation. Answer outline: select examples by SQL syntax similarity plus pattern diversity, order from simple to complex, and anchor schema context. Red flag: claiming random examples work fine.

How would you combine customer and transaction DataFrames and describe join types?
intermediate2 min read

How would you combine customer and transaction DataFrames and describe join types?

This tests relational merging and join semantics in pandas. Answer: use pd.merge on customer_id, then groupby sum; describe inner, left, right, and outer joins by key preservation. Red flag: proposing concat without keys or conflating inner and left joins.

intermediate1 min read

Sub-20ms online feature serving

An in-memory key-value store (Redis) as the online feature store, precomputed features, streaming updates, and offline-online consistency.

intermediate2 min read

Descriptor matching and Lowe's ratio test

Match by nearest-neighbor descriptor distance; Lowe's ratio test keeps a match only if the best is clearly better than the second-best, rejecting ambiguous ones.

Describe two prompt-based techniques to ensure valid LLM JSON output
intermediate2 min read

Describe two prompt-based techniques to ensure valid LLM JSON output

This tests output constriction via prompt design. First, embed an exact JSON skeleton with empty values. Second, provide few-shot exemplars mapping inputs to valid JSON. A red flag is suggesting only post-hoc regex repair or larger models.

intermediate2 min read

What is vectorization in NumPy and pandas?

Tests if you know why NumPy operations beat Python loops via contiguous memory and C-level SIMD. A strong answer defines vectorization as array-wide operations without explicit loops, contrasts a ufunc to a for-loop, and cites interpreter overhead removal.

intermediate2 min read

Bag of Visual Words model

Cluster many local descriptors (e.g. k-means) into visual words; assign each image's features to words; represent the image as a histogram of word counts for a classifier.

intermediate2 min read

Zero-Shot, Few-Shot, and Chain-of-Thought Trade-offs

Zero-shot is cheap but weak on reasoning, few-shot adds demos at token cost, CoT boosts multi-step accuracy but spends the most tokens and latency.

intermediate2 min read

Backfill a complex feature for millions of users without impacting production

Reuse the live pipeline on historical partitions, run bounded batches on separate compute, stage results, and validate before promotion.

Calculate total and average sales per region in pandas
intermediate2 min read

Calculate total and average sales per region in pandas

Tests split-apply-combine fluency. A strong answer groups by Region then calls agg with a dict or named aggregation to return sum and mean of Sales_Amount together. Red flag: chaining separate groupby calls or looping rows manually.

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