AppliedAIPrep logoAppliedAI/Prep
THE APPLIED AI CURRICULUM

Understand the concepts before you drill the questions

A structured path through the ideas Applied AI and Applied AI loops actually test. Each concept gives you the intuition, a worked example, and the trade-off interviewers probe — then links straight to the real questions where it shows up. Read it like a curriculum, or jump to whatever you are weakest on.

214 concepts across 10 tracks · foundational concepts are free

Begin the curriculum
01

🧠 Foundations of LLMs & GenAI

How language models actually work: tokens, attention, context, sampling, and the prompting-vs-RAG-vs-fine-tuning decision every loop opens with.

START HERE
01From RNNs to Transformers: RNN, LSTM, Seq2SeqFree
Recurrent networks process sequences one step at a time through a hidden state, which makes them principled but slow and bad at long-range dependencies because gradients vanish across many steps. LSTMs and GRUs add gates to carry information further, and seq2seq encoder-decoder models with attention removed the single-vector bottleneck, which is the idea transformers then took to its conclusion. Applied-AI interviews probe this because it explains why attention exists and why we abandoned recurrence for parallelism.
02Classic NLP: Bag-of-Words, TF-IDF, and Word2VecFree
Before learned embeddings, text was turned into sparse high-dimensional vectors with bag-of-words and TF-IDF, which count words and weight them by how distinctive they are but ignore meaning and order. Word2Vec and GloVe replaced counts with dense vectors trained so that words in similar contexts land near each other, which captures semantic similarity. Applied-AI interviews probe this because sparse methods still win as cheap baselines and as the lexical half of hybrid retrieval, and because they explain what dense embeddings actually fixed.
03TokenizationFree
Models do not read characters or words; they read tokens, subword chunks produced by an algorithm like BPE that maps text to integer IDs. Tokenization decides how many tokens a piece of text costs (driving price, latency, and context usage), why models miscount letters or fumble rare words, and why non-English text is more expensive. Applied-AI interviews probe it because token accounting is the first thing that bites a production LLM bill.
04The Context WindowFree
The context window is the maximum number of tokens a model can attend to at once, prompt plus generation. It is bounded by attention's quadratic cost, the KV cache's linear memory growth, and the length the model was trained on. A bigger window is not free or uniformly useful (models lose information in the middle), which is why retrieval often beats stuffing everything into context. Applied-AI interviews probe it because it shapes cost, latency, and the RAG-vs-long-context decision.
05EmbeddingsFree
An embedding maps text (or an image) to a dense vector so that semantic similarity becomes geometric closeness, similar meanings land near each other, measured by cosine similarity. Embeddings power semantic search, retrieval, clustering, recommendation, and the vector index behind RAG. Applied-AI interviews probe them because they are the bridge between unstructured content and everything you can compute over it, and because their failure modes (domain mismatch, drift, the wrong similarity metric) quietly degrade retrieval.
06The Transformer ArchitectureCore
The transformer is the architecture behind modern LLMs: stacked blocks that each mix information across tokens with self-attention and then transform each token with a feed-forward network, wrapped in residual connections and normalization. Understanding the two sub-layers (attention mixes across tokens, the feed-forward processes each one) explains where parameters live, why Mixture-of-Experts scales the feed-forward, and why decoder-only models dominate. Applied-AI interviews probe it because it is the mental scaffold for everything else, attention cost, KV cache, MoE, and serving.
07Attention and Self-AttentionCore
Attention turns each token into a query, key, and value, scores every query against every key, softmaxes those scores into weights, and returns the weighted sum of values, so each token pulls in information from the others. Self-attention does this within one sequence. The all-pairs scoring is why cost grows with the square of sequence length, which in turn explains context limits, long-prompt expense, and the KV cache. Applied-AI interviews probe it because it links architecture to cost and latency in one mental model.
08Attention Variants: MHA, MQA, and GQACore
Multi-head attention gives every query head its own key and value heads, which is expressive but makes the KV cache large and memory-bandwidth hungry at decode time. Multi-query attention shares one key-value head across all query heads to shrink the cache hard, and grouped-query attention sits in between by sharing key-value heads across small groups. Applied-AI interviews probe this because it is the cleanest example of trading model quality against serving memory and throughput, and it explains why frontier models standardized on GQA.
09Positional Encodings (RoPE and ALiBi)Core
Attention is order-blind, so models inject token position separately. Modern LLMs use relative schemes: RoPE rotates query/key vectors by an angle proportional to position so the attention score depends only on the offset between tokens, and ALiBi adds a distance penalty to attention scores. Both extrapolate to longer sequences far better than learned absolute positions, which is why RoPE-with-scaling is how context windows get extended. Applied-AI interviews probe it because it explains how long-context models are built.
10Temperature and SamplingCore
At each step a model outputs a probability distribution over the next token; how you pick from it is decoding. Temperature reshapes the distribution (low sharpens toward the most likely token, high flattens it), while top-k and top-p (nucleus) truncate the tail before sampling. The choice sets the trade-off between deterministic, focused output and diverse, creative output. Applied-AI interviews probe it because the right decoding settings differ sharply between factual/extraction tasks and creative ones, and because reproducibility depends on them.
11Constrained and Structured DecodingCore
Asking a model nicely for JSON sometimes fails; constrained decoding guarantees valid output by masking, at each generation step, every token that would violate a schema or grammar, so only valid continuations can be sampled. It is the reliable way to get JSON, enums, or function-call arguments, and it underpins tool calling. The caveat: it guarantees structural validity, not semantic correctness. Applied-AI interviews probe it because production systems depend on parseable output, and 'just prompt for JSON' breaks at scale.
12Prompt EngineeringFree
Prompting is the cheapest, fastest way to steer an LLM: clear instructions, few-shot examples, explicit output format, and the right context. It is the first technique to try before reaching for RAG or fine-tuning, and in production it means versioned, tested prompt templates with separated instructions and untrusted data, not ad-hoc strings. Applied-AI interviews probe it because most LLM features ship on prompting alone, and because sloppy prompts are a top source of unreliability and injection risk.
13Chain-of-Thought and In-Context LearningFree
In-context learning is the ability to perform a task from instructions or a few examples in the prompt, with no weight updates. Chain-of-thought prompting asks the model to reason step by step before answering, which markedly improves multi-step problems (math, logic, multi-hop questions). The catch is that the stated reasoning is not guaranteed to reflect the model's actual computation. Applied-AI interviews probe it because it is the cheapest accuracy boost on hard tasks, and because over-trusting the visible reasoning is a real pitfall.
14Self-Consistency, Tree-of-Thought, and Prompt ChainingCore
Three ways to push past a single linear chain of thought: self-consistency samples many reasoning paths and votes on the answer, tree-of-thought branches and searches over partial reasoning, and prompt chaining splits one hard prompt into a sequence of focused calls. Each trades extra tokens and latency for accuracy or control. Applied AI interviews probe this to see if you can reach for the right technique instead of reflexively spending 40 samples on every request.
15HallucinationFree
A hallucination is fluent, confident output that is wrong or unsupported. It happens because a language model is trained to produce plausible continuations, not to know what it knows; it has no built-in truth check. You reduce it with grounding (RAG), letting the model abstain, low temperature on factual tasks, and verification, and you detect it with faithfulness checks against sources. Applied-AI interviews probe it because hallucination is the number-one reason LLM features fail in production, and because the fix is system design, not a magic prompt.
16Prompting vs RAG vs Fine-TuningCore
Given an LLM use case, the senior move is matching the technique to what is missing rather than defaulting to one. Need external or changing knowledge? RAG. Need a specific behavior, format, or skill? Fine-tuning. Need to take actions or use live systems? Tools/agents. Just need better instructions? Prompting. They combine, and you escalate from cheapest (prompting) to most involved (fine-tuning). Applied-AI interviews probe it because choosing wrong wastes months, fine-tuning to inject changing facts is the classic mistake.
17RLHF: Reinforcement Learning from Human FeedbackCore
RLHF is how a raw next-token predictor becomes a helpful, harmless assistant. It has three stages: supervised fine-tuning on demonstrations, training a reward model on human preference comparisons, then optimizing the model against that reward (with a KL penalty to stay close to the base). It aligns the model to human preferences that are hard to specify as a loss. Applied-AI interviews probe it because it explains why instruct models behave well, where alignment data comes from, and the failure modes (reward hacking, sycophancy).
18Reward ModelsCore
A reward model turns human preference comparisons into a scalar score for any response, the signal RLHF optimizes against. It is trained on pairs of responses labeled by which a human preferred, learning to rank rather than to produce text. Its imperfections drive RLHF's failure modes: reward hacking (gaming the proxy) and staleness as the policy drifts off-distribution. Applied-AI interviews probe it because it explains where the alignment signal comes from and why it is gameable, and it generalizes to LLM-as-judge evaluation.
19Constitutional AI and RLAIFCore
RLAIF (RL from AI Feedback) replaces human preference labels with AI-generated ones, scaling alignment past the human-labeling bottleneck. Constitutional AI is Anthropic's specific approach: the model critiques and revises its own outputs against a written set of principles (a constitution), generating the preference data from those principles. The win is scalability, consistency, and explicit, editable values; the risk is the AI judge's own biases. Applied-AI interviews probe it because it is how alignment scales and how values become explicit and auditable.
20The KV CacheCore
During autoregressive decoding, a model would recompute attention over the entire history at every step; the KV cache stores each token's key and value vectors so each new token only attends, never recomputes. The win is compute; the cost moves to memory: the cache grows with sequence length times batch size and usually becomes the binding constraint in serving. Applied-AI interviews probe it because it explains why long contexts are expensive to serve, why throughput (not model speed) is often the limit, and why MQA/GQA and PagedAttention exist.
21LoRA and Parameter-Efficient Fine-TuningCore
Full fine-tuning updates all of a model's weights, which is expensive in compute and memory and produces a full-size copy per task. LoRA freezes the base model and trains small low-rank adapter matrices, cutting trainable parameters by orders of magnitude while matching most of full fine-tuning's quality. QLoRA adds 4-bit base quantization to fit huge models on one GPU. Applied-AI interviews probe it because PEFT is how teams actually fine-tune, and because LoRA adapters enable serving hundreds of variants cheaply.
22DPO and Preference-Optimization VariantsCore
Direct Preference Optimization aligns a model directly on preference pairs with a simple classification-style loss, skipping RLHF's separate reward model and RL loop, which makes alignment far simpler and more stable. A family of variants then relaxes DPO's requirements: SimPO removes the reference model, KTO removes the need for paired data, and ORPO merges SFT and alignment into one step. Applied-AI interviews probe it because DPO is now the common way teams align open models, and the variants show you understand what each requirement buys.
23Policy Optimization: PPO and GRPOPremium
PPO and GRPO are the reinforcement-learning algorithms that optimize an LLM against a reward, the RL step in RLHF and in training reasoning models. PPO is the established workhorse, updating the policy in small, clipped steps to stay stable; GRPO (used by DeepSeek-R1) drops PPO's separate value network and instead normalizes rewards within a group of samples, which is simpler and cheaper for LLMs. Applied-AI interviews probe it because it explains how alignment and reasoning training actually run, and why RL on verifiable rewards scales.
24Mixture-of-ExpertsCore
A Mixture-of-Experts model replaces the dense feed-forward layer with many expert networks and a router that sends each token to only a few of them. This decouples total parameters (capacity) from per-token compute: the model can be huge while each token activates only a slice. The trade-offs are routing complexity, memory (all experts must be loaded), and load balancing. Applied-AI interviews probe it because most frontier models are MoE, and it explains how models get more capable without proportionally more inference cost.
25Scaling LawsCore
Scaling laws say model loss falls predictably as a power law in parameters, data, and compute, which is why bigger models trained on more data reliably get better. The Chinchilla result showed that for a fixed compute budget you should scale parameters and training tokens together (roughly equally), meaning prior large models were under-trained. This reshaped how compute is allocated and why smaller, data-heavy models are competitive. Applied-AI interviews probe it because it underlies model-selection and the data-vs-size economics.
26Inference-Time Compute and Reasoning ModelsCore
Inference-time (test-time) compute is the idea that spending more computation at generation, longer chains of thought, sampling multiple attempts, or search, reliably improves answers on hard problems, a scaling axis distinct from making the model bigger. Reasoning models (o1/R1-style) are trained, often via RL on verifiable rewards, to produce long internal reasoning and exploit this. Applied-AI interviews probe it because it changed how hard problems are solved and introduced a real latency/cost trade-off: route easy queries to fast models, reserve reasoning models for genuinely hard ones.
27Training Reasoning Models: RLVR, PRM vs ORMPremium
Reasoning models like o1 and R1 are not just bigger instruct models: they are trained with reinforcement learning where the reward comes from checking whether the final answer is correct, which teaches the model to generate long internal chains of thought. This page covers RL with verifiable rewards (and GRPO specifically), the split between process reward models that score each step and outcome reward models that score only the answer, and how that choice shapes test-time search. Applied AI interviews probe it to see if you understand where the reasoning ability actually comes from.
28Multimodal Models and VLMsCore
Multimodal models process more than text, most commonly vision-language models (VLMs) that take images and text together. The key idea is a shared representation: a vision encoder turns an image into embeddings projected into the language model's space, so the LLM can reason over pixels and words jointly. CLIP-style contrastive training puts text and images in one embedding space, enabling cross-modal search. Applied-AI interviews probe it because document understanding, image search, and visual agents all build on it.
29Diffusion ModelsCore
Diffusion models generate images (and audio/video) by learning to reverse a noising process: training corrupts data into noise step by step, and the model learns to denoise, so at generation it starts from pure noise and iteratively denoises into a sample. Text conditioning (via cross-attention to text embeddings) steers what gets generated, and latent diffusion denoises in a compressed space for efficiency. Applied-AI interviews probe it because it is the basis of image generation systems and explains their cost, latency, and the role of guidance.
30Multilingual Models and the Tokenization TaxCore
Multilingual LLMs work unevenly: best on high-resource languages (English), worse on low-resource ones, because training data is English-heavy. A subtler issue is tokenization: tokenizers trained mostly on English split other languages and non-Latin scripts into far more tokens, so the same meaning costs more tokens, more money, more latency, and less context, a real fairness and cost penalty. Applied-AI interviews probe it because global products hit both the quality gap and the token tax, and per-language evaluation surfaces what aggregates hide.
31Small vs Large Models and RoutingCore
Bigger is not always better in production: small models are far cheaper and faster, and for many tasks they are good enough, especially when fine-tuned or given retrieval. The mature pattern is routing, send easy queries to a small/cheap model and reserve large or reasoning models for genuinely hard ones, often with a cascade that escalates on low confidence. Applied-AI interviews probe it because picking and routing models is where most of the cost and latency budget is won or lost.
32Speech and Voice AI: ASR, TTS, and Voice AgentsCore
Voice agents chain three systems: speech-to-text (ASR), an LLM, and text-to-speech (TTS), all under a hard real-time latency budget that text chat never faces. This page covers acoustic modeling and CTC basics, the cascade-versus-end-to-end tradeoff, and the conversational mechanics that actually break demos: turn-taking, barge-in, and the sub-second response budget. Applied AI interviews probe it because voice exposes whether you can reason about streaming, latency accounting, and a distinct class of failure modes.
33Context Rot and Long-Context Failure ModesCore
Context rot is the practical degradation of model quality as the input window fills up, even when the official window is a million tokens. Information in the middle gets ignored, attention concentrates on the first and last tokens, and reasoning that needs several scattered facts at once falls apart. Applied AI interviews probe it because candidates routinely assume a large window is a substitute for retrieval, and it is not.
02

🤖 Retrieval & Agents

Retrieval-augmented generation end to end, vector search, reranking, and tool-using agents: the modal Applied AI design round.

01The RAG PipelineFree
Retrieval-Augmented Generation grounds an LLM in external knowledge: at query time you retrieve the most relevant chunks from a knowledge base and put them in the prompt, so the model answers from real sources instead of memory. It is the default fix for hallucination and stale knowledge, and it updates without retraining. The pipeline is ingest and chunk, embed and index, retrieve (often rerank), then generate with citations. Applied-AI interviews probe it because RAG is the modal production LLM architecture.
02Vector Search and ANN IndexesCore
Vector search finds the embeddings nearest to a query vector. Exact nearest-neighbor is O(n) per query and does not scale, so production uses Approximate Nearest Neighbor (ANN) indexes (HNSW, IVF, product quantization) that trade a little recall for massive speedups. The real-world challenges are the recall-vs-latency-vs-memory trade-off, metadata filtering, and handling updates. Applied-AI interviews probe it because it is the engine under RAG and semantic search, and its tuning directly sets retrieval quality and cost.
03Choosing and Adapting Embedding ModelsCore
Picking an embedding model is a decision about retrieval quality, cost, and operational risk on your data, not about who tops a public leaderboard. The hard parts are benchmarking on your own queries, trading dimensionality against storage and latency, deciding whether to fine-tune for your domain, and planning for the re-embedding migration when the model changes. Applied AI interviews probe it because candidates default to the leaderboard winner and ignore the drift and migration costs that bite later.
04ChunkingCore
Chunking splits documents into the passages you embed and retrieve, and it is one of the highest-leverage knobs in RAG. Too large and embeddings are diluted so retrieval is imprecise; too small and chunks lose the context needed to answer. Beyond fixed-size splitting, structure-aware and semantic chunking keep coherent units intact, and parent-child (small-to-big) retrieval matches on small chunks but returns larger context. Applied-AI interviews probe it because poor chunking silently caps retrieval quality.
05RerankingCore
Reranking is a two-stage retrieval design: a fast bi-encoder fetches a broad candidate set for recall, then a slower but more accurate cross-encoder rescoring each (query, document) pair reorders them for precision. The cross-encoder is better because it reads query and document together rather than as precomputed vectors. Reranking lets you feed fewer, better chunks to the model, often the highest-ROI improvement to a RAG system. Applied-AI interviews probe it because it is the cheapest large win in retrieval quality.
06Late-Interaction Retrieval (ColBERT)Core
Late-interaction retrieval represents each document as one vector per token rather than a single pooled vector, then scores a query by summing the best token-to-token matches (MaxSim). It sits between cheap single-vector bi-encoders and expensive cross-encoder rerankers: more precise than a single vector, far cheaper than running a full reranker on every candidate, but with a large storage cost. Applied AI interviews probe it because knowing when this middle tier is worth its disk footprint shows real retrieval-architecture judgment.
07Hybrid Search and Reciprocal Rank FusionCore
Pure vector search captures meaning but misses exact terms (codes, names, SKUs); pure keyword search (BM25) nails exact terms but misses synonyms and intent. Hybrid search runs both and fuses the results, and Reciprocal Rank Fusion is the simple way to merge their rankings without calibrating incomparable scores. Applied-AI interviews probe it because production retrieval is almost always hybrid, and knowing why (and how to fuse) signals real RAG experience.
08GraphRAG and Knowledge-Graph RetrievalCore
GraphRAG builds an entity-and-relationship graph over a corpus, then retrieves by traversing that graph instead of (or alongside) flat vector similarity. It answers the questions flat RAG fails on: multi-hop connections that span documents and global questions that need the whole corpus summarized, not the top-k chunks. The catch is build and maintenance cost: extracting entities and relations with an LLM is expensive and the graph drifts as the corpus changes. Applied-AI interviews probe it to see if you know when the extra machinery actually pays off.
09Hierarchical Retrieval (RAPTOR and Small-to-Big)Core
Hierarchical retrieval breaks the chunk-granularity dilemma: small chunks retrieve precisely but lack context, large chunks carry context but retrieve poorly. RAPTOR builds a tree by recursively clustering and summarizing chunks, so retrieval can land on a precise leaf or a higher-level summary. Small-to-big (parent-child) embeds small chunks for matching but returns the larger parent for context. Applied-AI interviews probe it because it is the standard production fix once naive fixed-size chunking starts missing answers.
10Query Transformation and Multi-Hop RetrievalCore
The user's raw question is often a poor search query: ambiguous, underspecified, or requiring several facts chained together. Query transformation rewrites or decomposes it before retrieval, query rewriting, expansion, HyDE (embed a hypothetical answer), and decomposition into sub-questions. Multi-hop questions need iterative retrieval because the second fact depends on the first's answer. Applied-AI interviews probe it because single-shot retrieval on the raw query is a common, fixable cause of RAG failure.
11Citations and GroundingFree
Grounding means the model answers only from provided sources; citations make each claim traceable to the exact passage that supports it. Together they are the trust mechanism of RAG: they let users verify, let you detect hallucination (an uncited or unsupported claim is a red flag), and are mandatory in high-stakes domains. Applied-AI interviews probe it because 'it gave a great answer' is worthless if you cannot tell whether it is true, and citations are how production AI earns trust.
12Agents and Tool UseFree
An agent is an LLM in a loop that can take actions through tools: it reasons, calls a tool (search, a database, code, an API), observes the result, and repeats until done. Tool calling works because the model emits a structured request that your code executes, the model never runs anything itself. The power is doing real work; the cost is reliability and the safety surface (an agent that can act can act wrongly). Applied-AI interviews probe it because agents are where LLMs meet real systems.
13Function Calling and Tool SchemasCore
Function calling is the protocol behind tool use: you declare tools as JSON schemas, the model emits a structured call (name plus arguments) that your code validates and runs, and the result goes back into the conversation. The hard part is design, not plumbing: tool descriptions and result shapes decide whether the model picks the right tool with the right arguments, and forcing structured output can cost a measurable amount of accuracy. Applied-AI interviews probe it because schema design is where most agents quietly fail.
14Model Context Protocol (MCP)Core
MCP is an open client-server standard that lets an agent connect to external tools, data, and prompts through a uniform interface, so one integration works across many hosts instead of writing bespoke glue per model. Servers expose tools, resources, and prompts with typed schemas; clients discover and call them at runtime. Applied AI interviews probe it because integration plumbing, not model quality, is usually what blocks an agent from shipping.
15Agent Memory: Short-Term, Long-Term, and Memory StoresCore
Agent memory is how an agent retains and recalls information across steps and sessions. Short-term (working) memory is what lives in the context window for the current task; long-term memory is durable information (facts, user preferences, past outcomes) stored outside the window and retrieved when relevant. The skill is deciding what is worth remembering, where to store it, and when to read it back. Applied AI interviews probe it because durable memory is what turns a one-shot chatbot into an agent that improves over time.
16Agent Design Patterns: ReAct, Plan-and-Execute, ReflectionCore
These are the named control-flow architectures for LLM agents: ReAct interleaves reasoning and actions in a tight loop, plan-and-execute decomposes the task up front and then runs the steps, and reflection adds a self-critique pass that revises output. Each trades latency, token cost, and robustness differently. Applied AI interviews probe this to see whether you pick a pattern from task structure rather than defaulting to one loop for everything.
17Context Engineering for AgentsCore
Context engineering is the discipline of designing the full information payload that goes into an agent's context window each turn: system instructions, memory, retrieved data, tool definitions and results, and conversation history. Most agent failures are context failures, where the right information is absent, buried, stale, or crowding out the rest of the budget. Applied AI interviews probe it because it is the highest-leverage lever on agent reliability and cost, and it separates people who tune prompts from people who manage state.
18Multi-Agent OrchestrationCore
When a task is too big or varied for one agent, an orchestrator decomposes it and delegates subtasks to focused sub-agents, each with its own clean context and tools, then synthesizes the results. The main benefit is context isolation (each sub-agent stays focused and within its window) plus parallelism and specialization. The costs are coordination overhead, latency, and error propagation, so you use multiple agents only when the task genuinely needs it. Applied-AI interviews probe it because multi-agent designs are common and easy to over-apply.
19Agent Reliability and Long-Horizon RobustnessPremium
Long-horizon agents fail because per-step success compounds: a 95 percent reliable step is only about 60 percent reliable over ten steps. Reliability engineering covers consistent completion (not just pass@k), error recovery, step and token budgets, human-in-the-loop checkpoints, and containing cascading failure in multi-agent systems. Applied AI interviews probe this to separate people who built a demo from people who shipped an agent that holds up over thousands of runs.
20Agentic and Corrective RAGCore
Standard RAG retrieves once and generates; agentic RAG wraps retrieval in a loop so the model decides whether to retrieve, what to query, evaluates the results, and retrieves again until it has what it needs. Corrective RAG adds a grader that checks retrieval quality and takes corrective action (re-retrieve, web search, or discard) when the context is poor. Applied-AI interviews probe it because complex, multi-hop questions defeat single-shot RAG, and self-correcting retrieval is the fix, at the cost of more calls and agent-reliability concerns.
21Agent Evaluation and Trajectory AnalysisCore
Agent evaluation scores the full execution trace (tool calls, observations, state changes, recovery) rather than only the final answer, because a correct answer can hide a broken process and a wrong answer can come from one bad step in an otherwise sound run. It pairs outcome metrics with process metrics like tool-selection accuracy and step efficiency. Applied AI interviews probe it because grading agents is harder than grading RAG, and most teams get it wrong by only checking the last message.
22Retrieval vs Long ContextCore
When you can fit a whole document in a model's large context window, should you, or should you retrieve only the relevant chunks? Long context is simpler but expensive (quadratic attention), slower, and unevenly used (lost in the middle); retrieval is cheaper, faster, updates without retraining, and surfaces only what matters. The answer is usually retrieval for large, changing, or partially-relevant corpora, and long context for small, cohesive inputs. Applied-AI interviews probe it because 'just use the big context window' is a common, costly oversimplification.
03

📊 Evaluation & ML Foundations

The metrics and methods that tell you a system works: precision/recall, eval sets, LLM-as-judge, and the classical ML still tested.

01Information Theory for MLCore
Information theory gives ML its core measures: entropy (uncertainty in a distribution), cross-entropy (the cost of modeling the true distribution with your predicted one, the classification loss), KL divergence (how far one distribution is from another), and mutual information (how much one variable tells you about another). These appear as the loss you minimize, the regularizer in VAEs and RLHF, and the splitting criterion in decision trees. Applied-AI interviews probe it because cross-entropy and KL underlie training, distillation, and alignment.
02Probability Distributions You Should KnowFree
The handful of distributions that cover most modeling situations: Bernoulli and binomial for yes/no outcomes and counts of successes, normal for sums and measurement noise, Poisson for event counts in a window, and exponential for waiting times. Applied AI interviews probe this because the distribution you assume is the loss you minimize: Bernoulli gives you cross-entropy, normal gives you mean-squared error, and naming that link shows you understand what a model is actually fitting.
03MLE, MAP, and Bayesian vs FrequentistCore
Maximum likelihood picks the parameters that make the observed data most probable; MAP adds a prior and picks the most probable parameters given the data. MAP reduces to MLE when the prior is flat, and the prior acts as regularization. Applied-AI interviews probe this to see if you understand where priors enter your models, why L2 regularization is a Gaussian prior in disguise, and the practical split between point estimates and full posteriors.
04CLT, Sampling, and Confidence IntervalsCore
The central limit theorem says the mean of a sample is approximately normal regardless of the underlying distribution, which is why so much inference uses the normal curve. Standard error measures how much a sample mean wobbles and shrinks with sample size, unlike standard deviation. Applied-AI interviews probe this because it sets how wide a confidence interval is and therefore how long an A/B test must run.
05Hypothesis Testing and p-valuesCore
Hypothesis testing asks whether an observed effect is large enough to be unlikely under a null hypothesis of no effect, summarized by a p-value. The trap is reading the p-value as the probability the null is true, ignoring effect size, or running many tests and reporting only the winners. Applied-AI interviews probe it because it is the inference engine behind A/B testing and any claim that a model change actually helped.
06Sampling Techniques: Stratified, Reservoir, ImportanceCore
Sampling techniques decide which subset of data you train on, evaluate on, or stream through, and that choice quietly determines whether your numbers reflect reality. The core methods are uniform, stratified, reservoir for unbounded streams, and importance sampling for rare or reweighted events. Applied AI interviews probe this because a biased sample produces a confidently wrong model and an eval set that lies about production performance.
07Causal Inference: Confounders and IdentificationCore
Causal inference is the discipline of estimating what would happen if you intervened, not just what correlates in observed data. It centers on confounders, randomization as the gold standard, and quasi-experimental methods (diff-in-diff, instrumental variables, propensity scores) for when you cannot run a clean experiment. Applied AI interviews probe it because product and model decisions hinge on whether a measured lift is real or an artifact of who self-selected into the treatment.
08Gradient Descent and OptimizersFree
Gradient descent is how models learn: compute the gradient of the loss with respect to the parameters and step opposite it to reduce error. Mini-batch SGD (a small batch per step) is the workhorse, balancing stable gradients with speed and GPU parallelism. Momentum smooths the path, and Adam (momentum plus per-parameter adaptive rates) is the default. The learning rate is the most important knob, scheduled with warmup and decay. Applied-AI interviews probe it because it underlies all training and the failure modes (divergence, getting stuck) are diagnosable.
09Linear and Logistic RegressionFree
Linear regression fits a weighted sum of features to a continuous target by minimizing squared error; logistic regression squashes that same linear score through a sigmoid and fits it with cross-entropy to produce a probability. Interviews probe these because they are the baseline every model is compared against, the coefficients are directly interpretable, and logistic regression is still the production default when you need a calibrated binary score.
10The Bias-Variance TradeoffFree
A model's error decomposes into bias (error from being too simple to capture the pattern, underfitting) and variance (error from being too sensitive to the training sample, overfitting). Reducing one often raises the other, so generalization is about finding the balance. It is the lens behind regularization, model-complexity choices, and ensembling. Applied-AI interviews probe it because diagnosing whether a model underfits or overfits, and acting on it, is the core debugging skill of ML.
11Overfitting and RegularizationFree
Overfitting is when a model learns the training data's noise instead of its signal, scoring well in training but failing on new data. You prevent it with more data, regularization (L1/L2, dropout, early stopping), simpler models, and data augmentation, and you detect it with a proper held-out validation set. The deeper trap is data leakage, which produces fake great offline numbers that collapse in production. Applied-AI interviews probe it because shipping an overfit or leaky model is one of the most common, expensive ML mistakes.
12Cross-Validation (Done Right)Free
Cross-validation estimates how a model generalizes by training and testing on rotating folds, giving a more reliable estimate than a single split. The traps are what make it an interview topic: use stratified folds for imbalanced classes, grouped folds when records share an entity, and time-ordered splits for temporal data (never random), and fit all preprocessing inside each fold to avoid leakage. Applied-AI interviews probe it because the wrong scheme produces optimistic estimates that fall apart in production.
13Decision Trees and Splitting CriteriaFree
A decision tree recursively splits the feature space by picking the split that most reduces impurity (Gini or entropy), producing a flowchart you can read top to bottom. Interviews probe trees because they expose whether you understand impurity-based splitting, why depth controls the bias-variance knob, and how a single high-variance tree becomes the building block for random forests and gradient boosting.
14Ensembling: Bagging, Boosting, StackingFree
Ensembles combine multiple models to beat any single one, because if their errors are decorrelated, combining cancels mistakes. Bagging trains parallel models on bootstrap samples and averages (reducing variance, e.g. random forest); boosting trains models sequentially to fix prior errors (reducing bias, e.g. XGBoost); stacking trains a meta-model to combine base models. Diversity among models is the requirement. Applied-AI interviews probe it because gradient boosting dominates tabular ML and the bias/variance framing connects to everything.
15SVMs and the Kernel TrickCore
A support vector machine finds the decision boundary with the widest margin to the nearest points (the support vectors), trading hinge loss against margin width. The kernel trick lets it draw nonlinear boundaries by computing inner products in a high-dimensional space without ever materializing the features. Interviews probe SVMs because they reward understanding margins, duality, and the specific regime (small, high-dimensional data) where they still beat trees and neural nets.
16kNN and the Curse of DimensionalityFree
k-nearest-neighbors is a lazy, instance-based learner that classifies a point by majority vote of its closest training examples under some distance metric. Interviews probe it because its failure mode, distance concentration in high dimensions, teaches why naive nearest-neighbor search breaks down and why production systems lean on approximate nearest-neighbor indexes instead.
17Generative vs Discriminative Models (Naive Bayes)Core
A discriminative model learns P(y|x) directly, the decision boundary. A generative model learns the joint P(x,y), so it models how the data is produced and derives the label via Bayes. Naive Bayes is the canonical generative classifier and leans on a strong conditional-independence assumption. Applied-AI interviews probe this to check whether you know that generative wins with little data or missing features while discriminative wins on raw accuracy once data is plentiful.
18Clustering: K-Means, Hierarchical, DBSCANFree
Clustering groups unlabeled points by similarity. The three workhorses are k-means (fast, assumes round blobs, you pick k), agglomerative hierarchical (builds a dendrogram, no fixed k upfront), and DBSCAN (density-based, finds arbitrary shapes and flags noise). Applied-AI interviews probe it to see whether you can pick the right algorithm for the data geometry and actually validate clusters rather than trusting a pretty plot.
19Gaussian Mixtures and the EM AlgorithmCore
A Gaussian mixture model treats data as generated by several Gaussian components and assigns each point a soft, probabilistic membership rather than a hard cluster label. Expectation-maximization fits it by alternating between computing those memberships and re-estimating each component. Interviews probe it because it is the cleanest example of a latent-variable model and exposes whether a candidate understands soft clustering, local optima, and how GMM generalizes k-means.
20Dimensionality Reduction: PCA, t-SNE, UMAPCore
Dimensionality reduction compresses high-dimensional data into fewer axes. PCA is a linear projection that maximizes retained variance and is reversible enough to feed downstream models. t-SNE and UMAP are nonlinear methods that preserve local neighborhood structure for 2D or 3D visualization only. Applied-AI interviews probe whether you know that t-SNE and UMAP distort global geometry, why you never cluster on their coordinates, and how the curse of dimensionality motivates the whole exercise.
21Feature Engineering: Encoding, Scaling, SelectionFree
Feature engineering is the work of turning raw columns into inputs a model can learn from: encoding categoricals, scaling numerics, and selecting which features to keep. Interviews probe it because it is the unglamorous lever that usually moves a metric more than swapping the model, and because the right choice depends on cardinality, the model family, and leakage risk rather than on a default recipe.
22Imbalanced Data and ResamplingCore
Imbalanced data is when one class is rare (fraud, churn, disease), so a model that predicts only the majority scores high accuracy while being useless. The fixes are resampling, class weighting, and threshold moving, plus picking the right metric. Applied AI interviews probe it because nearly every real classification problem is skewed, and the trap of resampling the test set or trusting accuracy is common.
23Handling Missing and Corrupted DataCore
Missing data has three mechanisms (MCAR, MAR, MNAR) and the mechanism decides whether dropping rows is safe or biased and which imputation is valid. Beyond filling values, missingness itself is often a feature, and naive imputation is a classic source of leakage. Applied AI interviews probe it because how you handle gaps quietly determines whether your model is biased before training even starts.
24Outlier and Anomaly DetectionCore
Outlier and anomaly detection finds points that do not fit the bulk of the data using statistical, distance/density, or reconstruction-based methods. The hard part is that anomalies are rare and usually unlabeled, so the framing is mostly unsupervised, and a robust estimate of normal is what makes the rare point stand out. Applied AI interviews probe it because fraud, fault, and data-quality work all reduce to deciding what counts as normal and at what threshold.
25Label Noise and Weak SupervisionCore
Label noise is errors in your training labels, and it caps the accuracy a model can reach no matter how good the architecture is. Weak supervision is the practice of generating training labels programmatically (labeling functions, distant supervision) instead of by hand, trading some accuracy for scale. Applied AI interviews probe this because real datasets are noisy, the difference between a model stuck at 78 percent and one at 90 percent is often the labels and not the model, and candidates who understand confident learning and clean test sets are the ones who can actually move metrics.
26Synthetic Data GenerationCore
Synthetic data is training or eval data produced by a model, a simulator, or a program rather than collected from the real world, used to bootstrap labels, cover rare cases, and distill a larger model into a smaller one. Its value hinges on quality, diversity, and the absence of leakage between your generator and your eval. Applied AI interviews probe it because candidates reach for it as a free fix and miss the failure modes: distribution mismatch, eval contamination, and model collapse from training on a model's own outputs.
27Hyperparameter OptimizationCore
Hyperparameter optimization is the search for the settings (learning rate, depth, regularization) that a model does not learn on its own, using grid, random, or Bayesian search. Applied AI interviews probe it because the difference between candidates is usually method choice and budget discipline: knowing why random search beats grid in high dimensions, how successive halving spends compute on promising configs, and how to run the search without quietly leaking the test set into your model selection.
28Backpropagation, IntuitivelyFree
Backpropagation is the algorithm that computes the gradient of the loss with respect to every parameter in a network, by applying the chain rule in reverse from the output back to the inputs. A forward pass computes and caches activations; a backward pass reuses those caches to accumulate gradients in one sweep, which is why training a billion-parameter model costs only a small constant multiple of a forward pass. Applied-AI interviews probe it because it explains training cost, memory, and the vanishing/exploding-gradient failures you debug.
29Activation Functions: ReLU, GELU, SwiGLUFree
Activation functions are the nonlinearity between linear layers; without them a deep network collapses into a single linear map no matter how many layers it has. The practical lens is gradient flow: sigmoid and tanh saturate and kill gradients, ReLU fixed that by passing gradient unchanged for positive inputs (at the cost of dying units), and modern transformers use smooth variants like GELU and gated SwiGLU. Applied-AI interviews probe it because the choice directly affects whether deep nets train at all and shows whether you reason about backprop rather than memorizing names.
30Vanishing and Exploding GradientsCore
In a deep or recurrent network the backward gradient is a product of many per-layer Jacobians, so its magnitude compounds: factors mostly below one shrink it toward zero (early layers stop learning) and factors above one blow it up (training diverges into NaNs). The root cause is the repeated multiplication, and the standard fixes target it directly: residual connections to give gradient a shortcut, normalization to keep activations in scale, gating to preserve signal across time, gradient clipping to cap the blow-up, and careful initialization. Applied-AI interviews probe it because it is the mechanism behind most deep-net training failures you have to diagnose.
31Training Neural Nets: Init, Normalization, Dropout, LR SchedulesCore
The practical recipe that makes deep nets train at all: scale-aware weight initialization (Xavier, He), normalization layers (batch, layer, RMS) that keep activations well-conditioned, dropout as stochastic regularization, and warmup plus cosine learning-rate schedules. Applied AI interviews probe this because picking the wrong init or norm is a common reason training diverges or plateaus, and knowing why each helps separates people who have trained models from people who have only called .fit().
32CNNs: Convolution, Pooling, Receptive FieldsCore
Convolutional neural networks replace dense layers with small filters slid across an image, sharing weights so the same edge detector applies everywhere. This buys parameter efficiency, translation equivariance, and a receptive field that grows with depth, which is the inductive bias that makes CNNs data-efficient for vision. Applied AI interviews probe this to check you understand why architecture choice encodes assumptions about the data, not just how to call a library.
33CV Architectures: ResNets, ViT, DetectionCore
Modern computer vision rests on three pillars: residual connections that let CNNs go hundreds of layers deep without degrading, Vision Transformers that patchify an image and run self-attention instead of convolutions, and detection heads (one-stage vs two-stage) scored by mAP after non-maximum suppression. Applied AI interviews probe this to check you can pick an architecture, fine-tune a pretrained backbone, and reason about latency vs accuracy rather than train from scratch.
34Transfer LearningCore
Transfer learning reuses a model pretrained on a large general corpus as the starting point for a new task, so you inherit learned features instead of training from scratch. The two modes are feature extraction (freeze the backbone, train only a new head) and fine-tuning (unfreeze some layers and keep training), and the choice turns on how much labeled data you have and how far the new domain has drifted. Applied AI interviews probe it because it is the default for vision and NLP when labels are scarce, and because candidates often fine-tune when they should freeze, or vice versa.
35Autoencoders and GANsCore
Two foundational generative architectures: autoencoders compress input through a bottleneck and reconstruct it, which makes them useful for denoising, anomaly detection, and learning compact representations, while GANs pit a generator against a discriminator in an adversarial game to produce realistic samples. Applied AI interviews probe these because they test whether you understand the bottleneck principle, the adversarial training dynamics that cause mode collapse, and why diffusion models displaced GANs for high-fidelity generation.
36Precision, Recall, and F1Free
Precision is how many of your positive predictions were right; recall is how many of the actual positives you caught. They trade off as you move the decision threshold, and which matters depends on the cost of false positives vs false negatives. F1 is their harmonic mean. On imbalanced data, accuracy lies and these metrics (with PR-AUC) tell the truth. Applied-AI interviews probe them because choosing and tuning the threshold by business cost is a core, constantly-tested skill.
37Calibration and UncertaintyCore
A model is calibrated if its confidence matches reality: among predictions it makes at 0.8, about 80% are correct. Modern neural nets (and LLMs) are typically overconfident, so raw scores are not trustworthy probabilities. You fix it post-hoc with temperature scaling, Platt scaling, or isotonic regression on a held-out set, and measure it with reliability diagrams and Expected Calibration Error. Applied-AI interviews probe it because any decision made on a probability (thresholds, expected value, abstention) is only as good as the calibration.
38Eval-Driven Development and Golden DatasetsFree
You cannot improve an LLM system you cannot measure, so the first thing to build is an evaluation: a golden dataset of representative inputs with expected behavior, plus metrics, that you run on every change. This turns 'it feels better' into a number, catches regressions before users do, and lets you iterate quickly. Applied-AI interviews probe it because teams that ship reliable LLM features evaluate continuously, and 'we tried some prompts and it looked good' is the anti-pattern.
39Offline vs Online EvaluationFree
Offline evaluation scores a model on held-out data; online evaluation measures its impact on real users (via an A/B test). They often disagree: an offline win frequently fails to move the online metric, because offline data is a static proxy and the real world has feedback loops, distribution shift, and second-order effects. The discipline is to gate with offline evals (fast, cheap) and confirm with online tests (the truth). Applied-AI interviews probe it because shipping on offline metrics alone is a classic, costly mistake.
40A/B TestingFree
An A/B test randomly splits users between a control and a variant and compares a metric to measure causal impact. The hard part is validity, not setup: peeking inflates false positives, you need enough power, sample-ratio mismatch signals a bug, and network effects and novelty break naive tests. For ML, it is how you confirm an offline improvement actually helps online, because offline gains often do not hold. Applied-AI interviews probe it because shipping on offline metrics alone is a classic mistake.
41Multi-Armed BanditsCore
A multi-armed bandit chooses among options to maximize reward while learning which is best, balancing exploration (try options to learn) against exploitation (use the best-known). Algorithms include epsilon-greedy, UCB, and Thompson sampling. Bandits beat fixed A/B tests when you want to minimize regret (stop wasting traffic on losers during the test) or have many options; A/B tests win when you need a clean, unbiased measured effect. Applied-AI interviews probe it because the explore-exploit trade-off appears in ranking, recommendation, and as a simple form of reinforcement learning.
42Benchmarks and Their LimitsCore
Public benchmarks like MMLU give a shared yardstick, but they saturate, leak into training corpora, and stop tracking real ability once labs optimize for them. Contamination (test items in the training data) and Goodhart's law (a measure that becomes a target stops measuring) are why a high leaderboard score can be meaningless on your workload. Applied AI interviews probe this to see whether you trust a number or build a private eval set on your own distribution.
43Contrastive and Metric LearningCore
Contrastive learning trains embeddings by comparison: pull similar (positive) pairs together and push dissimilar (negative) pairs apart, so distance encodes similarity. It powers retrieval embeddings, CLIP's shared text-image space, face recognition, and self-supervised pretraining. Quality hinges on the number and difficulty of negatives. Applied-AI interviews probe it because it is how the embeddings under search, RAG, and recommendation are actually trained, and because 'where do good embeddings come from?' has a concrete answer.
44LLM-as-a-JudgeFree
When outputs are open-ended (summaries, chat answers, generated code), there is no exact match to score against, so you use a strong LLM to grade them against a rubric. It scales evaluation far beyond human review, but it is a fallible proxy with known biases (position, verbosity, self-preference), so you calibrate it against human labels and design carefully. Applied-AI interviews probe it because evaluating generative output is the hard part of shipping LLMs, and 'we eyeballed it' does not scale.
45RAG EvaluationFree
Evaluating a RAG system means evaluating retrieval and generation separately, because a bad answer is usually a retrieval failure (the right context was never fetched) and you cannot fix what you cannot localize. Retrieval is scored with recall@k (the ceiling for the whole system), precision, and rank metrics; generation is scored for faithfulness (is each claim supported by the context?) and answer quality. Applied-AI interviews probe it because measuring RAG end-to-end, and knowing which half failed, is the core debugging skill.
46Catastrophic Forgetting and Continual LearningCore
Catastrophic forgetting is when training a neural network on new data erodes capabilities it already had, because gradient updates overwrite the weights that encoded old skills. Applied AI interviews probe it because fine-tuning a model on a narrow task is the most common way teams accidentally break a general model, and knowing the mitigations (data replay, regularization, parameter-efficient methods) separates people who have shipped fine-tunes from people who have only read about them.
47Object Detection and SegmentationCore
Detection finds objects as boxes plus labels; segmentation labels pixels (semantic) or per-object pixels (instance). The machinery is shared: a pretrained backbone feeds a head, anchors or queries propose objects, IoU measures box overlap, and NMS removes duplicates. Two-stage detectors (Faster R-CNN) trade speed for accuracy, one-stage (YOLO) flip it, and Mask R-CNN adds a mask branch for instance segmentation. Interviews probe this to see you pick by latency and accuracy and know what NMS, IoU, and anchors actually do.
48The Computer Vision PipelineCore
A production CV system is a chain: ingest and version images, preprocess and augment, fine-tune a pretrained backbone, attach a task head, evaluate with sliced metrics, post-process, then serve and monitor. The invariant that separates working systems from broken ones is train/serve consistency: the exact resize, color space, and normalization must match at training and inference. Applied AI interviews probe this because most CV failures live at the preprocessing seam, not in the architecture.
04

⚙️ System Design for AI in Production

Turning a notebook demo into a deployment customers trust: idempotency, retries, observability, latency, and private deploys.

01The LLM GatewayFree
An LLM gateway is a single proxy layer between your application and one or more model providers. It centralizes the cross-cutting concerns every LLM app needs: routing and fallback across models/providers, caching, rate limiting, authentication, cost tracking, observability, and guardrails. It also prevents vendor lock-in by abstracting providers behind one interface. Applied-AI interviews probe it because it is the backbone of a production LLM platform and the place most operational controls live.
02Latency Budgets and StreamingFree
LLM latency is not one number: time-to-first-token (set by prefill and queueing) and inter-token latency (set by decode) feel very different to users. Streaming tokens as they generate hides total latency by showing progress immediately. Designing to a latency budget means allocating time across retrieval, model, and tools, measuring TTFT and tokens-per-second (not just end-to-end), and using streaming, caching, and routing to hit it. Applied-AI interviews probe it because perceived latency makes or breaks LLM UX.
03GuardrailsFree
Guardrails are the runtime safety layer wrapping an LLM: input checks (detect prompt injection, off-topic or disallowed requests, PII) before the model, and output checks (content safety, schema/format validation, grounding, PII/secret leakage) before the user. They are built from rules, classifiers, judge models, and validators, with a defined fail-safe action when one trips. Applied-AI interviews probe it because 'add guardrails' is hand-wavy, and the concrete input/output checks plus fail-safe behavior are what make a deployment safe.
04Rate Limiting, Retries, and BackoffFree
LLM systems depend on rate-limited, sometimes-failing providers, so resilient design is essential. Rate limiting (token bucket) protects your service and enforces per-tenant quotas; retries with exponential backoff and jitter handle transient failures without hammering a struggling dependency; circuit breakers stop sending requests to a failing service to let it recover. Applied-AI interviews probe it because LLM calls are slow, expensive, and flaky, and naive retry logic turns a blip into an outage.
05Idempotency and Exactly-Once EffectsFree
In a distributed system, calls fail and get retried, so the same request can arrive more than once. Idempotency means processing a request twice has the same effect as processing it once, achieved with idempotency keys and deduplication. It is the foundation of safe retries: without it, a retried payment charges twice or a retried pipeline double-counts. Applied-AI interviews probe it because LLM/data pipelines are full of flaky, retried steps, and 'exactly-once' is really 'at-least-once delivery plus idempotent processing'.
06Observability for LLM SystemsFree
You cannot operate or improve an LLM system you cannot see. Observability means logging every request end to end, inputs, retrieved context, prompt and model version, output, tokens, latency, and cost, plus tracing multi-step agent/RAG flows and tracking quality signals. It is the basis of debugging, cost attribution, evaluation, and incident response. Applied-AI interviews probe it because LLM systems fail silently (a plausible-but-wrong answer throws no error), so visibility is what makes them debuggable and trustworthy.
07LLM Cost OptimizationFree
LLM systems get expensive fast, and the cost model is mostly tokens and number of model calls. The levers, in rough order of impact: route easy queries to cheaper/smaller models, cache repeated and similar requests, trim context (fewer, better chunks), use cheaper retrieval/reranking, and for agents cut unnecessary steps. The discipline is measuring cost per request and attacking the dominant contributor. Applied-AI interviews probe it because cost is a primary production constraint and most teams overspend by defaulting to the biggest model on everything.
08Prompt and Semantic CachingCore
Caching is one of the cheapest, highest-impact LLM optimizations. Prefix (prompt) caching reuses the computed attention state for a shared prompt prefix (a long system prompt or document), cutting prefill cost and latency. Semantic caching serves a stored answer for a query that is similar (not identical) to a past one, by embedding the query and matching nearest neighbors. Applied-AI interviews probe it because repetitive traffic is everywhere, and caching turns expensive recomputation into near-free lookups, with a correctness caveat for semantic caching.
09Fault Tolerance and Graceful DegradationCore
AI systems depend on flaky, slow dependencies (model providers, vector stores, tools), so they must degrade gracefully rather than fail hard. Circuit breakers stop calling a failing dependency so it can recover; fallbacks return a cached, simpler, or safe response when the primary path fails; timeouts and bulkheads contain failures. The goal is that one component's failure becomes a degraded experience, not an outage. Applied-AI interviews probe it because LLM dependencies fail often and naive designs turn a provider blip into a total outage.
10Prompt Versioning and ManagementCore
Prompt versioning treats prompts as production artifacts with their own change log, eval-backed releases, and rollback path, instead of string literals buried in application code. The key move is decoupling prompt changes from code deploys so a regression in output quality can be reverted in seconds without shipping a new binary. Applied AI interviews probe it because a candidate who edits prompts in place and ships on vibes will silently degrade quality in production.
11Foundation Model Selection and BenchmarkingCore
Foundation model selection is the disciplined process of choosing across frontier models on capability, cost, latency, and context window, validated by your own task evals rather than public leaderboards. The core skill is reading benchmarks skeptically (contamination, saturation, prompt sensitivity) and designing for provider migration so you are never locked to one vendor. Applied AI interviews probe it because picking a model by leaderboard rank or brand is the fastest way to ship something that is wrong, slow, or expensive for your actual workload.
12User Feedback Loops and the Data FlywheelCore
A data flywheel captures implicit and explicit user feedback in production, routes it into eval sets and fine-tuning data, and uses the improved model to attract more usage that generates more feedback. The hard part is not the loop but the signal quality: implicit signals are biased and explicit ratings are sparse and gameable, so naive feedback ingestion teaches the model the wrong thing. Applied AI interviews probe it because a candidate who treats every thumbs-down as ground truth will build a system that degrades while looking like it is learning.
13Recommendation Systems: Candidate Generation and RankingCore
Industrial recommenders use a two-stage funnel: cheap candidate generation narrows millions of items to a few hundred, then an expensive ranker scores that shortlist. Candidate generation leans on collaborative filtering, matrix factorization, and two-tower retrieval; ranking adds a heavy feature-rich model optimized for engagement. Applied-AI interviews probe this because it is the canonical ML system design and exposes how you handle cold start, scale, and the recall-versus-precision split.
14Learning to Rank: Pointwise, Pairwise, ListwiseCore
Learning to rank trains a model to order a list rather than predict a single label. The three formulations are pointwise (predict each item's score independently), pairwise (predict which of two items ranks higher), and listwise (optimize the whole ordering against a ranking metric). Pairwise and listwise beat pointwise because they learn relative order, which is what ranking metrics like NDCG actually reward. Applied-AI interviews probe it because ranking is the precision stage of search, ads, and recommenders.
15Multi-Stage Retrieval and Ranking FunnelsCore
Search, ads, and feed systems are built as a funnel: retrieve a broad candidate set, rank it with a heavier model, re-rank the top with the heaviest model, then filter and blend with business rules. Each stage trades recall for precision and cost, so cheap models handle many items and expensive models handle few. Applied-AI interviews probe this because it is how every large-scale ranking system is actually structured, and because freshness, diversity, and policy constraints have to slot into specific stages.
16Consistent Hashing and ShardingCore
Sharding spreads data across nodes so no single machine holds everything, but naive modulo hashing remaps almost every key when you add or remove a node. Consistent hashing places nodes and keys on a hash ring so that adding or removing a node only reshuffles the keys near it, roughly K/N keys instead of all of them. Virtual nodes smooth out load imbalance. Applied-AI interviews probe it because vector indexes, KV caches, and feature stores are all sharded, and rebalancing cost is the difference between a rolling deploy and an outage.
17Load BalancingFree
A load balancer spreads requests across many backend instances so no single server is overwhelmed, and removes failed instances from rotation. L4 balancers route by IP and port (fast, protocol-agnostic); L7 balancers read the request (path, headers, cookies) and route by content. Algorithms range from round-robin to least-connections to consistent-hash for sticky routing. Health checks are what turn a load balancer from a sprayer into a fault-tolerance mechanism. Applied-AI interviews probe it because inference fleets have wildly uneven request costs, so the algorithm choice actually matters.
18Distributed Key-Value StoresCore
A distributed KV store spreads keys across many nodes and replicates each key for durability and availability. The storage engine is a core choice: in-memory (Redis) for microsecond reads, LSM-trees (RocksDB, Cassandra) for write-heavy workloads, B-trees for read-heavy. Replication plus quorum reads and writes (R + W > N) tunes the consistency-availability tradeoff, and hinted handoff keeps writes accepted while a replica is down. Applied-AI interviews probe it because feature stores, KV caches, vector metadata, and session state all live in these systems, and the quorum math is a favorite probe.
19Caching StrategiesFree
A cache trades freshness for speed by keeping a copy of hot data closer to the request. The strategy is the write/read pattern: cache-aside (app fills the cache on a miss), write-through (writes go through the cache to the store), write-back (writes hit the cache and flush later). Eviction (LRU, LFU) and TTL decide what to keep, and cache stampede protection stops a popular expired key from hammering the backing store. CDNs are caches at the network edge. Applied-AI interviews probe it because LLM responses, embeddings, and retrieval results are expensive enough that caching is a first-class design decision.
20CAP and Consistency ModelsCore
The CAP theorem says that during a network partition a distributed system must choose between consistency and availability; you cannot have both while the network is split. PACELC extends it: even when there is no partition, you trade latency against consistency. Consistency models form a spectrum from linearizability (acts like one copy, real-time order) down through causal to eventual consistency. Logical clocks (Lamport, vector) order events without synchronized wall clocks. Applied-AI interviews probe it because every replicated store, queue, and feature pipeline lives somewhere on this spectrum, and naming the point precisely separates senior candidates.
21Concurrency and Thread SafetyCore
When multiple threads touch shared mutable state, interleavings cause race conditions: lost updates, torn reads, corrupted data. Thread safety means correctness under any interleaving. Locks/mutexes enforce mutual exclusion (pessimistic); optimistic concurrency checks for conflicts at commit and retries (compare-and-swap, version columns). Atomic operations avoid locks for simple updates. Deadlock arises when locks are acquired in conflicting orders. Applied-AI interviews probe it because inference servers, batching queues, and shared caches are all concurrent, and the classic double-increment bug still shows up in production.
22Content Distribution and P2PCore
Distributing one large file to many consumers from a single source bottlenecks on the source's upload bandwidth. P2P systems like BitTorrent split content into chunks and let peers serve chunks to each other, so capacity grows with the swarm instead of shrinking. Chunking enables parallel multi-source download and integrity checks; gossip protocols spread state and membership without a coordinator; CDN edge caching solves the same fan-out problem with managed infrastructure. Applied-AI interviews probe it because shipping multi-gigabyte model weights to a fleet is exactly a one-to-many fan-out problem.
23Message Queues and Event StreamingCore
Broker queues (RabbitMQ, SQS) hand each message to one worker, wait for an ack, and delete it: built for distributing jobs. Event logs (Kafka) append events to a durable, partitioned log that many consumer groups read independently at their own offsets, with replay for free. Ordering holds only within a partition, and 'exactly-once' in practice means at-least-once delivery plus idempotent consumers. Applied-AI interviews probe it because ingestion pipelines, async inference jobs, and feedback events all hang off one of these two primitives, and picking the wrong one is expensive to undo.
05

🔁 MLOps & Lifecycle

Shipping and operating models safely: drift, model registries, CI/CD, monitoring, and feature stores.

01Drift DetectionCore
Models decay because the world changes. Data drift is a shift in the input distribution (detectable without labels by comparing live features to a training reference with PSI or KS tests); concept drift is a change in the input-to-output relationship (usually needs labels, which often lag). The discipline is monitoring inputs and predictions as leading indicators, alerting on sustained shifts, and triggering retraining. Applied-AI interviews probe it because 'the model was great at launch and quietly got worse' is a top production failure.
02Model Debugging MethodologyCore
Model debugging is the systematic process of root-causing why a model underperforms: deciding whether the cause is the data, the features, the labels, model capacity, or the evaluation itself, rather than blindly tuning hyperparameters. The method leans on error analysis over slices and the train/val/test gap ladder to localize the failure before fixing it. Applied AI interviews probe it because most candidates jump to bigger models or more tuning when the real bug is a leaky feature, a noisy label set, or a broken eval.
03Model Registry, Lineage, and PromotionCore
A model registry is the versioned source of truth for trained models: each model has a version, lineage (the data, code, config, and run that produced it), and a stage (staging, production, archived). It enables reproducibility, safe promotion through gates, instant rollback, and audit. Lineage is what lets you reproduce a model and debug a regression by diffing against the last good version. Applied-AI interviews probe it because shipping models without versioning and lineage makes rollback and debugging guesswork.
04Reproducible and Deterministic PipelinesCore
A reproducible pipeline produces the same model and metrics from the same inputs, achieved by pinning seeds, dependencies, data versions, and code together. Determinism on GPU is a separate, harder problem because many CUDA kernels are nondeterministic by default. Interviews probe this because without it you cannot debug a regression, pass an audit, or trust an A/B result.
05CI/CD for ModelsFree
Shipping a model safely needs more than software CI/CD because the model depends on data, not just code. The pipeline tests data (schema, distributions, no leakage), tests the model (meets a metric threshold and beats the baseline, per-slice), and runs behavioral tests, then gates deployment on all of them, with canary/shadow rollout and rollback. Applied-AI interviews probe it because 'we tested the code' is insufficient for ML, and the data and model gates are what catch the failures users would otherwise hit.
06Model Monitoring in ProductionFree
Monitoring an ML model means more than uptime and latency, because a model can be healthy and silently wrong. You monitor four layers: operational (latency, errors, cost), data/input (schema, missing values, drift), prediction (output distribution, confidence), and model quality (accuracy and business metrics, once labels arrive, which lag). Inputs and predictions are leading indicators; labels confirm later. Applied-AI interviews probe it because silent model decay is invisible to ordinary service monitoring.
07Feature Stores and Training-Serving SkewCore
A feature store computes features once and serves them to both training (offline, historical) and serving (online, low-latency) from the same definitions, which is the fix for training-serving skew, the silent bug where features are computed differently in training and production and the model degrades. It also enforces point-in-time correctness to prevent leakage. Applied-AI interviews probe it because training-serving skew is one of the most common, hard-to-debug production ML failures, and the feature store is the systemic answer.
06

🖥️ ML Infrastructure & Serving

Where the GPUs live: memory, quantization, high-throughput serving, and the tricks that make inference cheap and fast.

01Quantization and Low PrecisionCore
Quantization stores and computes model weights (and activations) in fewer bits, FP16/BF16, FP8, INT8, INT4, instead of FP32, cutting memory and speeding inference at some accuracy cost. It is the main lever to fit a large model on a given GPU and to serve it cheaply, and it underlies QLoRA fine-tuning and KV-cache compression. Applied-AI interviews probe it because 'how do you serve a 70B model affordably?' usually starts with quantization, and knowing the precision ladder and its trade-offs is essential.
02GPU Memory and the Serving StackFree
Serving an LLM is mostly a memory problem: the GPU must hold the model weights plus a KV cache that grows with sequence length and batch size, and inference splits into a compute-bound prefill and a memory-bandwidth-bound decode. Knowing the memory math (weights plus KV cache), why decode is bandwidth-bound, and the levers (quantization, batching, paged attention) is the foundation of LLM serving. Applied-AI interviews probe it because 'will this model fit and how fast will it run?' is a constant production question.
03Knowledge DistillationCore
Knowledge distillation trains a small student model to imitate a larger teacher, using the teacher's soft probability distribution (or internal features) as a richer training signal than hard labels. A student trained this way typically beats an identical model trained from scratch on the same data, because the soft targets encode the teacher's learned similarity structure. Applied AI interviews probe it because it is the main lever for shrinking a capable model into something cheap to serve, and because reasoning distillation and the legal terms around teacher outputs are live issues in 2026.
04Continuous BatchingCore
GPUs are efficient on batches, but LLM requests arrive at different times and finish after different numbers of tokens, so static batching wastes the GPU waiting for the slowest request. Continuous (in-flight) batching adds and removes requests from the running batch at each decoding step, keeping the GPU full and dramatically raising throughput. Applied-AI interviews probe it because it is the single biggest throughput lever in LLM serving and explains why one replica can serve many concurrent users.
05FlashAttention and IO-Aware KernelsCore
Naive attention is slow not because of the matmuls but because it writes the full N-by-N attention matrix to GPU high-bandwidth memory and reads it back, which is memory-bandwidth bound. FlashAttention fuses the whole attention computation into one kernel that tiles the inputs in fast on-chip SRAM and never materializes the full matrix, using an online-softmax trick to stay exact. Applied-AI interviews probe it because it is why long-context training and serving became affordable and a clean test of GPU memory-hierarchy reasoning.
06PagedAttentionCore
The KV cache is the memory bottleneck in LLM serving, and naively reserving a contiguous block per request (sized for the maximum length) wastes most of it to fragmentation and over-allocation. PagedAttention borrows virtual-memory paging: store the KV cache in fixed-size non-contiguous pages allocated on demand, so memory is used only as tokens are generated. This packs far more concurrent requests onto a GPU, raising throughput. Applied-AI interviews probe it because it is the key memory innovation behind modern serving (vLLM).
07Disaggregated Prefill/Decode and Prefix CachingPremium
LLM inference has two phases with opposite hardware profiles: prefill is compute-bound (it processes the whole prompt in parallel) while decode is memory-bandwidth bound (one token at a time). Running both on the same GPU pool makes them fight, so long prefills stall ongoing decodes and you miss either the time-to-first-token or the time-per-output-token SLO. Disaggregation runs them on separate GPU pools and transfers the KV cache between them, and prefix caching reuses KV for shared prompt prefixes. Applied-AI interviews probe it because it is the current frontier of serving architecture and a real latency-SLO tradeoff.
08Speculative DecodingCore
Decoding is sequential and memory-bound, so generating each token one at a time underuses the GPU. Speculative decoding uses a small, fast draft model to propose several tokens ahead, then the large model verifies them all in a single parallel pass, accepting the longest correct prefix. It speeds up generation with no change to output quality, since the big model still validates every token. Applied-AI interviews probe it because it is a clever, widely-used latency optimization that exploits the memory-bound nature of decode.
09Distributed Training: Parallelism and FSDPCore
Training large models needs many GPUs, and there are distinct ways to split the work: data parallelism replicates the model and splits the batch; FSDP/ZeRO shards the optimizer state, gradients, and parameters across GPUs to fit models that do not; tensor parallelism splits a layer's matrices within a node; pipeline parallelism splits layers across nodes. Communication is the scaling bottleneck. Applied-AI interviews probe it because 'this model does not fit on one GPU' has specific, named answers and trade-offs.
10Mixed-Precision TrainingCore
Mixed-precision training does most computation in 16-bit (FP16 or BF16) instead of 32-bit, roughly halving memory and speeding up training on modern GPUs, while keeping a few numerically-sensitive parts in FP32 for stability. BF16 is preferred over FP16 because it keeps FP32's exponent range, avoiding the overflow/underflow that FP16 needs loss scaling to handle. Applied-AI interviews probe it because it is standard practice for training at scale and a clean example of the precision-vs-stability trade-off.
11Multi-LoRA ServingCore
LoRA adapters are tiny weight deltas on top of a shared base model, so you can serve hundreds of fine-tuned variants from one set of base weights instead of one full model per tenant. The serving challenge is batching requests that use different adapters in the same forward pass, swapping adapters in and out of GPU memory on demand, and sharing the base model's KV cache machinery. Applied-AI interviews probe it because it is the economics behind per-tenant and per-task customization and the serving-side complement to LoRA training.
12Model Serving FrameworksCore
You rarely build a serving stack from scratch; frameworks handle the production plumbing. General servers (Triton, TorchServe, KServe) serve many model types with dynamic batching, multi-model hosting, and versioning. LLM-specific servers (vLLM, TGI, TensorRT-LLM) add the essentials general servers lack: continuous batching, paged KV cache, and token streaming. Applied-AI interviews probe it because knowing what these provide, and that LLM serving needs the specialized ones, is practical deployment knowledge.
07

🗄️ Data & SQL Engineering

The data plumbing under every AI deployment: window functions, idempotent pipelines, data quality, and change capture.

01Transactions, ACID, and Isolation LevelsCore
A transaction groups several reads and writes so they either all commit or all roll back, with the ACID guarantees of atomicity, consistency, isolation, and durability. Isolation level is the dial that trades concurrency anomalies (dirty reads, non-repeatable reads, phantoms) against throughput, and most databases default to a weaker level than engineers assume. Applied AI and data interviews probe it because pipelines that ignore isolation produce silent, intermittent corruption that no unit test catches.
02Window FunctionsFree
Window functions compute across a set of rows related to the current row, without collapsing them like GROUP BY does, so you can rank within groups, compute running totals and moving averages, and compare a row to its neighbors (LAG/LEAD), all in one pass. They are the backbone of analytics SQL: top-N-per-group, sessionization, cohort analysis, and period-over-period. Applied-AI interviews probe them because they are the single most-tested SQL skill and the cleanest way to express analytical queries.
03Idempotent Data PipelinesCore
Data pipelines fail and get rerun, so a pipeline must be idempotent: rerunning it produces the same result, not duplicated or corrupted data. You achieve it with insert-overwrite by partition, MERGE/upsert keyed on a business id, and deterministic transforms, rather than blind appends that double-count on retry. Applied-AI interviews probe it because flaky pipelines are the norm, and a non-idempotent pipeline turns a routine retry into duplicated revenue numbers or a corrupted table.
04Data Quality and ContractsFree
Models and analytics are only as good as their data, and a silent upstream data change (a renamed column, a units switch, a spike in nulls) corrupts everything downstream with no error. Data quality means automated checks (schema, ranges, nulls, freshness, volume, uniqueness) plus data contracts between producers and consumers enforced in CI. Applied-AI interviews probe it because 'garbage in, garbage out' is the most common, hardest-to-diagnose cause of model and dashboard failures.
05Gaps and Islands (Sessionization)Core
Gaps-and-islands is the pattern for grouping consecutive rows into runs (islands) separated by breaks (gaps), the engine behind sessionization, streak detection, and consolidating contiguous ranges. The trick is to assign a group id that stays constant within a run, classically with window functions: ROW_NUMBER differences or LAG-based break flags with a running sum. Applied-AI interviews probe it because sessionizing events (user sessions, activity streaks, contiguous time ranges) is a constant data task and a sharp test of window-function fluency.
06Change Data CaptureCore
Change Data Capture (CDC) streams the inserts, updates, and deletes from a source database so downstream systems stay in sync without expensive full reloads. It powers incremental pipelines, real-time analytics, and keeping a search index or feature store fresh. The key concerns are handling updates and deletes (not just inserts), ordering, and idempotent application of the change stream. Applied-AI interviews probe it because keeping a RAG index, feature store, or warehouse current is a constant need, and full reloads do not scale.
07Deduplication (Exact and Fuzzy)Core
Duplicates creep into data from retries, joins, and multiple sources, and they corrupt counts, training sets, and aggregates. Exact dedup is a window-function job: ROW_NUMBER over a key, keep rank 1. Fuzzy/near-duplicate dedup (same content, slightly different) needs similarity, embeddings or MinHash/LSH to find near-matches at scale without comparing all pairs. Applied-AI interviews probe it because deduping training data and pipeline outputs is constant, and naive all-pairs comparison does not scale.
08SQL JoinsFree
Joins combine rows across tables on a matching condition, and the join type (inner, left, right, full, semi, anti) controls which non-matching rows survive. Applied AI interviews probe joins because they are the single most error-prone SQL construct: the wrong type silently drops or duplicates rows, and a non-unique join key fans out your row count without raising an error.
09GROUP BY and AggregationFree
GROUP BY collapses rows sharing the same key values into one row per group, and aggregate functions (COUNT, SUM, AVG) compute a single value per group. Applied AI interviews probe it because the semantics trip people up: a column must be either grouped or aggregated, COUNT silently ignores NULLs, and HAVING filters groups while WHERE filters rows. Conditional aggregation with SUM of CASE is the move that pivots data without a join.
10CTEs and SubqueriesFree
A CTE (the WITH clause) names an intermediate result so a query reads as a top-to-bottom pipeline instead of nested subqueries. The skill is knowing when a subquery should be correlated versus uncorrelated, when a recursive CTE is the right tool for hierarchies and graphs, and when a CTE acts as an optimization fence that blocks the planner. Applied-AI interviews probe it because refactoring a tangled nested query into a readable, correct pipeline is a daily data-engineering task.
11NULLs and Three-Valued LogicCore
NULL means unknown, so SQL uses three-valued logic where comparisons with NULL return UNKNOWN, not TRUE or FALSE. This is the quiet source of wrong results: = NULL never matches, NOT IN silently drops every row when the subquery contains a NULL, and aggregates and outer joins treat NULL in surprising ways. Applied-AI interviews probe it because confidently wrong queries that pass review are worse than queries that error, and NULL handling is where they hide.
12Ranking and Top-N Per GroupCore
Top-N-per-group is the partition-then-filter idiom: rank rows within each group with a window function, then keep the ranks you want. The choice between ROW_NUMBER, RANK, and DENSE_RANK comes down to tie handling, and getting ties wrong is the usual bug. Applied-AI interviews probe it because it is the cleanest replacement for a clumsy self-join or correlated subquery, and the ranking-family distinction is a quick fluency check.
13Query Execution and OptimizationCore
A query optimizer turns your SQL into a physical plan: which tables to scan, in what join order, and whether to use a hash join, sort, or index lookup. Reading an EXPLAIN plan tells you why a query is slow (a full scan on a huge table, a bad join order that explodes intermediate rows, a sort that spilled to disk) and which lever fixes it. Applied-AI interviews probe this because the difference between a 30-second and a 0.3-second query is usually understanding the plan, not rewriting the logic.
14Indexing StrategiesCore
An index is a secondary data structure that lets the database find rows without scanning the whole table, trading write cost and storage for read speed. The choices that matter are index type (B-tree for ranges and sorting, hash for equality, covering for index-only scans), composite-index column order, and selectivity (an index on a low-cardinality column is often useless). Applied-AI interviews probe indexing because it is the first lever for a slow read, and the candidates who understand why the planner sometimes ignores an index are the ones who have actually tuned a database.
15Partitioning and ClusteringCore
Partitioning splits one large table into physically separate chunks by a key (usually date), so a query with a matching filter reads only the relevant partitions instead of the whole table. Clustering and sort keys order data within storage so related rows sit together, improving locality and letting the engine skip blocks. Applied-AI interviews probe this because in a cloud warehouse you pay per byte scanned, and turning a full scan into a thin slice is the difference between a query that costs cents and one that costs dollars and minutes.
16Dimensional Modeling and Star SchemasCore
Dimensional modeling organizes an analytics warehouse into fact tables (the measurable events) surrounded by dimension tables (the descriptive context), forming a star schema. Choosing the right grain and denormalizing dimensions is what makes BI queries both fast and legible. Applied-AI interviews probe it because anyone building reporting tables, feature pipelines, or training datasets has to decide what one row means and how to join context to events.
17Slowly Changing Dimensions (SCD)Core
Slowly changing dimensions are the patterns for handling dimension attributes that change over time, such as a customer moving cities or a product changing category. Type 1 overwrites history, Type 2 keeps versioned rows with effective dates and a current flag, and Type 3 keeps a prior-value column. Applied-AI interviews probe it because answering what something looked like at the time of an event requires deliberate history tracking, and most analysts only know how to overwrite.
18Incremental Models and MERGE/UPSERTCore
Incremental models process only new or changed rows instead of rebuilding a table from scratch, using a high-watermark to select the delta and a MERGE/UPSERT to apply it. The hard parts are late-arriving data, idempotent re-runs, and choosing a watermark that does not silently drop rows. Applied-AI interviews probe it because full refreshes do not scale, and a subtly wrong incremental quietly loses or double-counts data.
19Batch vs StreamingCore
Batch processes a bounded dataset on a schedule; streaming processes an unbounded flow of events continuously. The real decision is about the data and the latency the business needs, not the tool, and it forces you to reason about event time vs processing time, windowing, and watermarks for late data. Applied-AI interviews probe it because most candidates jump to Kafka or Flink before they can say whether the problem even needs sub-minute latency, and micro-batch is often the pragmatic answer.
20Warehouse vs Lake vs LakehouseCore
A warehouse enforces schema-on-write with tight governance and fast SQL; a data lake stores raw files cheaply with schema-on-read and no transactions; a lakehouse puts an open table format (Iceberg or Delta) on object storage to give ACID, time travel, and schema evolution at lake cost. The choice is about cost, governance, and workload, not vendor preference. Applied-AI interviews probe it because candidates conflate the three and cannot say which fits BI versus ML versus streaming ingest.
21Pipeline Orchestration and DAGsCore
Orchestration runs dependent data tasks as a DAG so each task waits for its upstreams, retries safely, backfills history, and alerts when an SLA is missed. Tools like Airflow, Dagster, and dbt exist because cron cannot express dependencies, recovery, or partial reruns. Applied-AI interviews probe it because candidates reach for cron, then cannot explain what happens when task three of seven fails at 3am or when you need to reprocess last month.
22Backfills and ReprocessingCore
A backfill recomputes historical data after a bug fix, a new column, or a logic change, and it is where fragile pipelines break. The safe pattern is partition-by-partition reprocessing with idempotent writes so reruns do not double-count, on isolated compute so production stays healthy, and validated against the old table before you swap. Applied-AI interviews probe it because backfilling years of data without corrupting live tables or melting the warehouse separates engineers who have run production from those who have not.
23Schema Evolution and Data ContractsCore
Schemas change as products evolve, and adding, altering, or dropping a column can break every downstream consumer at once. The safe approach is backward and forward compatible changes via expand-then-contract migrations, plus data contracts that make producer and consumer expectations explicit and enforceable in CI. Applied-AI interviews probe it because a single careless column rename can take down dashboards, jobs, and model features silently, and the engineer who plans the migration is the one who has been burned before.
08

🛡️ AI Security, Privacy & Governance

Keeping enterprise deployments safe and compliant: prompt injection, PII, tenant isolation, audit trails, and governance regimes.

01Prompt InjectionFree
Prompt injection is the top security risk for LLM apps: malicious instructions override the model's intended behavior. Direct injection comes from the user; indirect injection hides instructions in content the model retrieves or browses (a web page, a document, an email), so a third party attacks. It is acute for RAG and agents because they ingest untrusted content and agents can take actions. The core defense is to treat all retrieved/tool content as untrusted data, never instructions, plus least privilege and human approval for irreversible actions.
02Indirect Prompt Injection and the Lethal TrifectaCore
Indirect prompt injection plants attacker instructions inside content an agent retrieves or reads (a web page, a PDF, a support ticket) so a benign user triggers an attack. The lethal trifecta is the combination that turns this into real damage: access to private data, exposure to untrusted content, and a channel to send data out. Applied AI interviews probe it because anyone building RAG or tool-using agents has to reason about blast radius, not just clever filters.
03PII HandlingFree
Personal data in prompts, logs, and training sets is a privacy and compliance risk (GDPR, HIPAA), so you must detect and protect it. Detection is layered (regex for structured PII like emails/SSNs, ML/NER for names and addresses) and imperfect, so it is one layer alongside the strongest control: data minimization, do not collect or log what you do not need. Applied-AI interviews probe it because LLM logs and training data are a major PII surface, and a leak is a legal and reputational disaster.
04Differential PrivacyCore
Differential privacy adds calibrated noise to data, queries, or training so the output is provably insensitive to any single individual's record, bounding what can be learned about any one person. In ML, DP-SGD clips and noises gradients to limit memorization and defend against membership-inference attacks. The cost is a privacy-utility trade-off controlled by a parameter epsilon. Applied-AI interviews probe it because it is the rigorous, mathematically-backed privacy tool, and because models can otherwise memorize and leak training data.
05Audit TrailsFree
An audit trail logs enough to reconstruct and explain any AI decision: the input, retrieved context, model and prompt version, output, and who/when, plus human overrides and guardrail events. It is the backbone of debugging, incident response, compliance (the EU AI Act and regulated domains require traceability), and accountability. The tension is privacy: logs are a sensitive surface, so you redact PII, control access, and set retention. Applied-AI interviews probe it because 'why did the model decide that?' must be answerable in serious deployments.
06Federated LearningCore
Federated learning trains a shared model across many devices or organizations without moving their raw data to a central server: each party computes updates locally and only the updates are aggregated. It trades communication cost, data heterogeneity, and privacy leakage against the benefit of training on data that legally or practically cannot be pooled. Applied AI interviews probe it to see whether you can distinguish the genuine fit (mobile keyboards, multi-hospital models) from the cases where centralizing data or using differential privacy alone is simpler.
07Multi-Tenancy and IsolationCore
When one AI system serves many customers (tenants), the cardinal rule is that no tenant can see another's data, ever. In RAG this means every retrieval is filtered by tenant so the vector search cannot return another tenant's documents; it extends to caches, logs, fine-tunes, and rate limits. The dangerous failure is a cross-tenant leak. Applied-AI interviews probe it because enterprise deployments are multi-tenant, and a leak between customers is a catastrophic, trust-destroying breach.
08Mechanistic InterpretabilityPremium
Mechanistic interpretability reverse-engineers what a neural network actually computes: the features it represents, the circuits that combine them, and how to test causal claims with interventions. It matters for safety and debugging because behavioral evals tell you what a model does, not why, and a model that passes every test can still harbor an unwanted internal mechanism. Applied AI interviews probe it to separate people who can reason about model internals and their current limits from people who only know prompts and benchmarks.
09AI Governance FrameworksCore
AI governance is the program that makes deployments safe, fair, and compliant: risk assessment, documentation (model cards, datasheets), human oversight, monitoring, and incident response, structured by frameworks like the NIST AI Risk Management Framework and laws like the EU AI Act (which tiers obligations by risk). For high-risk systems, the practices this domain already recommends become legally mandatory. Applied-AI interviews probe it because enterprise and regulated deployments require it, and it turns ad-hoc safety into an auditable process.
10Agent GuardrailsCore
An agent that can take actions is far riskier than one that only talks, so guardrails must constrain actions, not just text. The core controls are least privilege (scoped tools/credentials), validating every tool call, human approval for irreversible/high-impact actions, bounded iterations and budget, and sandboxed execution. The mindset is to assume the agent can be wrong or hijacked (prompt injection) and design so the worst case is contained. Applied-AI interviews probe it because deploying agents safely is the hard part of agentic AI.
11Fairness, Bias, and Model CardsCore
Models can perform unequally across groups, inheriting and amplifying bias in the data, which is a harm and, in regulated domains, illegal. Fairness work means measuring per-group performance (not just aggregate), choosing a fairness definition (they conflict, you cannot satisfy all at once), mitigating, and documenting limits in model cards. Applied-AI interviews probe it because aggregate accuracy hides subgroup failures, and shipping a biased model in hiring, lending, or healthcare is a serious, sometimes-unlawful failure.
12Agent Security: Tool Poisoning, Memory Poisoning, ContainmentCore
Agent security covers threats that only exist once an LLM can call tools and act on their results: malicious tool or MCP responses, poisoned long-term memory, privilege escalation through tool misuse, and goal hijacking. The defense is runtime containment, least-privilege tools, kill-switches, and blast-radius limits, not better prompting. Applied AI interviews probe it because anyone shipping agents has to reason about what happens when an untrusted string steers a system that can spend money or delete data.
13Jailbreaks and Red-Teaming TaxonomyCore
Jailbreaks are inputs that get a model to produce content its safety training was meant to refuse, using techniques like role-play framing, encoding, many-shot priming, and gradual crescendo escalation. Red-teaming is the systematic, adversarial process of finding these failures before attackers do. Applied AI interviews probe it because shipping a safety layer means knowing the categories of attack, why alignment is bypassable, and how frameworks like OWASP LLM Top 10 and MITRE ATLAS structure the threat model.
09

💻 Coding & Engineering Craft

The practical engineering applied AI screens reward: parsing messy data, testable design, streaming, and the Big-O that genuinely matters.

01Parsing Messy, Real-World DataFree
Real data is messy: inconsistent formats, missing fields, encoding issues, malformed records, and surprises you did not anticipate. Defensive parsing means handling the unhappy path deliberately, validating input, deciding per-record whether to skip, default, or fail, and never letting one bad record crash the batch. Applied-AI interviews probe it (often as a coding screen) because ingesting documents and data for AI systems is half the job, and brittle parsers that assume clean input fail immediately in production.
02The Big-O That Actually MattersFree
Big-O complexity matters most where it bites in real AI systems: avoid accidental O(n^2) (all-pairs comparisons, repeated linear scans), use hash maps for O(1) lookups, and know that vector search is approximate precisely because exact nearest-neighbor is O(n) per query. The practical skill is spotting the quadratic trap and the data-structure fix, not reciting complexity classes. Applied-AI interviews probe it because the difference between O(n) and O(n^2) is the difference between a system that scales and one that falls over.
03Testable Design for AI SystemsCore
AI systems are hard to test because models are non-deterministic and call external services, so testability has to be designed in: isolate the non-deterministic model behind an interface so you can mock it, separate deterministic logic (parsing, retrieval, formatting) from the model call and test it normally, and assert on metric tolerances rather than exact outputs. Applied-AI interviews probe it because untestable LLM code regresses silently, and the discipline of mocking the model and testing the deterministic parts is what keeps a system reliable.
04Streaming and BackpressureCore
When data is too big to fit in memory or arrives continuously, you process it as a stream, one piece at a time, with bounded memory, rather than loading it all. Backpressure is the mechanism that stops a fast producer from overwhelming a slow consumer, by signaling 'slow down' rather than buffering unboundedly until you run out of memory. Applied-AI interviews probe it because AI pipelines process huge datasets and token streams, and the naive load-everything approach OOMs while unbounded buffering crashes under load.
05Arrays and HashingFree
The hash map is the workhorse of coding interviews: average O(1) insert and lookup that turns an O(n^2) all-pairs scan into a single O(n) pass. The recurring moves are the seen-set (remember what you have passed) and frequency counting (tally then read back). Applied-AI interviews probe it because most array problems are really hash-map problems in disguise, and the candidate who reaches for the dictionary first signals real fluency.
06Two Pointers and Sliding WindowFree
Two pointers and the sliding window are the array techniques that hit O(n) where a naive double loop would be O(n^2). Converging pointers exploit sorted order to find pairs; a parallel window expands and contracts while maintaining a running invariant for subarray and substring problems. Applied-AI interviews probe these because they test whether a candidate can replace nested loops with a single linear pass and reason about why the work stays bounded.
07Binary Search and Search-Space ReductionFree
Binary search halves a sorted or monotonic-predicate space each step to hit O(log n), but the real interview skill is recognizing a problem that is secretly monotonic and binary-searching on the answer rather than the array. The off-by-one pitfalls in the lo/hi/mid loop are where most candidates lose points. Applied-AI interviews probe it because search-space reduction shows up far beyond sorted arrays, in capacity planning, rate limits, and threshold tuning.
08Linked ListsFree
A linked list stores elements in nodes that point to the next node, trading away O(1) random access for O(1) insertion and deletion once you hold a pointer. Interviews use them to test pointer discipline: the dummy-head trick, fast/slow pointers for cycle detection and finding the midpoint, and in-place reversal. Applied-AI interviews probe them because the patterns transfer to streaming buffers, LRU caches, and any structure where you splice without shifting.
09Stacks and QueuesFree
A stack is last-in-first-out and a queue is first-in-first-out, and most interview value comes from recognizing which problems hide one. The high-leverage patterns are the monotonic stack for next-greater-element and stock-span problems, queues for breadth-first traversal, and building one structure from the other (two stacks for a queue, a deque for both). Applied-AI interviews probe this because the recognition skill (bracket matching, span, BFS frontier) is the actual test, not the data structure itself.
10Trees, BSTs, and TraversalCore
A binary tree links each node to up to two children, and a binary search tree adds the invariant that everything left is smaller and everything right is larger, which gives O(log n) search on a balanced tree. The traversal skills interviews test are the three depth-first orders (pre, in, post), breadth-first level order, and switching between recursion and an explicit stack. Applied-AI interviews probe this because in-order traversal of a BST yields sorted output, and the recursion-to-stack conversion is the same skill behind iterative DFS everywhere.
11Heaps and Priority QueuesCore
A binary heap keeps a partial order so you can pull the smallest or largest element in O(log n) and peek at it in O(1), without paying to fully sort. This is the right tool for top-k, merging k sorted streams, and a running median, where you need the extreme few, not the whole order. Applied-AI interviews probe it because retrieval, ranking, and streaming pipelines all hinge on cheap partial-order operations.
12Graphs: BFS, DFS, and Shortest PathsCore
A graph is nodes and edges, and most of the work is recognizing that a problem is a graph in the first place. BFS finds shortest paths in unweighted graphs and explores level by level, DFS explores depth-first and exposes connectivity and cycles, and Dijkstra handles non-negative weighted shortest paths with a priority queue. Applied-AI interviews probe it because dependency graphs, retrieval graphs, and reachability questions are everywhere once you learn to see them.
13Topological Sort and DAGsCore
A topological sort orders the nodes of a directed acyclic graph so that every edge points forward, which is exactly what dependency resolution needs. Kahn's algorithm peels off zero-indegree nodes while DFS post-order reverses the finish times, and both detect cycles for free when no valid order exists. Applied-AI interviews probe it because build systems, data pipelines, and task schedulers are dependency graphs, and the course-schedule question is its canonical disguise.
14Union-Find (Disjoint Set Union)Core
Union-Find (Disjoint Set Union) tracks a partition of elements into groups and answers 'are these two connected?' in near-constant amortized time using path compression and union by rank. Interviews probe it because the naive alternative (re-running DFS or BFS per query) is too slow under repeated merges, and DSU is the right tool for dynamic connectivity, Kruskal's MST, and grouping problems where edges arrive over time.
15Recursion and Divide-and-ConquerFree
Recursion solves a problem by calling itself on smaller inputs until a base case stops it; divide-and-conquer is the variant that splits input into independent subproblems, solves each, and combines the results (merge sort, quickselect). Interviews probe it because clean base-case-plus-recursive-step reasoning, an honest read of the call stack, and the bridge from recursion to memoization and dynamic programming separate people who can decompose problems from those who only pattern-match loops.
16BacktrackingCore
Backtracking is systematic search over a tree of partial solutions: at each step you choose an option, explore deeper, and undo the choice before trying the next (choose, explore, unchoose). Pruning kills branches that cannot lead to a valid solution before you waste work on them. Interviews probe it because permutations, combinations, subsets, and constraint problems (N-queens, sudoku) all share this template, and the in-place choose/unchoose pattern avoids re-allocating state at every node, which is the difference between an elegant solution and an exponential memory blowup.
17Dynamic ProgrammingCore
Dynamic programming solves problems that have overlapping subproblems and optimal substructure by defining a state, writing a recurrence, and caching results so each subproblem is computed once. The skill is the framework (state, recurrence, base case, order of evaluation), not memorizing tricks. Applied-AI interviews probe it because it screens for whether you can turn a fuzzy optimization into a precise recurrence rather than recognizing a pattern you saw before.
18Greedy AlgorithmsCore
Greedy algorithms build a solution by always taking the locally best choice and never reconsidering. They are fast and simple, but only correct when a greedy choice is provably globally optimal, which you justify with an exchange argument. Applied-AI interviews probe greedy because the screen is whether you can tell when it works (interval scheduling, Huffman) from when it silently returns a wrong answer, and whether you reach for DP instead.
19Interval ProblemsFree
Interval problems (merging, inserting, counting overlaps, finding minimum resources) almost always start the same way: sort by start or end time, then sweep through once. The unifying move is recognizing that sorting turns a messy all-pairs comparison into a single linear pass. Applied-AI interviews probe this because the pattern recurs in scheduling, rate limiting, and time-series work, and the test is whether you reach for the sort reflexively instead of comparing every pair.
20Bit ManipulationCore
Bit manipulation uses AND, OR, XOR, and shifts to pack flags into integers, test and toggle individual bits, and exploit tricks like XOR-cancellation to find a unique element in O(1) space. Interviews probe it to see whether you reach for a bitmask when it gives a real constant-factor or memory win and avoid it when it just obscures the logic. The skill is knowing the handful of patterns that pay off, not memorizing clever one-liners.
21Sorting AlgorithmsFree
Sorting algorithms split into comparison sorts (merge, quick, heap) bounded by an O(n log n) lower bound, and linear-time counting and radix sorts that work only when keys are small bounded integers. The practical knowledge is the tradeoffs: quicksort's cache-friendly average speed versus its worst case, merge sort's stability, heap sort's in-place guarantee, and when a heap or hash beats sorting at all. Interviews probe it to check you know what your language's sort actually does and when not to sort.
22Tries and String AlgorithmsCore
A trie is a prefix tree that stores strings by shared prefixes, giving O(length) lookup and natural prefix queries for autocomplete. The classic string-matching algorithms (KMP's failure function, Rabin-Karp's rolling hash) beat the naive O(nm) scan by never re-comparing characters they already know. Applied AI coding interviews probe these because they show up directly in tokenizer dictionaries, search indexes, and substring filters, and because candidates almost always reach for the brute-force scan first.
23Implementing ML From Scratch (NumPy Patterns)Core
ML-from-scratch coding rounds test whether you can express a model as vectorized array operations rather than Python loops, structure a clean forward and backward pass, and write a numerically careful softmax and cross-entropy. Interviewers watch for the vectorization mindset, correct broadcasting, and whether you stabilize the math before they have to ask. The skill is turning the math on the whiteboard into a few NumPy lines that would actually run on a batch.
24Numerical Stability in CodeCore
Numerical stability is writing arithmetic so floating-point error and overflow do not corrupt the result, which matters because naive ML math (softmax, cross-entropy, variance) silently returns NaN or wrong gradients. Applied AI interviews probe it because the fixes (log-sum-exp, max-subtraction, working in log-space) are small code changes that separate engineers who have shipped training loops from those who have only called library functions.
25Fast and Slow Pointers (Floyd's Cycle Detection)Free
Fast and slow pointers run two cursors through a sequence at different speeds so geometry, not extra memory, reveals structure. The tortoise and hare detect a cycle, locate where it begins, and find the middle of a list in a single pass with O(1) extra space. Interviews probe this because it tests whether a candidate can trade a hash set for a pointer trick and prove the meeting actually happens.
26Monotonic Stack and Monotonic QueueCore
A monotonic stack keeps its elements sorted so the next-greater or next-smaller element falls out in amortized O(n); a monotonic deque does the same for a sliding window maximum. The shared trick is an invariant: before pushing, discard everything that the new element makes useless. Interviews probe these because they turn an obvious O(n^2) scan into a single pass and test whether a candidate can name what the structure never stores.
27Prefix Sums and Difference ArraysFree
A prefix-sum array precomputes running totals so any range sum answers in O(1), and pairing prefix sums with a hash map counts subarrays whose sum hits a target or a residue mod k. The difference array is the mirror image: it makes range updates O(1) and reconstructs the final array with one pass. Interviews probe these because they convert repeated range work into a single precompute and test the prefix-sum-plus-hashmap pattern.
28Matrix and Grid Simulation PatternsCore
Grid problems reward a small set of mechanical patterns: walk a spiral by shrinking four boundaries, rotate a square in place with a transpose-then-reverse, and mark state inside the grid itself to keep extra space at O(1). The hard part is index bookkeeping, not algorithms. Interviews probe these because off-by-one errors on boundaries are where most candidates lose points, and in-place tricks test whether you can avoid an obvious extra-memory copy.
10

🤝 Behavioral & Project Deep-Dives

The half of the job most engineers under-train: owning ambiguous projects, model-failure post-mortems, and translating trade-offs to non-experts.

01Requirements DiscoveryFree
The most expensive AI mistakes come from building the wrong thing, and the cause is usually skipping discovery. Requirements discovery is uncovering the real problem behind the stated request, who the user is, what success means, what the data actually looks like, and the constraints, before building. The core skill is asking the right questions and working backwards from the user's outcome, not their proposed solution. Applied-AI interviews probe it because the half of the job most engineers under-train is understanding the problem.
02Scoping Under AmbiguityFree
Real AI projects start ambiguous: vague goals, unknown data, shifting requirements. Scoping under ambiguity means making progress anyway, finding the smallest version that delivers value (an MVP), prioritizing by impact, making assumptions explicit, and de-risking the unknowns early rather than waiting for perfect clarity. Applied-AI interviews probe it because the ability to cut a fuzzy problem down to a shippable first slice, and to act decisively without complete information, is what separates senior engineers.
03Translating Technical Trade-offsFree
Applied-AI engineers constantly translate between technical reality and business stakeholders: explaining the accuracy-latency-cost triangle, why the model cannot be 100% reliable, and what a trade-off means for the user, in the stakeholder's language, not jargon. The skill is framing decisions as business impact and risk, and being honest about uncertainty. Applied-AI interviews probe it because the best technical answer is worthless if you cannot help a non-technical decision-maker choose, and AI's probabilistic nature makes this translation essential.
04Communicating with Non-Technical StakeholdersFree
Much of applied-AI work is explaining complex systems to non-technical people: executives, customers, domain experts. The skill is meeting the audience where they are, leading with the outcome and the 'so what', using analogies over jargon, being honest about limitations, and tailoring depth to who is listening. Applied-AI interviews probe it because the ability to make an AI system understandable and trustworthy to a non-expert is half the job, and explaining a model's behavior to a skeptical stakeholder is a routine task.
05Handling the Live Demo (and Recovery)Core
AI demos fail in front of customers: the model hallucinates, a service times out, an edge case breaks. The skill is composure and recovery, acknowledging it honestly without panicking, redirecting to what works, and turning a failure into a credibility moment by showing you understand why it happened and how production handles it. Applied-AI interviews probe it because customer-facing engineers demo probabilistic systems that will sometimes misbehave, and grace under that pressure is a distinguishing trait.