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 8

intermediate1 min read

Serving for online and batch predictions

A low-latency online path (synchronous, autoscaled, real-time features) and a high-throughput batch path (parallel, cost-optimized, large jobs) sharing one model artifact and feature definitions.

intermediate2 min read

Direct versus indirect injection and agent defenses

Direct injection comes from the user prompt; indirect hides in third-party data the agent ingests like web pages.

intermediate2 min read

RL components and how Q-learning works

Agent acts on the environment, observes state and reward, seeking to maximize cumulative discounted reward; Q-learning iteratively updates Q(s,a) toward reward plus discounted best…

intermediate2 min read

Walk me through a CNN's layers for image classification

Tests hierarchical feature extraction in CNNs. Answer: conv filters learn edges-to-objects with shared weights, pooling reduces dimensions and adds invariance, fully-connected layers classify.

intermediate2 min read

Contrastive self-supervised learning with SimCLR

Two augmentations of one image form a positive pair, other images in the batch are negatives; an encoder plus projection head and the NT-Xent loss pull positives together and push negatives apart.

intermediate1 min read

Mixture of Experts architecture and routing

Many expert FFNs per layer, a router picks top-k experts per token, only those compute so active params are far fewer than total.

intermediate2 min read

Prototypical Networks for few-shot classification

An encoder embeds support examples, each class prototype is the mean embedding of its support examples, and a query is classified by nearest prototype using a distance like Euclidean via softmax.

intermediate2 min read

Describe securing an automated ML pipeline and CI/CD integration points

Tests ML supply-chain depth versus bolt-on appsec. Strong answers stage checks across

intermediate1 min read

Designing a production LLM summarization eval

A representative gold set, quality via human or LLM-as-judge plus faithfulness checks, and operational metrics like p95 latency and cost per request.

intermediate2 min read

How would you programmatically monitor a deployed model for demographic bias?

Tests operationalizing fairness beyond static audits. Track group metrics like parity and equalized odds; slice by protected attributes; alert on drift; route violations to review. Red flag: treating fairness as a one-time check versus continuous monitoring.

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.

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.

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.

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…

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.

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…

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.

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