Skip to content
All categories

ai

1264 posts

ML/LLM System Design and Coding Interviews: Four Architectures, Three Python Problems, and a STAR Skeleton

Four system design questions that come up often (enterprise RAG, an LLM serving stack, a customer-support agent, online A/B testing with a data flywheel), three Python problems (dynamic batching, sampling, backoff retries plus a token bucket), and a STAR skeleton for behavioral rounds. Each design question has a speakable answer and a self-check list, and all code was actually run.

LLM Engineering Interview Prep: Fine-Tuning, Alignment, Inference Optimization, Evaluation, and Safety

Seven LLM engineering topics that come up often in interviews: LoRA/QLoRA and fine-tuning vs RAG, RLHF/DPO/GRPO alignment, inference optimization (PagedAttention gives vLLM 2-4x throughput), sampling and decoding, LLM evaluation, the OWASP LLM Top 10 (2026 edition), and hallucination. Each section covers the concept, the mechanism, and how to answer.

ML Basics and Transformer Internals: From Bias-Variance and AdamW to Attention, RoPE and MoE

Interview follow-ups usually land on mechanisms: why divide by √d_k, how AdamW differs from Adam plus L2, why a high AUC still isn't shippable. This post walks through concept, mechanism and how to answer, then ends with 3 runnable numpy exercises.

Prompt, Context, Harness: The Three Layers, Their Boundaries, and Evaluation Gates

Prompt engineering shapes a single instruction, context engineering decides what the model sees right now, and harness engineering wraps the whole non-deterministic system. Bsharat's 26 principles, Breunig's four context failures, and OpenAI's roughly one-million-line, zero-handwritten-code harness experiment each map to one layer. Evaluation is the piece teams skip most, and it belongs in a CI gate that blocks silent regressions.

RAG Interview Prep: From the Three-Stage Pipeline to Agentic RAG, and How to Tell Nine Variants Apart

Answer RAG interview questions in four steps: the three-stage pipeline, where each stage fails, which of nine variants patches which hole, and the 6 kinds of problems RAG cannot solve. Self-RAG, CRAG and Adaptive-RAG add judgment; Graph RAG and KG-RAG change the index; CAG skips retrieval; Agentic RAG and Reasoning RAG hand decisions to the model.

Choosing AI Engineer Interview Resources: Official Guidance, 12 GitHub Question Banks, and Paid Platforms Compared

Read each company's own interview guidance first: Meta now expects candidates to use a built-in AI assistant, while Anthropic defaults to no AI. For question banks, pick ones that cite sources and are still maintained this year, such as the alexeygrigorev field guide, ombharatiya, and alirezadir. Only 2 of the 12 popular repos link sources for their questions, and some keep answers behind a paywall.

Audio, Video, and World Models: A Reading Map | CMU 10-423 Topic Guide

Audio representation, temporal relationships in video, and action-conditioned world transitions are different learning tasks. The earlier combined guide checked only audio at the end. This URL now serves as a reading map to one full guide each for Lectures 24–26; the Lecture 26 guide also covers the separate alignment deck.

CNNs and ViT: Turning an Image into Model Inputs | CMU 10-423 Lecture 5

Text models convert text into tokens; image models also need a computational representation of pixels.

Code Generation and Agents: A Reliable Test–Repair Loop | CMU 10-423 Lecture 23

Code Generation and Agents: A Reliable Test–Repair Loop | CMU 10-423 Lecture 23

Condition Injection: The Roles of Attention, DiT, and Q-Former | CMU 10-423 Topic Guide

Cross-attention reads another representation, DiT is a diffusion-backbone choice, and Q-Former uses learned queries to extract or bridge information. They can coexist rather than being three competing products. The Lecture 14 lesson handles Prompt-to-Prompt and classifier-free guidance in detail.

Diffusion Models: Why Adding Noise Creates a Training Task | CMU 10-423 Lecture 7

A GAN learns from a discriminator.

Distributed Training and Efficient Inference: Locate the Cost | CMU 10-423 Topic Guide

A model that does not fit on one GPU has a different problem from a model that fits but decodes slowly. Distributed strategies partition data, parameters, and states. FlashAttention improves attention memory traffic; KV caching avoids recomputing historical keys and values during decoding.

Exams, Papers, and Projects: Three Forms of Learning Evidence | CMU 10-423 Topic Guide

An exam tests reasoning under a fixed question. A paper report tests your judgment of someone else’s evidence. A project tests your ability to produce reproducible evidence. These are distinct learning tasks, now taught separately while this URL remains an assessment map.

GANs: What the Generator and Discriminator Learn | CMU 10-423 Lecture 6

A classifier asks which class an image belongs to.

A Generative AI Learning Path: Reading the 35 Core Guides | CMU 10-423 Course Overview

This series uses the public Spring 2026 materials for CMU 10-423/623/723 Generative AI.

Testing minGPT Changes: Shapes, Masks, and Positions | CMU 10-423 Assignment 1

Assignment 1 brings sequence modeling and modern attention into code.

Testing DDPM: Matching Timestep Coefficients to a Batch | CMU 10-423 Assignment 2

Copying a noising equation is not enough to implement diffusion correctly.

Testing LoRA Fine-Tuning: Gradients, Data, and Evaluation | CMU 10-423 Assignment 3

Use an original numerical test to check gradients, data, and evaluation alongside the original assignment specification.

Testing Q-Former Text-to-Image: Gradients through Frozen Backbones | CMU 10-423 Assignment 4

Use an original numerical test to check gradients, data, and evaluation alongside the original assignment specification.

SFT, RLHF, and DPO: Separate Their Training Signals | CMU 10-423 Topic Guide

A prompt with one demonstrated answer is not the same data as a prompt with a preferred and rejected response. SFT learns demonstrated tokens. A typical RLHF pipeline learns reward and then updates a constrained policy. DPO forms a loss directly from preference pairs and reference-relative ratios.