Skip to content
tezvyn:

LLMs & Generative AI

Large language models, chatbots, agents, prompt engineering

145 bites

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

Interview questions in LLMs & Generative AI

easy1 min read

Vanishing Gradients and Why ReLU Helps

Saturating activations shrink gradients across layers, ReLU's flat-one derivative preserves them.

Explain word embeddings and why they beat one-hot encoding for large vocabularies
easy2 min read

Explain word embeddings and why they beat one-hot encoding for large vocabularies

Embeddings cluster similar meanings in low-dimensional space, while one-hot vectors are orthogonal, huge, and semantically blank.

Validation loss increases while training loss decreases: what is this?
intermediate2 min read

Validation loss increases while training loss decreases: what is this?

This tests recognition of overfitting and regularization. A strong answer names it, offers early stopping, dropout or weight decay, and data augmentation or more data. A red flag is suggesting longer training or more parameters without fixing generalization.

intermediate2 min read

Explain BPTT and its computational and memory challenges for long sequences

Tests whether you see RNNs as deep unrolled graphs. Good answers define BPTT as backprop over T steps, flag O(T) memory from hidden states, and note vanishing or exploding gradients. Red flag: calling memory constant or confusing BPTT with online updates.

intermediate1 min read

Attention in Sequence-to-Sequence Models

Attention computes per-step weighted sums over all encoder states, fixing the information bottleneck for long inputs.

advanced2 min read

Explain positional encodings in Transformers and their necessity

Explain encodings inject order into embeddings; cite sinusoidal or learned vectors.

easy2 min read

Self-Attention versus Recurrent Architectures

Each token attends to all others via query-key-value, enabling parallelism and direct long-range links.

intermediate2 min read

Explain Q, K, and V matrices in self-attention

This tests the information-retrieval intuition behind self-attention. Cover that Q, K, V are linear projections of one input; Q requests, K indexes, V supplies content; scores weight a sum of V.

intermediate1 min read

Why Multi-Head Attention

Multiple heads attend to different subspaces and relations in parallel, which one big head averages away.

intermediate2 min read

What is masked in decoder self-attention and why?

Future positions are masked so token i attends only to prior tokens. This prevents cheating during parallel teacher-forced training when the full target is visible.

Why is self-attention O(n^2) and what are the implications?
advanced2 min read

Why is self-attention O(n^2) and what are the implications?

Tests the attention matrix bottleneck. Strong answers note QK^T yields an N×N matrix, creating quadratic compute and memory that blocks long documents and high-res images. Red flag: confusing model size with activation memory.

advanced2 min read

Layer Norm and Residuals in Transformer Blocks

Residuals preserve gradient flow, layer norm stabilizes activations per token, and it beats batch norm because it is independent of batch and sequence length.

easy2 min read

Causal versus Masked Language Modeling

Pre-training learns general language from unlabeled text; CLM predicts the next token left-to-right, MLM predicts masked tokens using both sides.

intermediate2 min read

How did Chinchilla change compute allocation between model size and data size?

This tests whether you know prior scaling fixed data while growing parameters, but Chinchilla showed parameters and tokens must scale equally. A good answer: double both together, so train smaller models on more data. Red flag: huge models, fixed data.

Explain data, tensor, and pipeline parallelism and hybrid training strategy
intermediate2 min read

Explain data, tensor, and pipeline parallelism and hybrid training strategy

Tests communication and memory tradeoffs of core distributed training strategies. Strong answers contrast data parallelism (shard batch), tensor parallelism (shard layers, all-reduce), and pipeline parallelism (shard stages, p2p), then propose a 3D hybrid…

What causes sudden loss spikes in long pre-training runs?
intermediate2 min read

What causes sudden loss spikes in long pre-training runs?

Name gradient explosions, LR mismatch, FP16 overflow, and poison batches; propose norm checks, rollback, and LR cuts.

intermediate2 min read

How does pre-training dataset composition influence capabilities and biases?

This probes whether you link data mix to capabilities and bias. Answer: code strengthens reasoning, web text adds noise; for science, use domain-adaptive pretraining on filtered literature, instruction tuning, and reasoning distillation, validating via…

advanced2 min read

FlashAttention and IO-Aware Attention

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

easy2 min read

How would you construct zero-shot and few-shot prompts for feedback classification?

Tests knowledge of zero-shot versus few-shot prompt structure. Zero-shot gives instructions, labels, and format without examples; few-shot prepends 2-4 labeled demonstrations before the target input. Red flag: calling an example-containing prompt zero-shot.

easy2 min read

Explain Chain-of-Thought prompting, its reasoning mechanism, and ideal use cases

This tests reasoning scaffolding. A good answer says CoT makes the model emit intermediate steps before the final answer, excelling at multi-step math and logic versus direct instructions.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles