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 7

intermediate2 min read

Mode collapse in GAN training

Generator produces few outputs ignoring data diversity, caused by chasing whatever fools the current discriminator; mitigate with minibatch discrimination, unrolled GANs, or Wasserstein loss.

Why not stop an A/B test when it looks significant early?
intermediate2 min read

Why not stop an A/B test when it looks significant early?

Tests whether you understand repeated looks inflate false positives. The term is peeking: checking daily can turn a 5% Type I error rate into roughly 15% by day 3. Red flag: citing "low sample size" without stating that early stopping invalidates the p-value.

intermediate1 min read

Prompt injection versus jailbreak, and defenses

Injection hijacks the model via untrusted data overriding developer instructions; jailbreak coaxes a model past its safety policy. Defense: separate trusted instructions from untrusted data and filter.

intermediate2 min read

Evaluating generative models with FID versus IS

FID compares Inception feature distributions of real and fake images via Frechet distance between two Gaussians; it uses real data as reference and detects diversity issues, unlike IS which uses no real…

How do network effects violate A/B tests and how to mitigate them?
intermediate2 min read

How do network effects violate A/B tests and how to mitigate them?

Tests SUTVA violations and network experiment design. Answers note treated users alter control outcomes, then propose social-graph cluster randomization to isolate spillovers. Red flag: ignoring peer-to-peer spillover and using user-level randomization.

intermediate1 min read

Analyzing skewed revenue-per-user experiments

Heavy tails inflate variance and slow significance, and the mean is dominated by whales; mitigate via winsorization or capping, log transforms, CUPED variance reduction, or bootstrap and rank tests.

intermediate1 min read

Why U-Net skip connections matter for denoising

Skips carry high-resolution spatial detail from encoder to decoder, preserving fine structure lost in downsampling and easing gradient flow, which lets the model restore detail while removing…

intermediate2 min read

How would you implement automated data validation before training?

Enforce schema contracts, halt training on failure, quarantine bad batches, and alert owners.

intermediate2 min read

How text prompts guide Stable Diffusion

A frozen text encoder turns the prompt into token embeddings, which feed the U-Net via cross-attention at each denoising step so the prompt steers generation; classifier-free guidance amplifies the…

intermediate2 min read

How do you programmatically promote a retrained model to production?

Compare on held-out data using significant metric uplift, schema, latency, and drift checks before shadow release.

What is Simpson's Paradox and how can it bias A/B tests?
intermediate2 min read

What is Simpson's Paradox and how can it bias A/B tests?

Tests whether you recognize that aggregate trends can reverse within subgroups. A strong answer defines the paradox, gives an A/B example where treatment wins overall but loses in every segment due to skewed allocation, and prescribes stratified analysis.

intermediate2 min read

Unpaired image translation with CycleGAN

CycleGAN uses two generators and two discriminators with a cycle-consistency loss that forces translating to the other domain and back to reconstruct the input, removing the need for paired data.

intermediate1 min read

PTQ versus QAT for INT8 quantization

PTQ quantizes a trained model with light calibration, fast and cheap but more accuracy loss; QAT simulates quantization during training, higher accuracy but costly.

intermediate2 min read

What memory problem PagedAttention solves

Pre-allocating contiguous max-length cache per sequence wastes memory through internal and external fragmentation; PagedAttention stores KV in fixed non-contiguous blocks like OS paging.

What trade-offs decide managed ML platforms versus open-source Kubernetes?
intermediate2 min read

What trade-offs decide managed ML platforms versus open-source Kubernetes?

Weigh total cost plus hidden engineering headcount, lock-in vs flexibility, and audit feature gaps.

intermediate2 min read

Describe Transformer architecture and why self-attention beats recurrence

This tests parallelization and long-range dependencies. A strong answer outlines the encoder-decoder stack with multi-head self-attention, contrasts O(1) sequential steps versus RNNs' O(n) unrolling, and warns that describing it as averaging misses key ideas.

intermediate2 min read

Detecting RAG hallucinations with a confidence score

Decompose the answer into claims, verify each against retrieved context with NLI or an LLM judge, aggregate into a faithfulness confidence score, and flag unsupported claims.

intermediate2 min read

Camera intrinsics, extrinsics, and the essential matrix

Intrinsics map camera coords to pixels, extrinsics are camera pose in the world; the essential matrix relates normalized points across two views, encoding relative rotation and translation up to scale…

How would you design a reproducible ML training pipeline?
intermediate2 min read

How would you design a reproducible ML training pipeline?

Tests if you can version ML's three moving parts: code, data, and environment. Good answers cover Git for code, DVC or lakehouse versioning for data, and Docker plus locked dependencies for environments.

How do you leverage and fine-tune BERT for niche classification?
intermediate2 min read

How do you leverage and fine-tune BERT for niche classification?

Tests transfer learning with scarce labels. Outline: pick a domain-adjacent checkpoint, add a classification head, use learning rates near 2e-5 with early stopping, and stratify tiny validation splits.

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