AIInterviewTraining logoAIInterview/Training
THE APPLIED AI CURRICULUM

Understand the concepts before you drill the questions

A structured path through the ideas AI, ML, and GenAI engineering 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. If you only need to know what a word means, the glossary defines every one of them in a sentence.

230 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 walk through a sequence one position at a time via a hidden state, an approach that is principled but slow and weak on long-range dependencies because gradients shrink across many steps. Gates in LSTMs and GRUs carry information further, and seq2seq encoder-decoder models with attention broke the single-vector bottleneck, the idea transformers later pushed all the way. AI, ML, and GenAI engineer interviews probe this because it explains where attention came from and why the field traded recurrence for parallelism.
02Classic NLP: Bag-of-Words, TF-IDF, and Word2VecFree
Before learned embeddings, text became sparse high-dimensional vectors through bag-of-words and TF-IDF, which tally words and weight them by distinctiveness while ignoring meaning and order. Word2Vec and GloVe swapped counts for dense vectors trained so words sharing contexts sit near each other, capturing semantic similarity. AI, ML, and GenAI engineer interviews probe this because sparse methods still win as cheap baselines and as the lexical half of hybrid retrieval, and because they clarify what dense embeddings actually repaired.
03TokenizationFree
Models read neither characters nor words; they read tokens, subword chunks produced by an algorithm like BPE that maps text to integer IDs. Tokenization sets how many tokens a piece of text costs (driving price, latency, and context usage), why models miscount letters or stumble on rare words, and why non-English text costs more. AI, ML, and GenAI engineer interviews probe it because token accounting is the first thing that bites a production LLM bill.
04The Context WindowFree
The context window is the largest number of tokens a model can attend to at once, prompt plus generation. It is capped by attention's quadratic cost, the KV cache's linear memory growth, and the length the model trained on. A bigger window is neither free nor uniformly useful (models lose information in the middle), which is why retrieval often beats cramming everything into context. AI, ML, and GenAI engineer interviews probe it because it drives 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 turns into geometric closeness, similar meanings land near each other, measured by cosine similarity. Embeddings drive semantic search, retrieval, clustering, recommendation, and the vector index behind RAG. AI, ML, and GenAI engineer 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 erode 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. Grasping 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. AI, ML, and GenAI engineer interviews probe it because it is the mental scaffold for everything else, attention cost, KV cache, MoE, and serving.
07Attention and Self-AttentionCore
Attention casts each token as 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 draws 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 then explains context limits, long-prompt expense, and the KV cache. AI, ML, and GenAI engineer interviews probe it because it ties 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 leaves 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 sharply, and grouped-query attention sits between them by sharing key-value heads across small groups. AI, ML, and GenAI engineer 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 rely on relative schemes: RoPE rotates query/key vectors by an angle proportional to position so the attention score hinges 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. AI, ML, and GenAI engineer 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) trim the tail before sampling. The choice sets the trade-off between deterministic, focused output and diverse, creative output. AI, ML, and GenAI engineer interviews probe it because the right decoding settings differ sharply between factual/extraction tasks and creative ones, and because reproducibility hinges 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 break a schema or grammar, so only valid continuations can be sampled. It is the dependable way to get JSON, enums, or function-call arguments, and it underpins tool calling. The caveat: it guarantees structural validity, not semantic correctness. AI, ML, and GenAI engineer 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 instructions kept separate from untrusted data, not ad-hoc strings. AI, ML, and GenAI engineer 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 has the model 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 mirror the model's actual computation. AI, ML, and GenAI engineer 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 move 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. AI, ML, and GenAI engineer 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 arises 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. AI, ML, and GenAI engineer 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). AI, ML, and GenAI engineer 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 turns into a helpful, harmless assistant. It runs in 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 resist specification as a loss. AI, ML, and GenAI engineer 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 converts human preference comparisons into a scalar score for any response, the very signal RLHF chases. Trained on response pairs labeled by which one a human favored, it learns to rank instead of to write text. Its flaws are behind RLHF's failure modes: reward hacking (gaming the proxy) and going stale once the policy drifts off-distribution. AI, ML, and GenAI interviews probe it because it shows where the alignment signal originates and why it is exploitable, and the same idea carries over to LLM-as-judge evaluation.
19Constitutional AI and RLAIFCore
RLAIF (RL from AI Feedback) swaps human preference labels for AI-generated ones, pushing alignment past the human-labeling bottleneck. Constitutional AI is Anthropic's particular version: the model critiques and revises its own outputs against a written set of principles (a constitution), producing the preference data from those principles. The upside is scalability, consistency, and explicit, editable values; the downside is the AI judge's own biases. AI, ML, and GenAI interviews probe it because it is how alignment scales and how values become explicit and auditable.
20The KV CacheCore
In autoregressive decoding a model would recompute attention over the whole history at every step; the KV cache keeps each token's key and value vectors so a new token only attends and never recomputes. Compute is saved, but the cost shifts to memory: the cache grows with sequence length times batch size and usually turns into the binding constraint in serving. AI, ML, and GenAI interviews probe it because it explains why long contexts are costly 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, costly in compute and memory and leaving a full-size copy per task. LoRA freezes the base model and trains small low-rank adapter matrices, dropping trainable parameters by orders of magnitude while matching most of full fine-tuning's quality. QLoRA layers on 4-bit base quantization to fit huge models on one GPU. AI, ML, and GenAI interviews probe it because PEFT is how teams actually fine-tune, and because LoRA adapters make serving hundreds of variants cheap.
22DPO and Preference-Optimization VariantsCore
Direct Preference Optimization aligns a model straight from preference pairs with a simple classification-style loss, bypassing RLHF's separate reward model and RL loop, which makes alignment far simpler and more stable. A family of variants then loosens DPO's requirements: SimPO drops the reference model, KTO drops the need for paired data, and ORPO folds SFT and alignment into one step. AI, ML, and GenAI 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, nudging the policy in small, clipped steps to stay stable; GRPO (used by DeepSeek-R1) removes PPO's separate value network and instead normalizes rewards within a group of samples, which is simpler and cheaper for LLMs. AI, ML, and GenAI 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 swaps the dense feed-forward layer for many expert networks plus a router that sends each token to only a few of them. This separates 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. AI, ML, and GenAI interviews probe it because most frontier models are MoE, and it explains how models grow more capable without proportionally more inference cost.
25Scaling LawsCore
Scaling laws say model loss drops predictably as a power law in parameters, data, and compute, which is why bigger models trained on more data reliably improve. 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 hold up. AI, ML, and GenAI 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 use this. AI, ML, and GenAI interviews probe it because it changed how hard problems get 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 more than 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. AI, ML, and GenAI interviews probe it to see whether you understand where the reasoning ability actually comes from.
28Multimodal Models and VLMsCore
Multimodal models handle 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, making cross-modal search possible. AI, ML, and GenAI 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 begins 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. AI, ML, and GenAI 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 perform 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. AI, ML, and GenAI interviews probe it because global products hit both the quality gap and the token tax, and per-language evaluation exposes 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 hold back large or reasoning models for genuinely hard ones, often with a cascade that escalates on low confidence. AI, ML, and GenAI 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. AI, ML, and GenAI 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. AI, ML, and GenAI interviews probe it because candidates routinely assume a large window is a substitute for retrieval, and it is not.
34What an LLM Is: Next-Token Prediction and the Training PipelineFree
An LLM is a function that maps a sequence of tokens to a probability distribution over the next token, called in a loop. Three stages turn that function into an assistant: pretraining on a huge corpus buys knowledge and fluency, supervised fine-tuning teaches it to answer rather than continue, and preference alignment teaches it which answer a human prefers. AI, ML, and GenAI engineer interviews probe this because capability comes from pretraining while behavior comes from post-training, and almost every production complaint is a behavior complaint.
35Foundation Models and the Pretrain-Adapt ParadigmFree
A foundation model is a single large model pretrained on broad data and then adapted to many tasks, replacing the old habit of training one bespoke model per task. The scarce resource moved: it used to be labeled data and training compute, and now it is evaluation and context. AI, ML, and GenAI engineer interviews probe this because it explains why a prototype takes an afternoon while a reliable product still takes a quarter, and because knowing when a gradient-boosted tree still beats an LLM is a senior signal.
36Normalization in Transformers: LayerNorm, RMSNorm, Pre-Norm and Post-NormCore
Normalization keeps activations in a range where a deep stack can actually train. LayerNorm re-centers and re-scales each token vector; RMSNorm drops the mean subtraction entirely and only divides by the root mean square, which costs nothing in quality while removing about half the elementwise arithmetic and one learned parameter tensor. Where you put the norm matters more: pre-norm leaves the residual path clean and is why 60-plus-layer stacks train at all, while post-norm can end slightly better but fights you the whole way. AI, ML, and GenAI engineer interviews probe it because it is the difference between a model that converges and one that diverges at step 300.
37Causal Masking and Teacher ForcingCore
A causal mask adds a triangular block of large negative values to the attention scores before the softmax, so every position gets exactly zero attention weight on the future. That one trick lets you push a whole sequence through in a single forward pass and compute a loss at every position at once, which is teacher forcing, and it is the reason transformer training parallelizes while RNN training could not. AI, ML, and GenAI engineer interviews probe it because it explains the deepest asymmetry in LLMs: training is parallel over positions and generation is irreducibly serial, which is exactly why the KV cache exists.
38Logits, Log-Probs, and Logit BiasCore
The output layer of an LLM is an API surface, not just an implementation detail. Logits are raw per-token scores, softmax turns them into probabilities, and log-probs are what providers actually return because they are numerically stable and add up across a sequence. Four production techniques live here: confidence scoring for routing and abstention, logit bias to ban or force a token, structured decoding by masking invalid tokens, and classification by reading a single position's log-probs instead of parsing prose. AI, ML, and GenAI engineer interviews probe it because it is the difference between treating the model as a text box and treating it as a probabilistic component.
39Fine-Tuning Hyperparameters and OverfittingCore
Choosing to fine-tune is the easy part. The run succeeds or fails on a short list of dials: learning rate, epochs, effective batch size, LoRA rank and alpha, which modules you target, and max sequence length. Overfitting is the default outcome when those dials are set by copying a blog post, and its signature is a train loss that keeps falling while eval loss turns up. AI, ML, and GenAI interviews probe this because it separates people who have actually run a fine-tune from people who have only read about one.
40Context Compression and Prompt CompactionCore
When a prompt is too big, compression is the last lever you should reach for, not the first. Restructuring for a stable cached prefix is bigger and cheaper, and compaction (summarizing old turns, dropping stale tool output, reranking so you send five good chunks instead of twenty mediocre ones) covers most of the rest. Hard compression trades a measurable accuracy tax for tokens, and it can raise your bill by destroying cache hits. AI, ML, and GenAI interviews probe this because candidates reach for the clever technique before the free one.
41Diffusion Control and Fast SamplingCore
A text prompt is a weak handle on an image model. Real control comes from structural conditioning: ControlNet for layout and pose, IP-Adapter for identity and style, masked inpainting for local edits. Speed comes from attacking three separate factors: the number of steps, the cost per step, and the passes per step. AI, ML, and GenAI interviews probe this because shipping an image product means hitting a latency budget and giving users control that a prompt alone cannot deliver.
42Multimodal Fusion ArchitecturesCore
There are four ways to get an image into a language model, and they differ by how late the modalities meet: dual encoders (CLIP), cross-attention resamplers (Flamingo, Q-Former), projectors that turn patches into tokens (LLaVA), and natively multimodal pretraining. Each is right for a different job, and the decision rule is short: retrieval wants a dual encoder, reasoning wants a projector or cross-attention. AI, ML, and GenAI interviews probe this because picking the wrong family means paying for reasoning capacity you cannot index, or building a search system that cannot answer questions.
43Alignment: Outer, Inner, and Scalable OversightCore
Alignment is getting a system to pursue what we actually want rather than what we literally specified. Outer alignment asks whether the objective is right, and it fails as reward hacking, overoptimization, and sycophancy. Inner alignment asks whether the model internalized the goal or something merely correlated with it. Scalable oversight asks how humans supervise models they can no longer evaluate. AI, ML, and GenAI interviews probe this because RLHF, DPO, and Constitutional AI are mechanisms, and the frame beneath them is what tells you when they will fail.
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 anchors an LLM in outside knowledge: when a query arrives you pull the most relevant chunks from a knowledge base into the prompt, letting the model respond from actual sources rather than memory. This is the go-to remedy for hallucination and outdated knowledge, and refreshing it needs no retraining. Its stages are ingest and chunk, embed and index, retrieve (frequently rerank), then generate with citations. AI, ML, and GenAI interviews test it because RAG is the most common production LLM architecture.
02Vector Search and ANN IndexesCore
Vector search locates the embeddings closest to a query vector. Exact nearest-neighbor runs O(n) per query and will not scale, so production relies on Approximate Nearest Neighbor (ANN) indexes (HNSW, IVF, product quantization) that give up a little recall for enormous speedups. In practice the hard parts are the recall-vs-latency-vs-memory trade-off, metadata filtering, and coping with updates. AI, ML, and GenAI interviews test it because it is the engine beneath RAG and semantic search, and how you tune it directly sets retrieval quality and cost.
03Choosing and Adapting Embedding ModelsCore
Choosing an embedding model is a call about retrieval quality, cost, and operational risk on your own data, not about which model leads a public leaderboard. The hard parts are benchmarking against your own queries, weighing dimensionality against storage and latency, judging whether to fine-tune for your domain, and preparing for the re-embedding migration whenever the model changes. AI, ML, and GenAI interviews test it because candidates reach for the leaderboard winner and overlook the drift and migration costs that bite later.
04ChunkingCore
Chunking divides documents into the passages you embed and retrieve, and it ranks among the highest-leverage knobs in RAG. Make chunks too large and embeddings get diluted so retrieval turns imprecise; make them too small and chunks lose the context needed to answer. Past fixed-size splitting, structure-aware and semantic chunking hold coherent units together, while parent-child (small-to-big) retrieval matches on small chunks yet returns larger context. AI, ML, and GenAI interviews test it because weak chunking quietly caps retrieval quality.
05RerankingCore
Reranking is a two-stage retrieval design: a fast bi-encoder grabs a broad candidate set for recall, then a slower but more accurate cross-encoder rescores each (query, document) pair to reorder them for precision. The cross-encoder wins because it reads query and document jointly instead of as precomputed vectors. Reranking lets you hand the model fewer, better chunks, often the highest-ROI improvement to a RAG system. AI, ML, and GenAI interviews test it because it is the cheapest large win in retrieval quality.
06Late-Interaction Retrieval (ColBERT)Core
Late-interaction retrieval stores each document as one vector per token instead of a single pooled vector, then scores a query by adding up the best token-to-token matches (MaxSim). It falls 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, yet with a heavy storage cost. AI, ML, and GenAI interviews test it because knowing when this middle tier earns its disk footprint shows real retrieval-architecture judgment.
07Hybrid Search and Reciprocal Rank FusionCore
Vector search alone grasps meaning but drops exact terms (codes, names, SKUs); keyword search (BM25) alone locks onto exact terms yet ignores synonyms and intent. Hybrid search runs the two together and fuses their outputs, with Reciprocal Rank Fusion offering an easy way to merge rankings without reconciling incomparable scores. Applied-AI interviews cover it because production retrieval is nearly always hybrid, so understanding why (and how to fuse) shows genuine RAG experience.
08GraphRAG and Knowledge-Graph RetrievalCore
GraphRAG constructs an entity-and-relationship graph across a corpus, then retrieves by walking that graph rather than (or together with) flat vector similarity. It handles the questions flat RAG cannot: multi-hop links that span documents and global questions needing the whole corpus summarized instead of the top-k chunks. The downside is build and upkeep cost: pulling entities and relations with an LLM runs expensive and the graph drifts as the corpus shifts. Applied-AI interviews cover it to check whether you know when the added machinery earns its keep.
09Hierarchical Retrieval (RAPTOR and Small-to-Big)Core
Hierarchical retrieval resolves the chunk-granularity dilemma: small chunks retrieve precisely but miss context, large chunks hold context but retrieve poorly. RAPTOR grows 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 yet returns the larger parent for context. Applied-AI interviews cover it because it is the standard production fix once naive fixed-size chunking begins missing answers.
10Query Transformation and Multi-Hop RetrievalCore
A user's raw question is frequently a weak search query: ambiguous, underspecified, or needing several facts chained together. Query transformation rewrites or breaks it apart before retrieval, query rewriting, expansion, HyDE (embed a hypothetical answer), and decomposition into sub-questions. Multi-hop questions call for iterative retrieval because the second fact hinges on the first's answer. Applied-AI interviews cover 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 supplied sources; citations make each claim traceable to the exact passage backing it. Together they form RAG's trust mechanism: they let users verify, let you catch hallucination (an uncited or unsupported claim is a red flag), and are required in high-stakes domains. Applied-AI interviews cover it because 'it gave a great answer' means nothing 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 loops until finished. Tool calling works because the model emits a structured request that your code executes, the model itself never runs anything. The upside is doing real work; the cost is reliability and the safety surface (an agent that can act can act wrongly). Applied-AI interviews cover it because agents are where LLMs meet real systems.
13Function Calling and Tool SchemasCore
Tool use runs on a function-calling protocol: you declare each tool as a JSON schema, the model returns a structured call (name plus arguments) that your code checks and executes, and the result flows back into the conversation. Design is what's hard, not the wiring: how you write tool descriptions and shape results governs whether the model reaches for the correct tool with correct arguments, and pinning output to a schema can shave a measurable slice off accuracy. Applied-AI interviews test it because schema design is where most agents fail without anyone noticing.
14Model Context Protocol (MCP)Core
MCP is an open client-server standard that connects an agent to external tools, data, and prompts through one uniform interface, so a single integration serves many hosts instead of bespoke glue written per model. Servers publish tools, resources, and prompts with typed schemas; clients discover and invoke them at runtime. Applied AI interviews test it because what usually keeps an agent from shipping is integration plumbing rather than model quality.
15Agent Memory: Short-Term, Long-Term, and Memory StoresCore
Agent memory is how an agent holds onto and recalls information across steps and sessions. Short-term (working) memory sits in the context window for the current task; long-term memory is durable information (facts, user preferences, past outcomes) kept outside the window and retrieved when it matters. The skill lies in choosing what deserves to be remembered, where to keep it, and when to read it back. Applied AI interviews test it because durable memory is what turns a one-shot chatbot into an agent that gets better 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 breaks the task down up front and then runs the steps, and reflection adds a self-critique pass that revises output. Each strikes a different balance among latency, token cost, and resilience. Applied AI interviews test this to see whether you choose a pattern from task structure rather than falling back on one loop for everything.
17Context Engineering for AgentsCore
Context engineering is the discipline of designing the entire information payload that enters 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 missing, buried, stale, or squeezing out the rest of the budget. Applied AI interviews test it because it is the highest-leverage lever on agent reliability and cost, and it sorts people who tune prompts from people who manage state.
18Multi-Agent OrchestrationCore
When a task is too big or varied for a single agent, an orchestrator breaks it apart and hands 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 inside its window) alongside parallelism and specialization. The costs are coordination overhead, latency, and error propagation, so you reach for multiple agents only when the task truly needs it. Applied-AI interviews test it because multi-agent designs are common and easy to over-apply.
19Agent Reliability and Long-Horizon RobustnessPremium
Agents over long horizons break down because per-step reliability multiplies: a step that works 95 percent of the time drops to roughly 60 percent across ten steps. The discipline spans consistent completion (not pass@k), recovering from errors, step and token budgets, human-in-the-loop checkpoints, and stopping cascading failure inside multi-agent systems. AI, ML, and GenAI engineer interviews test this to tell apart people who built a demo from people who shipped an agent that survives thousands of runs.
20Agentic and Corrective RAGCore
Standard RAG retrieves once then generates; agentic RAG puts retrieval in a loop so the model chooses whether to retrieve, what to query, judges the results, and retrieves again until it has enough. Corrective RAG bolts on a grader that inspects retrieval quality and reacts (re-retrieve, web search, or discard) when the context is weak. AI, ML, and GenAI engineer interviews test it because complex, multi-hop questions beat single-shot RAG, and self-correcting retrieval is the remedy, paid for in extra calls and agent-reliability concerns.
21Agent Evaluation and Trajectory AnalysisCore
Agent evaluation grades the whole execution trace (tool calls, observations, state changes, recovery) instead of the final answer alone, because a right answer can mask a broken process and a wrong answer can trace to one bad step in an otherwise sound run. It combines outcome metrics with process metrics such as tool-selection accuracy and step efficiency. AI, ML, and GenAI engineer interviews test it because scoring agents is harder than scoring RAG, and most teams miss it by checking only the last message.
22Retrieval vs Long ContextCore
If a whole document fits in a model's large context window, should you paste it, or retrieve only the relevant chunks? Long context is simpler but costly (quadratic attention), slower, and used unevenly (lost in the middle); retrieval is cheaper, faster, refreshes without retraining, and surfaces only what matters. The usual answer is retrieval for large, changing, or partially-relevant corpora, and long context for small, cohesive inputs. AI, ML, and GenAI engineer interviews test it because 'just use the big context window' is a common, costly oversimplification.
23Agent State, Checkpointing, and Durable ExecutionCore
A long-running agent is a distributed workflow, so the answers come from durable execution rather than LLM folklore: model state as an explicit serializable object updated by reducers, checkpoint after every step so a crash resumes instead of replaying, and give every side-effecting tool an idempotency key plus a durable record written before the call. Explicit state also buys time-travel debugging, human pause-and-resume, and forking a run. AI, ML, and GenAI interviews probe it because the thing that kills agents in production is not reasoning quality, it is a process restart halfway through a 40-step task.
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
ML rests on four information-theoretic quantities: entropy (how uncertain a distribution is), cross-entropy (the cost of modeling the true distribution with your predicted one, the classification loss), KL divergence (the gap between two distributions), and mutual information (how much one variable reveals about another). You meet them as the loss you minimize, the regularizer inside VAEs and RLHF, and the split criterion in decision trees. AI, ML, and GenAI engineer interviews test this because cross-entropy and KL sit under training, distillation, and alignment.
02Probability Distributions You Should KnowFree
A small set of distributions covers 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. AI, ML, and GenAI engineer interviews probe this because the distribution you assume is the loss you minimize: Bernoulli yields cross-entropy, normal yields mean-squared error, and naming that link shows you grasp what a model is actually fitting.
03MLE, MAP, and Bayesian vs FrequentistCore
Maximum likelihood chooses the parameters that make the observed data most probable; MAP adds a prior and chooses the most probable parameters given the data. MAP reduces to MLE when the prior is flat, and the prior serves as regularization. AI, ML, and GenAI engineer interviews probe this to check whether you know 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 a sample mean is approximately normal no matter the underlying distribution, which is why so much inference relies on the normal curve. Standard error captures how much a sample mean wobbles and shrinks as sample size grows, unlike standard deviation. AI, ML, and GenAI engineer interviews probe this because it fixes 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, condensed into a p-value. The trap is treating the p-value as the probability the null is true, overlooking effect size, or running many tests and reporting only the winners. AI, ML, and GenAI engineer 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 match reality. The core methods are uniform, stratified, reservoir for unbounded streams, and importance sampling for rare or reweighted events. AI, ML, and GenAI engineer interviews probe this because a biased sample yields 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 merely 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 a clean experiment is out of reach. AI, ML, and GenAI engineer interviews probe it because product and model decisions turn 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 cut error. Mini-batch SGD (a small batch per step) is the workhorse, trading off stable gradients against 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. AI, ML, and GenAI engineer 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 yield a probability. Interviews probe these because they are the baseline every model is measured against, the coefficients read directly, and logistic regression is still the production default when you need a calibrated binary score.
10The Bias-Variance TradeoffFree
A model's error breaks into bias (error from being too simple to capture the pattern, underfitting) and variance (error from being too sensitive to the training sample, overfitting). Cutting one often raises the other, so generalization comes down to finding the balance. It is the lens behind regularization, model-complexity choices, and ensembling. AI, ML, and GenAI engineer 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 rather than 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 yields fake great offline numbers that collapse in production. AI, ML, and GenAI engineer 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, yielding 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. AI, ML, and GenAI engineer 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 choosing the split that most reduces impurity (Gini or entropy), producing a flowchart you can read top to bottom. Interviews probe trees because they reveal whether you understand impurity-based splitting, why depth is 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. Model diversity is the requirement. AI, ML, and GenAI engineer 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 building the features. Interviews probe SVMs because they reward grasping 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 labels 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, shows why naive nearest-neighbor search breaks down and why production systems rely 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 recovers the label via Bayes. Naive Bayes is the canonical generative classifier and rests on a strong conditional-independence assumption. AI, ML, and GenAI engineer 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). AI, ML, and GenAI engineer interviews probe it to see whether you can match the right algorithm to 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 gives 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 reveals 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 keep local neighborhood structure for 2D or 3D visualization only. AI, ML, and GenAI engineer 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 deciding 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 hinges 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 choosing the right metric. AI, ML, and GenAI engineer 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. AI, ML, and GenAI engineer 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. AI, ML, and GenAI engineer 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 means mistakes in your training labels, and it sets a hard ceiling on model accuracy regardless of how strong the architecture is. Weak supervision generates training labels through code (labeling functions, distant supervision) rather than by hand, giving up some accuracy in return for scale. AI, ML, and GenAI engineer interviews probe this because real datasets are messy, the gap between a model stuck at 78 percent and one hitting 90 percent usually comes down to labels rather than the model, and candidates who grasp confident learning and clean test sets are the ones who genuinely move metrics.
26Synthetic Data GenerationCore
Synthetic data is training or eval data made by a model, a simulator, or a program instead of gathered from the real world, used to bootstrap labels, cover rare cases, and distill a larger model down into a smaller one. Whether it helps depends on quality, diversity, and keeping leakage out between your generator and your eval. AI, ML, and GenAI engineer interviews probe it because candidates grab it as a free fix and overlook the failure modes: distribution mismatch, eval contamination, and model collapse from training on a model's own outputs.
27Hyperparameter OptimizationCore
Hyperparameter optimization is the hunt for the settings (learning rate, depth, regularization) that a model does not learn by itself, done through grid, random, or Bayesian search. AI, ML, and GenAI engineer interviews probe it because what separates candidates is usually method choice and budget discipline: understanding why random search beats grid in high dimensions, how successive halving pours compute into 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 running the chain rule in reverse, from the output back to the inputs. The forward pass computes and caches activations; the backward pass reuses those caches to accumulate gradients in a single sweep, which is why training a billion-parameter model costs only a small constant multiple of a forward pass. AI, ML, and GenAI engineer 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 sitting between linear layers; drop them and a deep network folds into a single linear map however many layers it stacks. The useful lens is gradient flow: sigmoid and tanh saturate and choke off gradients, ReLU fixed that by letting gradient through unchanged for positive inputs (at the cost of dying units), and modern transformers turn to smooth variants like GELU and gated SwiGLU. AI, ML, and GenAI engineer interviews probe it because the choice directly decides whether deep nets train at all and reveals whether you reason about backprop instead of 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 drive it toward zero (early layers stop learning) and factors above one make it explode (training diverges into NaNs). The root cause is that repeated multiplication, and the standard fixes attack it head-on: residual connections to hand gradient a shortcut, normalization to keep activations in scale, gating to hold signal across time, gradient clipping to cap the blow-up, and careful initialization. AI, ML, and GenAI engineer 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 working recipe that lets 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. AI, ML, and GenAI engineer interviews probe this because the wrong init or norm is a frequent reason training diverges or plateaus, and understanding why each one helps separates people who have trained models from those who have only called .fit().
32CNNs: Convolution, Pooling, Receptive FieldsCore
Convolutional neural networks swap dense layers for small filters slid across an image, sharing weights so the same edge detector works everywhere. That buys parameter efficiency, translation equivariance, and a receptive field that widens with depth, which is the inductive bias making CNNs data-efficient for vision. AI, ML, and GenAI engineer interviews probe this to check that you understand why an architecture choice encodes assumptions about the data, not just how to call a library.
33CV Architectures: ResNets, ViT, DetectionCore
Modern computer vision stands on three pillars: residual connections that let CNNs reach hundreds of layers deep without degrading, Vision Transformers that patchify an image and run self-attention in place of convolutions, and detection heads (one-stage vs two-stage) scored by mAP after non-maximum suppression. AI, ML, and GenAI engineer interviews probe this to check that 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 rather than 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 hinges on how much labeled data you have and how far the new domain has drifted. AI, ML, and GenAI engineer 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 the reverse.
35Autoencoders and GANsCore
Two foundational generative architectures: autoencoders squeeze input through a bottleneck and reconstruct it, which makes them useful for denoising, anomaly detection, and learning compact representations, while GANs set a generator against a discriminator in an adversarial game to produce realistic samples. AI, ML, and GenAI engineer interviews probe these because they test whether you grasp the bottleneck principle, the adversarial training dynamics behind mode collapse, and why diffusion models displaced GANs for high-fidelity generation.
36Precision, Recall, and F1Free
Precision is what fraction of your positive predictions were correct; recall is what fraction of the actual positives you caught. They trade off as you slide the decision threshold, and which one matters depends on the cost of false positives vs false negatives. F1 is their harmonic mean. On imbalanced data, accuracy misleads and these metrics (with PR-AUC) tell the truth. AI, ML, and GenAI engineer 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 when its confidence lines up with reality: among the predictions it makes at 0.8, roughly 80% turn out correct. Modern neural nets (and LLMs) tend to be overconfident, so raw scores are not trustworthy probabilities. You correct it post-hoc with temperature scaling, Platt scaling, or isotonic regression on a held-out set, and you measure it with reliability diagrams and Expected Calibration Error. AI, ML, and GenAI engineer 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 converts 'it feels better' into a number, catches regressions before users do, and lets you iterate fast. AI, ML, and GenAI engineer 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 (through an A/B test). They often disagree: an offline win frequently fails to move the online metric, because offline data is a static proxy while the real world carries 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). AI, ML, and GenAI engineer 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, a sample-ratio mismatch signals a bug, and network effects and novelty break naive tests. For ML, it is how you confirm an offline improvement really helps online, since offline gains often do not hold. AI, ML, and GenAI engineer interviews probe it because shipping on offline metrics alone is a classic mistake.
41Multi-Armed BanditsCore
A multi-armed bandit selects 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. AI, ML, and GenAI engineer interviews probe it because the explore-exploit trade-off shows up in ranking, recommendation, and as a simple form of reinforcement learning.
42Benchmarks and Their LimitsCore
Public benchmarks like MMLU offer 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 mean nothing on your workload. AI, ML, and GenAI engineer 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 through comparison: pull similar (positive) pairs together and push dissimilar (negative) pairs apart, so distance encodes similarity. It drives retrieval embeddings, CLIP's shared text-image space, face recognition, and self-supervised pretraining. Quality rides on the number and difficulty of negatives. AI, ML, and GenAI engineer 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 enlist a strong LLM to grade them against a rubric. It scales evaluation far past human review, but it is a fallible proxy with known biases (position, verbosity, self-preference), so you calibrate it against human labels and design it carefully. AI, ML, and GenAI engineer 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 scoring 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 gets scored with recall@k (the ceiling for the whole system), precision, and rank metrics; generation gets scored for faithfulness (is each claim supported by the context?) and answer quality. AI, ML, and GenAI engineer 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. AI, ML, and GenAI engineer 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 those 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 strips 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. AI, ML, and GenAI engineer 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 divides working systems from broken ones is train/serve consistency: the exact resize, color space, and normalization have to match at training and inference. AI, ML, and GenAI engineer 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 one proxy layer sitting between your application and one or more model providers. It consolidates the cross-cutting concerns every LLM app needs: routing and fallback across models/providers, caching, rate limiting, authentication, cost tracking, observability, and guardrails. By hiding providers behind a single interface, it also guards against vendor lock-in. AI, ML, and GenAI engineer interviews probe it because it forms the backbone of a production LLM platform and holds most operational controls.
02Latency Budgets and StreamingFree
LLM latency is not a single figure: time-to-first-token (driven by prefill and queueing) and inter-token latency (driven by decode) feel very different to users. Streaming tokens as they generate masks total latency by showing progress right away. Designing to a latency budget means splitting time across retrieval, model, and tools, tracking TTFT and tokens-per-second (not only end-to-end), and applying streaming, caching, and routing to meet it. AI, ML, and GenAI engineer interviews probe it because perceived latency makes or breaks LLM UX.
03GuardrailsFree
Guardrails are the runtime safety layer around an LLM: input checks (spotting prompt injection, off-topic or disallowed requests, PII) ahead of the model, and output checks (content safety, schema/format validation, grounding, PII/secret leakage) ahead of the user. They combine rules, classifiers, judge models, and validators, plus a defined fail-safe action when one trips. AI, ML, and GenAI engineer interviews probe it because 'add guardrails' is hand-wavy, and it is the concrete input/output checks plus fail-safe behavior that keep a deployment safe.
04Rate Limiting, Retries, and BackoffFree
LLM systems rely on rate-limited, sometimes-failing providers, so resilient design is essential. Rate limiting (token bucket) shields your service and enforces per-tenant quotas; retries with exponential backoff and jitter absorb transient failures without hammering a struggling dependency; circuit breakers stop sending requests to a failing service so it can recover. AI, ML, and GenAI engineer 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 land more than once. Idempotency means running a request twice yields the same effect as running it once, achieved with idempotency keys and deduplication. It underpins safe retries: without it, a retried payment charges twice or a retried pipeline double-counts. AI, ML, and GenAI engineer 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 run 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 grounds debugging, cost attribution, evaluation, and incident response. AI, ML, and GenAI engineer interviews probe it because LLM systems fail silently (a plausible-but-wrong answer throws no error), so visibility is what keeps them debuggable and trustworthy.
07LLM Cost OptimizationFree
LLM systems get expensive fast, and the cost model comes down mostly to 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 going after the dominant contributor. AI, ML, and GenAI engineer 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 ranks among 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 returns a stored answer for a query that is similar (not identical) to a past one, by embedding the query and matching nearest neighbors. AI, ML, and GenAI engineer 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 rely 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 keep failures contained. The aim is for one component's failure to become a degraded experience, not an outage. AI, ML, and GenAI engineer 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 handles 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 separating prompt changes from code deploys so a regression in output quality can be reverted in seconds without shipping a new binary. AI, ML, and GenAI engineer 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 among frontier models on capability, cost, latency, and context window, confirmed by your own task evals rather than public leaderboards. The core skill is reading benchmarks with suspicion (contamination, saturation, prompt sensitivity) and building for provider migration so you are never tied to one vendor. AI, ML, and GenAI engineer 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, feeds it into eval sets and fine-tuning data, and uses the improved model to draw more usage that produces 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. AI, ML, and GenAI engineer 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 run a two-stage funnel: cheap candidate generation trims millions of items to a few hundred, then an expensive ranker scores that shortlist. Candidate generation relies on collaborative filtering, matrix factorization, and two-tower retrieval; ranking layers on a heavy feature-rich model optimized for engagement. AI, ML, and GenAI engineer interviews probe this because it is the canonical ML system design and reveals 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 on its own), pairwise (predict which of two items ranks higher), and listwise (optimize the whole ordering against a ranking metric). Pairwise and listwise outperform pointwise because they learn relative order, which is what ranking metrics like NDCG actually reward. AI, ML, and GenAI engineer 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 constructed 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 process many items and expensive models process few. AI, ML, and GenAI engineer interviews probe this because it is how every large-scale ranking system is actually built, and because freshness, diversity, and policy constraints have to fit 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 a node joins or leaves. 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 even out load imbalance. AI, ML, and GenAI engineer 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 distributes requests across many backend instances so no single server is overwhelmed, and pulls 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 span round-robin, least-connections, and consistent-hash for sticky routing. Health checks are what turn a load balancer from a sprayer into a fault-tolerance mechanism. AI, ML, and GenAI engineer 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 accepting writes while a replica is down. AI, ML, and GenAI engineer 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 holding 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 pass through the cache to the store), write-back (writes hit the cache and flush later). Eviction (LRU, LFU) and TTL govern what to keep, and cache stampede protection prevents a popular expired key from hammering the backing store. CDNs are caches at the network edge. AI, ML, and GenAI engineer 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 has to 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. AI, ML, and GenAI engineer interviews probe it because every replicated store, queue, and feature pipeline sits somewhere on this spectrum, and naming the point precisely sets senior candidates apart.
21Concurrency and Thread SafetyCore
When multiple threads touch shared mutable state, interleavings produce 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 skip locks for simple updates. Deadlock shows up when locks are acquired in conflicting orders. AI, ML, and GenAI engineer 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 break 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 handles the same fan-out problem with managed infrastructure. AI, ML, and GenAI engineer 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 comes down to at-least-once delivery plus idempotent consumers. AI, ML, and GenAI engineer 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.
24Token Streaming: SSE, Chunking, and CancellationCore
Server-Sent Events is the default transport for one-way token streams, and the interesting problems start after you pick it: an output guardrail that buffers the whole response destroys the time-to-first-token you paid a GPU for, you cannot send an HTTP error status after the 200 has flushed, and a client disconnect must actually cancel the GPU work or you keep generating tokens nobody will read. AI, ML, and GenAI interviews probe it because 'we stream the tokens' is one sentence and shipping it correctly is a design round.
05

🔁 MLOps & Lifecycle

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

01Drift DetectionCore
Models decay as the world shifts. Data drift is a move in the input distribution (catchable 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 watching inputs and predictions as leading indicators, alerting on sustained shifts, and triggering retraining. AI, ML, and GenAI engineer 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 work of root-causing why a model underperforms: judging 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 slice-level error analysis and the train/val/test gap ladder to pinpoint the failure before fixing it. AI, ML, and GenAI engineer interviews probe it because most candidates reach for 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: every model carries 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 rebuild a model and debug a regression by diffing against the last good version. AI, ML, and GenAI engineer interviews probe it because shipping models without versioning and lineage turns rollback and debugging into guesswork.
04Reproducible and Deterministic PipelinesCore
A reproducible pipeline yields 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 run nondeterministically 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 takes more than software CI/CD because the model rides 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. AI, ML, and GenAI engineer 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 takes more than uptime and latency, because a model can look healthy and be silently wrong. You watch 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. AI, ML, and GenAI engineer 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 delivers 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. AI, ML, and GenAI engineer 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 holds and runs model weights (and activations) at fewer bits, FP16/BF16, FP8, INT8, INT4, rather than FP32, shrinking memory and accelerating inference for some accuracy cost. It is the primary way to fit a large model onto a given GPU and serve it cheaply, and it sits behind QLoRA fine-tuning and KV-cache compression. AI, ML, and GenAI engineer interviews probe it because 'how do you serve a 70B model affordably?' typically opens with quantization, so the precision ladder and its trade-offs are must-know material.
02GPU Memory and the Serving StackFree
Serving an LLM is largely a memory problem: the GPU has to hold the model weights along with a KV cache that scales with sequence length and batch size, and inference divides into a compute-bound prefill and a memory-bandwidth-bound decode. Understanding the memory math (weights plus KV cache), why decode is bandwidth-bound, and the levers (quantization, batching, paged attention) is the bedrock of LLM serving. AI, ML, and GenAI engineer interviews probe it because 'will this model fit and how fast will it run?' is a recurring production question.
03Knowledge DistillationCore
Knowledge distillation trains a small student model to copy a larger teacher, treating the teacher's soft probability distribution (or internal features) as a richer training signal than hard labels. A student trained this way usually outperforms an identical model trained from scratch on the same data, because the soft targets carry the teacher's learned similarity structure. AI, ML, and GenAI engineer interviews probe it because it is the main lever for compressing 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 run efficiently on batches, but LLM requests show up at different times and complete after different numbers of tokens, so static batching wastes the GPU while it waits on the slowest request. Continuous (in-flight) batching inserts and evicts requests from the running batch at each decoding step, holding the GPU full and sharply lifting throughput. AI, ML, and GenAI engineer 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 out to GPU high-bandwidth memory and reads it back, making it memory-bandwidth bound. FlashAttention merges the entire attention computation into one kernel that tiles the inputs in fast on-chip SRAM and never materializes the full matrix, relying on an online-softmax trick to remain exact. AI, ML, and GenAI engineer interviews probe it because it is what made long-context training and serving 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) loses most of it to fragmentation and over-allocation. PagedAttention adapts virtual-memory paging: keep the KV cache in fixed-size non-contiguous pages allocated on demand, so memory is consumed only as tokens are generated. This fits far more concurrent requests onto a GPU, raising throughput. AI, ML, and GenAI engineer 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 works through 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 compete, so long prefills stall ongoing decodes and you miss either the time-to-first-token or the time-per-output-token SLO. Disaggregation places them on separate GPU pools and moves the KV cache between them, and prefix caching reuses KV for shared prompt prefixes. AI, ML, and GenAI engineer 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 producing each token one at a time leaves the GPU underused. Speculative decoding runs a small, fast draft model to propose several tokens ahead, then the large model checks them all in a single parallel pass, keeping the longest correct prefix. It accelerates generation without altering output quality, since the big model still validates every token. AI, ML, and GenAI engineer 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 requires many GPUs, and the work can be split in distinct ways: data parallelism copies the model and divides the batch; FSDP/ZeRO shards the optimizer state, gradients, and parameters across GPUs to fit models that otherwise do not; tensor parallelism divides a layer's matrices within a node; pipeline parallelism divides layers across nodes. Communication is the scaling bottleneck. AI, ML, and GenAI engineer 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 runs most computation in 16-bit (FP16 or BF16) rather than 32-bit, roughly halving memory and accelerating training on modern GPUs, while holding a few numerically-sensitive parts in FP32 for stability. BF16 is favored over FP16 because it retains FP32's exponent range, sidestepping the overflow/underflow that FP16 needs loss scaling to handle. AI, ML, and GenAI engineer 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 layered on a shared base model, so you can serve hundreds of fine-tuned variants from one set of base weights rather than one full model per tenant. The serving challenge is batching requests that use different adapters in the same forward pass, moving adapters in and out of GPU memory on demand, and reusing the base model's KV cache machinery. AI, ML, and GenAI engineer 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 seldom build a serving stack from scratch; frameworks take care of the production plumbing. General servers (Triton, TorchServe, KServe) host many model types with dynamic batching, multi-model hosting, and versioning. LLM-specific servers (vLLM, TGI, TensorRT-LLM) add the essentials general servers miss: continuous batching, paged KV cache, and token streaming. AI, ML, and GenAI engineer interviews probe it because knowing what these provide, and that LLM serving needs the specialized ones, is practical deployment knowledge.
13Green AI: Compute, Energy, and CarbonCore
Energy is roughly GPU-hours times average power draw times data-center PUE, and carbon is that energy times the grid's carbon intensity where and when you ran it, which varies by an order of magnitude across regions. The counterintuitive consequence: for a widely-deployed model, lifetime inference energy usually dwarfs the one-off training run, so the biggest lever is the serving stack (quantization, distillation, batching, higher utilization) rather than the training job that gets the headlines. AI, ML, and GenAI interviews probe it because efficiency work is cost work, and because a candidate who can write the calculation down is rare.
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 bundles multiple reads and writes so the whole set either commits together or rolls back together, backed by the ACID guarantees of atomicity, consistency, isolation, and durability. The isolation level is the knob that balances concurrency anomalies (dirty reads, non-repeatable reads, phantoms) against throughput, and most databases ship with a weaker default than engineers expect. AI, ML, and data interviews probe it because pipelines that overlook isolation yield silent, intermittent corruption that no unit test will catch.
02Window FunctionsFree
Window functions run calculations over a set of rows tied to the current row, without collapsing them the way GROUP BY does, so you can rank within groups, build running totals and moving averages, and compare a row against its neighbors (LAG/LEAD), all in a single pass. They anchor analytics SQL: top-N-per-group, sessionization, cohort analysis, and period-over-period. AI, ML, and GenAI interviews probe them because they are the single most-tested SQL skill and the clearest way to write analytical queries.
03Idempotent Data PipelinesCore
Data pipelines fail and get rerun, so a pipeline has to be idempotent: running it again yields the same result rather than duplicated or corrupted data. You get there with insert-overwrite by partition, MERGE/upsert keyed on a business id, and deterministic transforms, instead of blind appends that double-count on retry. AI, ML, and GenAI 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 the data behind them, and a silent upstream data change (a renamed column, a units switch, a spike in nulls) corrupts everything downstream without raising an error. Data quality means automated checks (schema, ranges, nulls, freshness, volume, uniqueness) plus data contracts between producers and consumers enforced in CI. AI, ML, and GenAI interviews probe it because 'garbage in, garbage out' is the most common and 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) split by breaks (gaps), the machinery behind sessionization, streak detection, and merging contiguous ranges. The trick is to assign a group id that holds constant within a run, classically with window functions: ROW_NUMBER differences or LAG-based break flags fed into a running sum. AI, ML, and GenAI 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 costly full reloads. It drives incremental pipelines, real-time analytics, and keeping a search index or feature store current. The main concerns are handling updates and deletes (not just inserts), ordering, and applying the change stream idempotently. AI, ML, and GenAI interviews probe it because keeping a RAG index, feature store, or warehouse fresh is a constant need, and full reloads do not scale.
07Deduplication (Exact and Fuzzy)Core
Duplicates slip into data through 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 surface near-matches at scale without comparing all pairs. AI, ML, and GenAI 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) decides which non-matching rows survive. AI, ML, and GenAI interviews probe joins because they are the single most error-prone SQL construct: the wrong type quietly 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 that share the same key values into one row per group, and aggregate functions (COUNT, SUM, AVG) produce a single value per group. AI, ML, and GenAI interviews probe it because the semantics trip people up: a column must be either grouped or aggregated, COUNT quietly skips 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 rather than 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. AI, ML, and GenAI 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 relies on 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 quietly drops every row when the subquery contains a NULL, and aggregates and outer joins treat NULL in surprising ways. AI, ML, and GenAI 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 using a window function, then keep the ranks you want. The choice among ROW_NUMBER, RANK, and DENSE_RANK comes down to tie handling, and getting ties wrong is the usual bug. AI, ML, and GenAI 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 shows 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. AI, ML, and GenAI interviews probe this because the gap between a 30-second and a 0.3-second query usually comes from understanding the plan, not rewriting the logic.
14Indexing StrategiesCore
An index is a secondary data structure that lets the database locate 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). AI, ML, and GenAI 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 rather than the whole table. Clustering and sort keys order data within storage so related rows sit together, improving locality and letting the engine skip blocks. AI, ML, and GenAI interviews probe this because in a cloud warehouse you pay per byte scanned, and turning a full scan into a thin slice separates a query that costs cents from one that costs dollars and minutes.
16Dimensional Modeling and Star SchemasCore
Dimensional modeling arranges 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 keeps BI queries both fast and legible. AI, ML, and GenAI 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 retains versioned rows with effective dates and a current flag, and Type 3 retains a prior-value column. AI, ML, and GenAI 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 rather than 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 quietly drop rows. AI, ML, and GenAI 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 turns on 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. AI, ML, and GenAI 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 layers an open table format (Iceberg or Delta) on object storage to deliver ACID, time travel, and schema evolution at lake cost. The choice turns on cost, governance, and workload, not vendor preference. AI, ML, and GenAI 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. AI, ML, and GenAI 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. AI, ML, and GenAI 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 through expand-then-contract migrations, plus data contracts that make producer and consumer expectations explicit and enforceable in CI. AI, ML, and GenAI 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 ranks as the number one security risk for LLM apps: hostile instructions hijack the model's intended behavior. In direct injection the user supplies the payload; in indirect injection the payload sits inside content the model pulls in or browses (a web page, a document, an email), letting a third party do the attacking. RAG and agents are hit hardest because they consume untrusted content and agents can act. Your main defense is to handle every retrieved or tool output as untrusted data rather than instructions, backed by least privilege and human approval before irreversible actions.
02Indirect Prompt Injection and the Lethal TrifectaCore
Indirect prompt injection buries attacker instructions inside content an agent retrieves or reads (a web page, a PDF, a support ticket), so an innocent user sets off the attack. The lethal trifecta is the mix that turns this into real harm: reach into private data, exposure to untrusted content, and a path to send data out. AI, ML, and GenAI 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 sitting in prompts, logs, and training sets creates privacy and compliance exposure (GDPR, HIPAA), so you have to detect and guard it. Detection works in layers (regex for structured PII like emails/SSNs, ML/NER for names and addresses) and stays imperfect, making it one layer next to the strongest control: data minimization, meaning you do not collect or log what you do not need. AI, ML, and GenAI interviews probe it because LLM logs and training data form a major PII surface, and a leak is a legal and reputational disaster.
04Differential PrivacyCore
Differential privacy injects calibrated noise into data, queries, or training so the output is provably insensitive to any single individual's record, capping what can be learned about any one person. In ML, DP-SGD clips and noises gradients to curb memorization and defend against membership-inference attacks. The price is a privacy-utility trade-off governed by a parameter epsilon. AI, ML, and GenAI 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 records enough to reconstruct and explain any AI decision: the input, retrieved context, model and prompt version, output, and who/when, along with human overrides and guardrail events. It underpins debugging, incident response, compliance (the EU AI Act and regulated domains require traceability), and accountability. The friction is privacy: logs are a sensitive surface, so you redact PII, control access, and set retention. AI, ML, and GenAI 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 shipping their raw data to a central server: each party computes updates locally and only the updates get aggregated. It weighs communication cost, data heterogeneity, and privacy leakage against the payoff of training on data that legally or practically cannot be pooled. AI, ML, and GenAI interviews probe it to see whether you can separate 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 a single AI system serves many customers (tenants), the cardinal rule is that no tenant may ever see another's data. In RAG this means every retrieval is scoped by tenant so the vector search cannot return another tenant's documents; the same scoping reaches caches, logs, fine-tunes, and rate limits. The dangerous failure is a cross-tenant leak. AI, ML, and GenAI 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 check 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 hide an unwanted internal mechanism. AI, ML, and GenAI 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 keeps deployments safe, fair, and compliant: risk assessment, documentation (model cards, datasheets), human oversight, monitoring, and incident response, shaped 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 turn legally mandatory. AI, ML, and GenAI interviews probe it because enterprise and regulated deployments require it, and it converts 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 have to 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 stays contained. AI, ML, and GenAI 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), settling on a fairness definition (they conflict, you cannot satisfy all at once), mitigating, and documenting limits in model cards. AI, ML, and GenAI 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 appear only 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. AI, ML, and GenAI 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 coax a model into producing 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. AI, ML, and GenAI 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.
14Automation Bias and Effective Human OversightCore
Automation bias is the documented tendency for a person shown a confident machine recommendation to anchor on it and stop hunting for contradicting evidence, which makes 'human in the loop' weakest exactly where the model is wrong. Effective oversight means designing against that: independent-then-reveal review, calibrated uncertainty instead of a single confident label, blind audits that measure the real override rate, and evaluating the human-plus-model pair rather than the model alone. AI, ML, and GenAI interviews probe it because almost every risk register lists a human reviewer as the mitigation and almost nobody measures whether that reviewer changes any outcome.
15Privacy Attacks: Re-identification, Linkage, and k-AnonymityCore
Stripping direct identifiers does not anonymize data: quasi-identifiers like ZIP, birth date, and gender are close to unique for most people, and any auxiliary dataset sharing those fields enables a linkage attack. k-anonymity, l-diversity, and t-closeness each patch the previous one's hole and all of them collapse in high dimensions, where nearly every record is unique. AI, ML, and GenAI interviews probe this because it is the reason differential privacy exists, and because sparse behavioral data, embeddings, and aggregate model outputs all leak in ways a redaction pass cannot fix.
16Intersectional and Subgroup FairnessCore
A model can pass a fairness audit on gender, pass on race, and fail badly on their intersection, because a single-axis audit averages away the group you most need to see. Doing it properly means fighting combinatorial explosion, small noisy cells, multiple-comparison error, and fairness gerrymandering (fair on every named group, unfair on one nobody named). AI, ML, and GenAI interviews probe it because reporting per-group metrics one axis at a time is the standard answer and it is not sufficient.
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
Production data arrives messy: formats vary, fields go missing, encodings break, records come malformed, and edge cases appear that you never planned for. Defensive parsing tackles the unhappy path on purpose, checking input, choosing per record whether to skip, default, or fail, and keeping one bad record from taking down the batch. Applied-AI interviews test this (frequently as a coding screen) because feeding documents and data into AI systems is half the work, and fragile parsers built for clean input break the moment they hit production.
02The Big-O That Actually MattersFree
Big-O complexity counts most where it actually hurts in real AI systems: dodge accidental O(n^2) (all-pairs comparisons, repeated linear scans), reach for hash maps to get O(1) lookups, and understand that vector search stays approximate exactly because exact nearest-neighbor costs O(n) per query. The useful skill is catching the quadratic trap and the data-structure fix, not naming complexity classes. Applied-AI interviews test it because the gap between O(n) and O(n^2) separates a system that scales from one that topples over.
03Testable Design for AI SystemsCore
AI systems resist testing because models are non-deterministic and reach out to external services, so testability must be built in from the start: put the non-deterministic model behind an interface so you can mock it, split deterministic logic (parsing, retrieval, formatting) away from the model call and test it as usual, and check metric tolerances instead of exact outputs. Applied-AI interviews test this because untestable LLM code regresses without warning, and the habit of mocking the model and testing the deterministic pieces is what keeps a system reliable.
04Streaming and BackpressureCore
When data is too large to hold in memory or keeps arriving without end, you handle it as a stream, one piece at a time, with bounded memory, rather than pulling it all in. Backpressure is the mechanism that keeps a fast producer from swamping a slow consumer, by signaling 'slow down' instead of buffering without limit until memory runs out. Applied-AI interviews test it because AI pipelines chew through huge datasets and token streams, and the naive load-everything approach OOMs while unbounded buffering crashes under load.
05Arrays and HashingFree
The hash map does most of the heavy lifting in coding interviews: average O(1) insert and lookup that collapses an O(n^2) all-pairs scan down to one O(n) pass. The moves that keep coming up are the seen-set (track what you have already passed) and frequency counting (tally, then read back). Applied-AI interviews test it because most array problems are secretly hash-map problems, and the candidate who grabs the dictionary first shows real fluency.
06Two Pointers and Sliding WindowFree
Two pointers and the sliding window are the array techniques that reach O(n) where a naive double loop would sit at O(n^2). Converging pointers use sorted order to find pairs; a parallel window grows and shrinks while holding a running invariant for subarray and substring problems. Applied-AI interviews reach for these because they check whether a candidate can swap nested loops for a single linear pass and explain why the work stays bounded.
07Binary Search and Search-Space ReductionFree
Binary search cuts a sorted or monotonic-predicate space in half at each step to reach O(log n), but the real interview skill is spotting a problem that is secretly monotonic and binary-searching on the answer rather than the array. The off-by-one traps in the lo/hi/mid loop are where most candidates drop points. Applied-AI interviews test it because search-space reduction turns up well beyond sorted arrays, in capacity planning, rate limits, and threshold tuning.
08Linked ListsFree
A linked list keeps elements in nodes that reference the next node, giving up O(1) random access in exchange for O(1) insertion and deletion once you hold a pointer. Interviews use them to check pointer discipline: the dummy-head trick, fast/slow pointers for cycle detection and locating the midpoint, and in-place reversal. Applied-AI interviews reach for them because the patterns carry over 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 spotting which problems conceal one. The high-leverage patterns are the monotonic stack for next-greater-element and stock-span problems, queues for breadth-first traversal, and constructing one structure from the other (two stacks for a queue, a deque for both). Applied-AI interviews test this because the recognition skill (bracket matching, span, BFS frontier) is the real exam, not the data structure itself.
10Trees, BSTs, and TraversalCore
A binary tree connects each node to at most two children, and a binary search tree adds the invariant that everything left is smaller and everything right is larger, which yields O(log n) search on a balanced tree. The traversal skills interviews check are the three depth-first orders (pre, in, post), breadth-first level order, and moving between recursion and an explicit stack. Applied-AI interviews test this because in-order traversal of a BST produces sorted output, and the recursion-to-stack conversion is the same skill behind iterative DFS everywhere.
11Heaps and Priority QueuesCore
A binary heap holds 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 for a full sort. This is the right tool for top-k, merging k sorted streams, and a running median, cases where you want the extreme few, not the whole order. Applied-AI interviews test it because retrieval, ranking, and streaming pipelines all rest on cheap partial-order operations.
12Graphs: BFS, DFS, and Shortest PathsCore
A graph is nodes and edges, and most of the work is realizing a problem is a graph to begin with. BFS finds shortest paths in unweighted graphs and explores level by level, DFS goes depth-first and reveals connectivity and cycles, and Dijkstra handles non-negative weighted shortest paths with a priority queue. Applied-AI interviews test it because dependency graphs, retrieval graphs, and reachability questions are everywhere once you learn to spot them.
13Topological Sort and DAGsCore
A topological sort arranges the nodes of a directed acyclic graph so that every edge points forward, which is exactly what dependency resolution requires. Kahn's algorithm peels off zero-indegree nodes while DFS post-order reverses the finish times, and both catch cycles for free when no valid order exists. Applied-AI interviews test it because build systems, data pipelines, and task schedulers are dependency graphs, and the course-schedule question is its usual disguise.
14Union-Find (Disjoint Set Union)Core
Union-Find (Disjoint Set Union) maintains a partition of elements into groups and answers 'are these two connected?' in near-constant amortized time via path compression and union by rank. Interviews test it because the naive alternative (re-running DFS or BFS per query) is too slow when merges repeat, and DSU is the right tool for dynamic connectivity, Kruskal's MST, and grouping problems where edges show up over time.
15Recursion and Divide-and-ConquerFree
Recursion solves a problem by calling itself on smaller inputs until a base case halts it; divide-and-conquer is the variant that breaks input into independent subproblems, solves each, and merges the results (merge sort, quickselect). Interviews test 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 across a tree of partial solutions: at each step you pick an option, explore deeper, and undo the pick before trying the next (choose, explore, unchoose). Pruning cuts branches that cannot reach a valid solution before you spend work on them. Interviews test 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 tackles problems with 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 test it because it screens for whether you can turn a fuzzy optimization into a precise recurrence rather than recalling a pattern you saw before.
18Greedy AlgorithmsCore
Greedy algorithms construct a solution by always taking the locally best choice and never reconsidering. They are fast and simple, yet correct only when a greedy choice is provably globally optimal, which you back with an exchange argument. Applied-AI interviews test greedy because the screen is whether you can separate when it works (interval scheduling, Huffman) from when it quietly returns a wrong answer, and whether you switch to DP instead.
19Interval ProblemsFree
Interval problems (merging, inserting, counting overlaps, finding minimum resources) nearly always open the same way: sort by start or end time, then sweep through once. The common move is seeing that sorting turns a messy all-pairs comparison into a single linear pass. Applied-AI interviews test this because the pattern shows up in scheduling, rate limiting, and time-series work, and the check 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 lean on tricks like XOR-cancellation to find a unique element in O(1) space. Interviews test whether you reach for a bitmask when it delivers a real constant-factor or memory win and skip it when it just muddies the logic. The skill is knowing the handful of patterns that pay off, not memorizing clever one-liners.
21Sorting AlgorithmsFree
Sorting algorithms divide into comparison sorts (merge, quick, heap) capped by an O(n log n) lower bound, and linear-time counting and radix sorts that apply only when keys are small bounded integers. The useful knowledge is the tradeoffs: quicksort's cache-friendly average speed against its worst case, merge sort's stability, heap sort's in-place guarantee, and when a heap or hash beats sorting at all. Interviews test whether 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 keeps 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 test these because they appear directly in tokenizer dictionaries, search indexes, and substring filters, and because candidates almost always grab the brute-force scan first.
23Implementing ML From Scratch (NumPy Patterns)Core
ML-from-scratch coding rounds check whether you can express a model as vectorized array operations rather than Python loops, lay out a clean forward and backward pass, and write a numerically careful softmax and cross-entropy. Interviewers look 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 means writing arithmetic so floating-point error and overflow do not corrupt the result, which matters because naive ML math (softmax, cross-entropy, variance) quietly returns NaN or wrong gradients. Applied AI interviews test 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 send two cursors through a sequence at different speeds so geometry, not extra memory, reveals structure. The tortoise and hare detect a cycle, pinpoint where it begins, and find the middle of a list in a single pass with O(1) extra space. Interviews test this because it checks whether a candidate can swap a hash set for a pointer trick and prove the meeting actually happens.
26Monotonic Stack and Monotonic QueueCore
A monotonic stack holds 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, throw out everything the new element makes useless. Interviews test these because they turn an obvious O(n^2) scan into a single pass and check 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 resolves in O(1), and pairing prefix sums with a hash map counts subarrays whose sum reaches a target or a residue mod k. The difference array is the mirror image: it makes range updates O(1) and rebuilds the final array in one pass. Interviews test these because they turn repeated range work into a single precompute and examine 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 store state inside the grid itself to keep extra space at O(1). The hard part is index bookkeeping, not algorithms. Interviews test these because off-by-one errors on boundaries are where most candidates lose points, and in-place tricks check whether you can dodge 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 priciest AI errors trace back to building the wrong thing, and the reason is nearly always discovery that got skipped. Requirements discovery is surfacing the real problem hiding behind the stated request: who the user is, what success means, what the data actually looks like, and the constraints, all before you build. The central skill is asking the right questions and reasoning backwards from the user's outcome rather than their proposed solution. AI, ML, and GenAI engineer interviews probe it because understanding the problem is the half of the job most engineers under-train.
02Scoping Under AmbiguityFree
Real AI projects begin ambiguous: fuzzy goals, unknown data, requirements that shift. Scoping under ambiguity means advancing regardless, locating the smallest version that delivers value (an MVP), ranking work by impact, stating assumptions openly, and de-risking the unknowns early instead of holding out for perfect clarity. AI, ML, and GenAI engineer interviews probe it because trimming a fuzzy problem to a shippable first slice, and acting decisively without full information, is what sets senior engineers apart.
03Translating Technical Trade-offsFree
AI, ML, and GenAI 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 rather than jargon. The skill is framing decisions as business impact and risk, and staying honest about uncertainty. These 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
A large share of AI, ML, and GenAI engineering 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', favoring analogies over jargon, staying honest about limitations, and tailoring depth to who is listening. These interviews probe it because making 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 break in front of customers: the model hallucinates, a service times out, an edge case gives way. The skill is composure and recovery, owning it honestly without panic, steering back to what works, and converting a failure into a credibility moment by showing you grasp why it happened and how production handles it. AI, ML, and GenAI engineer interviews probe it because customer-facing engineers demo probabilistic systems that will sometimes misbehave, and grace under that pressure is a distinguishing trait.