LLM & GenAI Fundamentals
135 questionsDONEUNLOCKEDLOCKED
Tokens, attention, context windows, sampling, prompting vs RAG vs fine-tuning, hallucinations, evals, cost and latency: the conceptual core every Applied AI loop opens with.
Grounded in real GenAI, LLM, and AI/ML engineering interview loops and written to a senior-engineer editorial bar.
You have 10 free answers unlocked here.Sign in free for 10 more · 115 are premium.
01–54Foundationsthe vocabulary every loop assumes you already have0/54 done
55–102Core loopsthe questions every loop actually asks0/48 done
103–135Field scenariosthe messy, half-specified problems from real deployments0/33 done
The concepts behind LLM & GenAI Fundamentals
The vocabulary and mental models these questions assume, from our curriculum. Start with the foundations free; the deeper, interview-defining ideas are part of premium.
Foundational
From RNNs to Transformers: RNN, LSTM, Seq2SeqRecurrent 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.Foundational
Classic NLP: Bag-of-Words, TF-IDF, and Word2VecBefore 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.Foundational
TokenizationModels 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.Foundational
The Context WindowThe 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.Foundational
EmbeddingsAn 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.Core
The Transformer ArchitectureThe 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.Sign in
Core
Attention and Self-AttentionAttention 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.Sign in
Advanced
Policy Optimization: PPO and GRPOPPO 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.🔒 Premium
