Gen AI interview questions sit between theory and practice: how models generate text and images, how they are trained and evaluated, and where they fail. This hub covers the questions that come up for generative AI roles at every level, with what each one is testing, an answer frame and a short spoken answer.
Discriminative: learns a boundary or a mapping from input to label; answers 'which class' or 'what value'.
Generative: learns the distribution of the data itself and can sample new examples: text, images, audio, code.
Modern examples: large language models, diffusion image models, speech synthesis.
"A discriminative model learns to map an input to an output, like an email to spam or not spam. A generative model learns the distribution of the data well enough to produce new samples from it, such as a paragraph, an image or a voice. Language models and diffusion models are the two families most people mean by generative AI today."
Calling any neural network generative, or being unable to give a discriminative counter-example.
Autoregressive: predict a distribution over the next token given everything so far, sample one, append, repeat.
Implications: output is produced left to right, cost scales with length, and early mistakes propagate.
Stopping: a stop token or a length cap ends the loop.
"It predicts one token at a time. Given the prompt, the model outputs probabilities for the next token, one is picked according to the decoding settings, it is added to the sequence, and the process repeats until a stop token or a length limit. That is why generation is sequential, why long outputs cost more, and why an early wrong turn can steer the rest of the answer."
Describing it as retrieving stored sentences.
Pre-training: next-token prediction on a huge corpus; produces a base model with broad knowledge and no manners.
Supervised fine-tuning: train on curated instruction and response pairs so the model follows tasks.
Preference tuning: humans or a reward model rank outputs; the model is optimised toward preferred behaviour, via RLHF or direct preference methods.
"Pre-training is the expensive part: predict the next token across an enormous corpus, which gives the model language and knowledge but no sense of how to behave. Supervised fine-tuning shows it examples of good responses to instructions. Preference tuning then compares candidate answers, learns what people prefer, and pushes the model toward that, which is what makes it helpful and safer to use."
Skipping the preference stage, or claiming RLHF adds knowledge.
Forward: training adds noise to real images step by step until they are pure noise.
Learn: the network learns to predict and remove the noise at each step, often in a compressed latent space.
Generate: start from random noise and denoise repeatedly, guided by a text embedding, to produce an image.
"During training the model sees images with increasing amounts of noise added and learns to predict that noise. To generate, it starts from pure noise and removes a little noise at a time over many steps, and a text encoder steers each step toward the prompt. Most practical systems do this in a compressed latent space rather than on raw pixels, which is what makes it fast enough to use."
Confusing diffusion with GANs, or having no idea what the text prompt is doing.
GANs: generator versus discriminator; fast sampling, sharp images, unstable training and mode collapse.
Diffusion: iterative denoising; stable training, high diversity and quality, slower sampling that newer samplers reduce.
Autoregressive: one token or patch at a time; dominant for text, also used for images and audio; sequential and easy to condition.
"GANs pit a generator against a discriminator; they sample in one pass and produce sharp results but are hard to train and can collapse onto a few modes. Diffusion models train stably by learning to denoise and give strong diversity and quality, at the cost of many sampling steps, which distillation and better samplers have cut down. Autoregressive models generate a token at a time and dominate text; they are easy to condition and to scale but sequential by nature."
Saying GANs are obsolete without knowing why diffusion replaced them, or not knowing what mode collapse is.
Autoencoder: encoder compresses input to a small vector, decoder reconstructs it.
Variational: the encoder outputs a distribution, and a regulariser keeps the latent space smooth, so sampling from it yields sensible outputs.
Use today: the latent space is where latent diffusion models do their denoising.
"An autoencoder learns to squeeze an input into a small vector and rebuild it. A variational autoencoder makes that latent space well behaved by encoding to a distribution and regularising it toward a simple prior, so nearby points decode to similar, valid outputs and you can sample new ones. That property is why modern image models run diffusion inside a VAE's latent space instead of on pixels."
Not knowing why the latent space needs to be smooth for generation.
Text: hallucination, sycophancy, prompt sensitivity, repetition, losing the middle of long context.
Images: hands and text rendering, prompt parts ignored, mode collapse in GANs.
Both: memorisation of training data, bias, and confident output with no uncertainty signal.
"Language models make things up fluently, agree too readily with the user, change answers with small prompt changes, and lose track of content in the middle of a long context. Image models still struggle with hands, readable text and prompts with several distinct parts. Across both, models can regurgitate training data, reproduce biases and give no signal about how sure they are, which is why evaluation and grounding matter."
Naming only hallucination.
Text: perplexity for language modelling; overlap scores like BLEU and ROUGE only for tasks with references; model-as-judge with rubrics and human evaluation for open tasks.
Images: distribution distances such as FID for sets; prompt alignment scores; human preference for what ships.
Practice: task-specific evals on your own data beat any single benchmark number.
"For text, perplexity tells you about the model, not about task quality. Overlap metrics like BLEU and ROUGE only work when there is a reference answer, which most real tasks lack. So in practice I build a task-specific eval set, use a model as a judge with a written rubric, and calibrate it against human ratings. For images, FID compares distributions and alignment scores check the prompt was followed, but a human preference study is still what decides a release."
Quoting a benchmark score as proof the model fits your task.
Mechanism: sub-word tokenization such as byte-pair encoding splits text into frequent pieces; a token is not a word.
Consequences: cost and context are counted in tokens; rare words and non-Latin scripts take more tokens; character-level tasks like counting letters are hard.
Practice: measure token counts for your real data, especially in other languages.
"Tokenization breaks text into sub-word pieces learned from frequency, so common words are one token and rare ones several. It matters because everything, cost, context and speed, is counted in tokens, and some languages and scripts use far more tokens for the same meaning. It also explains odd behaviour like trouble spelling or counting letters, because the model never sees characters directly."
Saying a token is a word.
Problem: self-attention treats the input as a set; without position, 'dog bites man' equals 'man bites dog'.
Solutions: fixed sinusoidal or learned position embeddings added to tokens; rotary embeddings that encode relative position inside attention.
Why it matters: the choice affects how well the model handles sequences longer than it was trained on.
"Attention computes weighted sums over all tokens, and a sum does not care about order, so the model has to be told where each token sits. Early transformers added a fixed or learned position vector to each token embedding. Most current models use rotary position embeddings, which encode relative distance inside the attention computation and extend more gracefully to longer contexts."
Not knowing that attention is permutation-invariant.
Problem: each new token would otherwise recompute attention keys and values for every previous token.
Cache: store the keys and values per layer as they are computed; a new token only computes its own and attends to the cache.
Cost: memory grows with context length and batch size; it is the main limit on concurrent users and the reason prompt caching exists.
"When generating, each new token attends over all previous tokens, and their keys and values do not change, so recomputing them every step would be wasted work. The KV cache stores them per layer, so each step only computes the new token's keys and values. The price is memory, which grows with context length and the number of parallel requests, and that memory is what really limits throughput on a GPU."
Confusing the KV cache with caching whole responses.
Mechanism: retrieve relevant passages from your own data at query time and place them in the prompt; the model answers from them.
Why default: no training, updates instantly, supports citations and access control, cheaper than fine-tuning.
Limits: quality depends on retrieval; long or multi-hop questions need reranking and query rewriting.
"RAG means searching your own documents for the passages that match the question and putting them into the prompt, so the model answers from evidence instead of memory. It is the default because it needs no training, reflects new data immediately, lets you cite sources and enforce permissions, and it is much cheaper than fine-tuning. Its weakness is that the answer is only as good as the retrieval."
Presenting fine-tuning as the way to add private facts.
Encoder: a vision encoder turns the image into a sequence of patch embeddings.
Projection: a small adapter maps those into the language model's token space, so the image becomes a set of 'visual tokens'.
Joint attention: the language model attends over image tokens and text tokens together; training aligns them with image-text pairs.
"A vision encoder splits the image into patches and produces an embedding for each. A projection layer maps those embeddings into the same space as text tokens, so from the language model's point of view the image is just a run of extra tokens. The model then attends across image and text jointly, and it learned that alignment from large sets of image and caption pairs."
Saying the model runs OCR and reads the text out.
Zero-shot: instruction only; works for common tasks.
Few-shot: include worked examples; best for format and edge cases.
Chain-of-thought: ask for reasoning before the answer; helps multi-step problems, costs tokens, and is built in to reasoning-tuned models.
"Zero-shot is just the instruction, few-shot adds a handful of examples so the model copies the pattern and format, and chain-of-thought asks it to work through the steps before answering, which helps on arithmetic and multi-step logic. Examples are the most reliable lever for format; reasoning is the lever for correctness on hard problems, and newer models do it natively."
Not knowing that examples shape format more than instructions do.
Data first: a few hundred to a few thousand clean, diverse examples beat a large noisy set; deduplicate and hold out a test split.
Method: parameter-efficient tuning such as LoRA on an instruction-tuned base; low learning rate, few epochs.
Augment carefully: synthetic examples generated and then reviewed; validate on real held-out data only.
"I would spend most of the effort on the data: a smaller set of clean, varied examples with a real held-out test split. Then I would use a parameter-efficient method like LoRA on an already instruction-tuned model, with a low learning rate and few epochs to avoid overfitting. If I need more data I generate candidates with a strong model and have people review them, but I never let synthetic data into the test set."
Training on everything with no held-out set, or full fine-tuning on a few hundred examples.
Model collapse: successive generations lose the tails of the distribution and drift toward bland averages.
Error amplification: mistakes in the generated data become facts to the next model.
Mitigation: keep real data in the mix, filter and verify synthetic samples, and track provenance.
"If a model is trained mostly on outputs of earlier models, rare and unusual examples fade and the model converges toward the average, which people call model collapse. Any errors in the generated data get baked in as truth. Synthetic data is still useful, but it needs verification, a strong share of real data, and records of where each example came from."
Treating synthetic data as free unlimited training data.
Copyright: know the model's licence and data terms, avoid reproducing long verbatim passages, keep provenance of your own training data.
Bias: test outputs across groups and scenarios with a bias eval set; fix with data, prompts and filters.
Safety: input and output classifiers, refusal behaviour, red-team tests and an incident path.
"Three concrete things. I check the licence and terms of any model and dataset, and I add checks against long verbatim reproduction. I keep a bias evaluation set that probes outputs across demographics and scenarios and I run it on every change. And I put safety classifiers on input and output, keep red-team prompts in the test suite, and have a process for handling incidents, because some will get through."
Saying it is the legal team's problem.
Good fit: output is language or media, some variation is acceptable, a human or a check reviews it, and errors are cheap to correct.
Poor fit: exact answers, hard guarantees, high error cost with no review, or a rules engine would do.
Test: can you define what a good output is well enough to evaluate it? If not, stop.
"I ask whether the output is naturally text or media, whether some variation is fine, and whether mistakes are cheap and reviewable. Drafting, summarising and classifying messy input are good fits. Computing a tax figure or making an irreversible decision alone is not. My practical test is whether I can write down what a good output looks like clearly enough to evaluate it; if I cannot, the project is not ready."
Saying everything benefits from an LLM.
Greedy: always take the most likely token; fast, can be repetitive and short-sighted.
Beam search: keep several best partial sequences; good for translation, tends to produce bland text and is rarely used for chat.
Sampling: draw from the distribution, shaped by temperature and top-p; the usual choice for open-ended generation.
"Greedy decoding picks the single most probable token each step, which is fast but often repetitive. Beam search keeps a few candidate sequences and picks the best overall; it suits tasks with one right answer like translation, but for open conversation it produces dull text. Sampling draws tokens from the distribution with temperature and top-p controlling the spread, and that is what chat models use by default."
Recommending beam search for creative writing, or not knowing why greedy repeats.
Gen AI interviews swing from 'explain attention' to 'how would you measure this' to 'is this use case even a good idea'. The follow-ups are where people stumble, and the frame has to be there before the silence gets long.
ClapAssist is your silent co-pilot. Runs natively on macOS and Windows, listens to the interviewer's exact question, and surfaces concise talking points right next to your camera eye-line. Excluded at the OS level from Zoom, Google Meet, and Teams screen sharing.