Skip to content
tezvyn:

🤖AI & ML

Artificial intelligence, machine learning, and data science

298 bites

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

Intermediate interview questions in AI & ML, page 2

intermediate2 min read

Describe feature store architecture and training-serving skew

This tests FTI pipeline glue and dual-store skew elimination. A strong answer lists offline and online stores, shared transformation logic for consistent compute, and point-in-time correctness. A red flag is calling it merely a database or cache.

Why is 99% accuracy misleading with 1% disease prevalence?
intermediate2 min read

Why is 99% accuracy misleading with 1% disease prevalence?

Tests class imbalance intuition. A strong answer notes that an all-negative classifier hits 99% accuracy, then names precision, recall, F1, and AUC-PR to expose false negatives and false positives. Red flag: claiming accuracy is fine after rebalancing.

How does the Sobel operator approximate image gradients for edge detection?
intermediate2 min read

How does the Sobel operator approximate image gradients for edge detection?

This tests discrete gradient approximation via separable convolution. A strong answer covers 3x3 Gx and Gy kernels as smoothed central differences, then combines magnitude as sqrt(Gx^2 + Gy^2) or L1 norm. A red flag is treating them as arbitrary blur filters.

intermediate2 min read

How gradient descent and the learning rate work

Gradient descent steps downhill along the negative gradient to minimize cost; the learning rate sets step size; too high diverges or oscillates, too low converges painfully slowly.

intermediate3 min read

How would you scale 1TB Pandas feature computation across machines?

This tests memory limits and distributed migration. A strong answer contrasts single-machine tactics, column pruning and efficient dtypes, with distributed frameworks like Dask or Spark, noting shuffle costs and API parity.

intermediate2 min read

How did Chinchilla change compute allocation between model size and data size?

This tests whether you know prior scaling fixed data while growing parameters, but Chinchilla showed parameters and tokens must scale equally. A good answer: double both together, so train smaller models on more data. Red flag: huge models, fixed data.

Zero-padding vs reflect vs replicate padding and their visual artifacts
intermediate2 min read

Zero-padding vs reflect vs replicate padding and their visual artifacts

This tests boundary assumptions in convolution. Zero-padding adds black borders causing dark vignettes; reflect padding mirrors edges for continuity; replicate padding repeats edge values outward. A red flag is saying padding choice does not affect outputs.

intermediate2 min read

How would you design automatic data drift detection for production inference?

This tests reference-vs-live monitoring architecture. A strong answer chunks data, runs univariate per-feature drift, adds multivariate PCA or domain classifiers, and ranks threshold alerts. A red flag is checking aggregate metrics instead of feature shifts.

Explain data, tensor, and pipeline parallelism and hybrid training strategy
intermediate2 min read

Explain data, tensor, and pipeline parallelism and hybrid training strategy

Tests communication and memory tradeoffs of core distributed training strategies. Strong answers contrast data parallelism (shard batch), tensor parallelism (shard layers, all-reduce), and pipeline parallelism (shard stages, p2p), then propose a 3D hybrid…

What causes sudden loss spikes in long pre-training runs?
intermediate2 min read

What causes sudden loss spikes in long pre-training runs?

Name gradient explosions, LR mismatch, FP16 overflow, and poison batches; propose norm checks, rollback, and LR cuts.

intermediate2 min read

How does pre-training dataset composition influence capabilities and biases?

This probes whether you link data mix to capabilities and bias. Answer: code strengthens reasoning, web text adds noise; for science, use domain-adaptive pretraining on filtered literature, instruction tuning, and reasoning distillation, validating via…

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.

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.

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