MLCrack

    LLM & Transformer Interview Questions

    120 questions on attention mechanisms, GPT, BERT, fine-tuning, RLHF, prompt engineering. The first 20 are free, no account needed.

    Practice free β†’

    What this topic covers

    Large language models now appear in almost every ML interview, from startups building products on top of hosted models to labs training their own. This topic covers the transformer from the inside out, then the techniques used to adapt, ground and serve these models.

    The architecture questions begin with self-attention: queries, keys and values, why the dot product is scaled, what multiple heads add, and how positional information is injected. You should be able to walk through an encoder block and a decoder block, explain causal masking, and describe the differences between encoder-only, decoder-only and encoder-decoder models. Tokenization questions cover byte pair encoding and why vocabulary choices affect cost and quality.

    Pre-training and fine-tuning questions compare masked and autoregressive objectives, then move to adaptation: full fine-tuning, parameter-efficient methods such as LoRA and adapters, instruction tuning, and alignment methods including reinforcement learning from human feedback. Prompting questions ask about few-shot examples, chain-of-thought, structured output and how to defend against prompt injection.

    Retrieval-augmented generation and agents form a large part of the bank. Expect questions on chunking, embeddings, vector search, reranking, grounding and citation, and on tool use, planning and the failure modes of multi-step agents. Inference questions cover sampling parameters, context windows, KV caching, quantization and batching, since latency and cost decide whether an LLM feature can ship.

    What interviewers look for

    Because the field moves quickly, interviewers care less about naming the newest model and more about first principles. If you can explain why attention is quadratic in sequence length, you can reason about any long-context technique. If you understand what a KV cache stores, you can explain why the first token is slow and later tokens are fast.

    Evaluation is the area where candidates most often fall short. Be prepared to describe how you would measure hallucination, build a regression set for a prompt change, and combine automatic metrics with human review. For RAG systems, separate retrieval quality from generation quality and say how you would measure each.

    The sample questions below are free and include full explanations. They mix conceptual questions with applied ones about building and operating LLM features, which mirrors how these interviews are usually run.

    Sample LLM interview questions

    Practice LLMs & Transformers questions

    120 questions Β· 0 self-assessed