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 19

intermediate1 min read

Multimodal video understanding architecture

Sample frames, encode them into visual tokens via a vision encoder and projector, concatenate with text tokens, let cross-attention fuse them.

easy1 min read

The MapReduce paradigm explained

Map applies a function to each input record emitting key-value pairs in parallel; a shuffle groups values by key; reduce aggregates each key's values into a result.

advanced1 min read

How do BYOL and Barlow Twins avoid representation collapse?

Collapse is embeddings shrinking to a constant or low-rank subspace; BYOL uses predictor plus momentum target plus stop-gradient, Barlow Twins decorrelates feature dimensions.

What is the wrong and right way to manage ML database secrets?
intermediate2 min read

What is the wrong and right way to manage ML database secrets?

This tests secret management hygiene for ML pipelines. A strong answer rejects hardcoded secrets and env vars, then proposes AWS Secrets Manager with IAM retrieval, TLS, caching, and rotation. A red flag is suggesting .env files, ConfigMaps, or CLI arguments.

advanced1 min read

Three techniques to cut LLM inference latency

Quantization shrinks weights with small accuracy risk, KV-cache plus continuous batching boost throughput, speculative decoding drafts tokens for lossless speedup.

intermediate2 min read

Spark broadcast join versus shuffle join

A broadcast join sends the small table to every executor so the large table joins locally with no shuffle of its rows; the default sort-merge join shuffles both tables across the network, which is costly.

easy1 min read

How do you build an HDR image from bracketed exposures?

Align frames, recover the camera response function, merge to a linear radiance map weighted by exposure, then tone map for display.

Design a cryptographically verifiable ML audit trail from dataset to deployment
advanced2 min read

Design a cryptographically verifiable ML audit trail from dataset to deployment

Tests cryptographic provenance and tamper-evident ML pipelines. Strong answers cover content-addressed datasets, signed training logs linking code and hyperparameters to model hashes, and deployment signature checks.

intermediate2 min read

LSTM vs GRU gating and trade-offs

LSTM has three gates and a separate cell state, GRU merges gates and state into two, so GRU is lighter and faster while LSTM may model long dependencies better.

intermediate2 min read

Data skew in Spark and salting

Data skew is uneven key distribution sending most rows to one partition and straggler task; salting appends a random suffix to hot keys to spread them across partitions, joining in two…

easy1 min read

Outline the classic image stitching pipeline.

Detect and match features like SIFT, estimate a homography with RANSAC, warp and blend with multiband or feathering.

advanced2 min read

Design a defense-in-depth strategy against adversarial evasion on a deployed image classifier

Proactive: adversarial training, preprocessing, ensembles.

intermediate1 min read

Static vs contextual word embeddings

Static embeddings give one fixed vector per word ignoring context, contextual ones vary by sentence and resolve polysemy at higher compute cost.

intermediate1 min read

Spark RDDs, DataFrames, and Datasets

RDDs are low-level typed object collections with no built-in optimization; DataFrames are named columns optimized by Catalyst and Tungsten; Datasets add compile-time type safety in…

intermediate1 min read

How does smartphone Portrait Mode produce bokeh?

Estimate per-pixel depth via dual-pixel or stereo or learning, segment the subject, then apply depth-dependent blur.

easy2 min read

How do you attribute cloud costs to ML projects and implement tagging?

Tests knowledge of resource tagging for cost attribution. A strong answer names provider-specific tags or labels, embeds them in infrastructure-as-code, and activates cost allocation reports.

intermediate1 min read

Encoder, decoder, and encoder-decoder Transformers

Encoder-only uses bidirectional masked-token pretraining for understanding tasks, decoder-only uses causal next-token prediction for generation, encoder-decoder uses span corruption for…

advanced2 min read

Diagnosing Spark executor OutOfMemoryError

Check the Spark UI for skew and spills, inspect executor memory and partition count, find culprits like wide collect, huge shuffles, or skewed keys, and fix via more partitions, memory tuning, or…

intermediate1 min read

Compare Gray World and White Patch white balance.

Gray World assumes average scene color is gray, White Patch assumes the brightest pixel is white, both fail on dominant colors or clipping; learning predicts illuminant from data.

Differences between on-demand, reserved, and spot EC2 instances?
easy2 min read

Differences between on-demand, reserved, and spot EC2 instances?

Tests cost-reliability-commitment tradeoffs for ML infrastructure. Good answers map on-demand to experiments, reserved for production training, and spot to fault-tolerant batch jobs. Red flag: spot for real-time serving or skipping reserved capacity analysis.

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