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 7

Walk through RLHF's three stages, outputs, and purposes.
intermediate2 min read

Walk through RLHF's three stages, outputs, and purposes.

Tests your grasp of the RLHF pipeline end-to-end. A strong answer lists: pretrain an instruction-following LM, train a reward model outputting a scalar preference score, then fine-tune the LM via RL.

What is robots.txt, why respect it, and consequences of ignoring it?
easy2 min read

What is robots.txt, why respect it, and consequences of ignoring it?

It disallows crawler paths via the Robots Exclusion Protocol; honoring it prevents server strain, legal risk, and broken trust.

intermediate1 min read

Reward models in RLHF and PPO

It learns from human preference comparisons to score responses, then supplies the reward signal that PPO maximizes while a KL penalty keeps the policy near the reference.

intermediate1 min read

The PnP problem in Structure from Motion

PnP recovers a camera's pose from known 3D points and their 2D projections; it registers new frames against the existing point cloud in SfM.

How would you design a system to detect training-serving skew using model registry metadata?
advanced2 min read

How would you design a system to detect training-serving skew using model registry metadata?

This tests statistical monitoring between production data and registry training baselines. Strong answers: schema-bound metadata, incremental stats, drift metrics PSI, tiered alerting. Red flag: schema validation mistaken for drift or manual checks only.

Design a rate-limited REST API data collection script
intermediate2 min read

Design a rate-limited REST API data collection script

Tests client-side throttling discipline versus reactive 429 handling. Strong answers proactively pace calls using rate-limit headers, cap concurrency, and apply exponential backoff with jitter. Red flag: tight-loop retries or ignoring headers.

advanced1 min read

Stereo rectification math and its artifacts

Rectification warps both images by homographies so epipolar lines become horizontal and aligned.

easy2 min read

Walk me through essential Dockerfile commands for a reproducible Python ML environment

Tests your ability to containerize Python ML scripts reproducibly. A strong answer covers FROM with a pinned slim image, WORKDIR, COPY for requirements and code, RUN pip install, and CMD or ENTRYPOINT.

What is catastrophic forgetting in LLMs and how do you mitigate it?
intermediate2 min read

What is catastrophic forgetting in LLMs and how do you mitigate it?

This tests stability-plasticity trade-offs in fine-tuning. A strong answer defines catastrophic forgetting as lost prior capabilities, cites LoRA, regularization, and continual learning.

intermediate2 min read

How would you scrape a page with dynamically loaded JavaScript content?

It tests if you know dynamic pages need a real renderer. A great answer names Playwright or Selenium, uses explicit waits for elements, and extracts via DOM or network interception. Red flag: suggesting only static parsers like BeautifulSoup or blind sleeps.

easy1 min read

How a convolutional layer works

Learnable kernels slide over the input computing dot products, with stride controlling step size and padding controlling output size.

easy2 min read

How do you structure a Dockerfile to leverage layer caching for dependencies?

Tests Docker layer invalidation and cache-aware instruction ordering. Copy requirements.txt and run pip install before source code so deps cache independently. Red flag: copying everything at once or installing deps after code, busting cache every build.

What does the KL-divergence penalty do in RLHF PPO, and if zeroed?
advanced2 min read

What does the KL-divergence penalty do in RLHF PPO, and if zeroed?

It tests RLHF reward hacking awareness. The KL penalty anchors PPO to the reference model to stop mode collapse; zeroing it causes over-optimization against the proxy reward model, yielding incoherent outputs.

SQL or NoSQL for high-volume semi-structured event ingestion?
intermediate2 min read

SQL or NoSQL for high-volume semi-structured event ingestion?

Choose NoSQL for schema-less landing; use SQL downstream for structured analytics.

advanced1 min read

Direct Preference Optimization explained

DPO reparameterizes the RLHF reward in terms of the policy itself, turning alignment into a simple classification loss on preference pairs with no separate reward model or PPO.

easy1 min read

Max pooling versus strided convolution

Pooling downsamples and adds small translation invariance with no parameters; strided conv learns its downsampling but adds parameters.

intermediate2 min read

How do you persist notebooks and artifacts in Docker?

Tests Docker storage abstractions. A strong answer distinguishes bind mounts for live notebook editing from named volumes for datasets and artifacts, and warns against docker commit for persistence. Red flag: treating containers as stateful VMs.

Implement OAuth 2.0 flow to get an access token for API requests
intermediate2 min read

Implement OAuth 2.0 flow to get an access token for API requests

Tests your grasp of OAuth 2.0 grant-type selection and token lifecycle. Strong answers match the script context to client credentials or authorization code flow, detail the token endpoint exchange, and address refresh and expiry.

easy1 min read

Why CNNs need nonlinear activations like ReLU

ReLU introduces nonlinearity letting stacked layers model complex functions; without it any stack collapses to a single linear map.

intermediate2 min read

How do you build dev and production Docker images from one source?

Mastery of Docker multi-stage builds for isolating dev and production dependencies. Use a base stage, a dev target with linters and tests, and a lean production target copying only the build artifact.

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