Skip to content
tezvyn:

🤖AI & ML

Artificial intelligence, machine learning, and data science

127 bites

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

Advanced interview questions in AI & ML, page 2

advanced2 min read

FlashAttention and IO-Aware Attention

FlashAttention is IO-aware, tiling and fusing attention in fast SRAM to avoid materializing the n-by-n matrix in slow HBM.

advanced2 min read

CNN features for image retrieval

Pass the image through a pretrained CNN and read activations from a late layer as a descriptor; deeper layers encode semantics, earlier layers encode texture.

Design dynamic few-shot example retrieval from a vector database
advanced2 min read

Design dynamic few-shot example retrieval from a vector database

Tests RAG-style prompt engineering with semantic retrieval and latency. Use shared embeddings, approximate nearest neighbors with metadata filters, diversity reranking, and token-bounded prompt templates.

advanced1 min read

Managing model-as-a-feature pipelines

An upstream embedding model becomes a versioned dependency, creating cascading retraining, version skew, latency stacking, and lineage complexity.

advanced2 min read

Feature choice for real-time mobile SLAM

Pick ORB for fast FAST keypoints and cheap binary descriptors matched by Hamming distance; accept reduced robustness versus SIFT for real-time, low-power operation.

Process a 50GB CSV with only 16GB RAM
advanced2 min read

Process a 50GB CSV with only 16GB RAM

Chunk with read_csv chunksize, filter columns via usecols, downcast int64 to int32/int16, skip rows.

advanced2 min read

Design system ensuring point-in-time correctness for training data joins

Tests temporal join design to prevent data leakage from slowly changing dimensions. Strong answers use an AS OF join on entity ID and timestamp, materialize features as of label time, and handle late arrivals. Joining on user_id alone is a red flag.

advanced2 min read

How do you analyze and reduce large pandas DataFrame memory usage?

This tests in-memory representation and systematic optimization. Start with df.info(memory_usage='deep'), downcast numerics with to_numeric, convert low-cardinality strings to category, and use nullable dtypes.

Argue for declarative or imperative feature platforms with trade-offs
advanced2 min read

Argue for declarative or imperative feature platforms with trade-offs

This tests whether you weigh control flow against data flow. A strong answer argues from org maturity: declarative systems abstract DAG topology, while imperative ones offer Spark control at the cost of manual idempotency. Red flag: ignoring org culture.

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.

advanced1 min read

Stereo rectification math and its artifacts

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

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.

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.

Design an incremental load pipeline from a transactional DB to a warehouse
advanced2 min read

Design an incremental load pipeline from a transactional DB to a warehouse

Contrast timestamp watermarking, CDC from transaction logs, and open-table incremental reads; cite merge logic and idempotency.

advanced2 min read

How would you evade an advanced anti-bot system while scraping?

Discuss JA3/TLS spoofing, CDP-based browser automation, human-like mouse paths and delays, and session consistency.

advanced2 min read

Describe two secure methods for providing secrets to a running container

Mention runtime mounts like Docker secrets, orchestrator secret injection, and cloud IAM patterns.

Design a scalable, fault-tolerant real-time IoT data ingestion system
advanced2 min read

Design a scalable, fault-tolerant real-time IoT data ingestion system

This tests separation of edge connectivity, buffering, and processing. A strong answer names an edge gateway, Kafka as the backplane, stream processing, and cold storage, plus backpressure and partitioning.

advanced2 min read

Strategies to reduce a 5GB ML Docker image size

Tests multi-stage build hygiene and ML bloat reduction. Strong answers use multi-stage builds, strip CUDA dev libs, use slim bases, and collapse cache cleanup into one RUN. Red flag: rm -rf in a separate RUN step, which still bloats the layer.

advanced1 min read

Hybrid search and re-ranking for retrieval

Hybrid search fuses dense semantic and sparse keyword signals to catch exact terms dense misses; a cross-encoder re-ranker rescoring top-k boosts precision.

Design on-demand containerized dev environments for data scientists
advanced2 min read

Design on-demand containerized dev environments for data scientists

Tests multi-tenant notebook infrastructure design. Cover a Notebook Controller, curated Jupyter and VS Code images, namespace isolation with RBAC, resource quotas, and persistent storage. Red flag: a single shared VM without tenancy or idle shutdown.

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