Skip to content
tezvyn:

Top 30 LLM Interview Questions and Answers

30 multiple-choice questions on LLM, drawn from 30 bites out of the 157 tagged LLM on Tezvyn. Answer them here or read straight down. Every question carries the correct option, why it is correct, and a link to the bite it came from.

30 questions. Pick an answer, or open “Show the answer” to read it.

Answers are graded in your browser. Nothing is saved, and no XP or streak is earned here. The app keeps score.

  1. Question 1 of 30

    What is the primary goal of smarter model routing in GitHub Copilot?

    Show the answer

    Answer: c · Match each prompt to the appropriate model based on task complexity and speed needs

    The card states that smarter routing balances speed against capability by having the right model handle the right task. Option D is tempting but incorrect because always using the most capable model would sacrifice the millisecond response times required in an IDE.

    Read the full bite: GitHub Copilot tunes context windows and routing

  2. Question 2 of 30

    When should you import an agent framework like CrewAI or LangGraph instead of building a plain Python workflow?

    Show the answer

    Answer: b · Only when the orchestration complexity genuinely demands dynamic planning beyond explicit control flow

    The card argues that agent frameworks should be an upgrade, not a starting point, and adopted only when orchestration complexity truly requires dynamic planning. Option C describes when to use plain Python, while D inverts the card's warning that letting the LLM own the execution graph inherits hallucinations rather than eliminating them.

    Read the full bite: Most LLM Apps Need Workflows Not Agent Frameworks

  3. Question 3 of 30

    What distinct stabilization mechanism does Layer Normalization provide in deep networks, complementing residual connections?

    Show the answer

    Answer: a · It normalizes feature activations within a layer, maintaining a stable scale for subsequent layers.

    Layer Normalization's primary role is to rescale activations within a layer to a stable distribution (mean 0, std 1), which stabilizes the inputs to the next layer. Option C describes the function of residual connections, which provide direct paths for information and gradients.

    Read the full bite: Residual Connections & Layer Norm: The Transformer's Stabilizers

  4. Question 4 of 30

    Which scenario best highlights the necessity of cross-attention in a neural network?

    Show the answer

    Answer: d · Translating a sentence where the decoder needs to align specific output words with relevant input words.

    Cross-attention is crucial in sequence-to-sequence tasks like translation, enabling the decoder to dynamically focus on relevant parts of the encoder's output. Option A describes the information bottleneck that cross-attention was designed to overcome, not its necessity.

    Read the full bite: Cross-Attention: How Models Connect Two Ideas

  5. Question 5 of 30

    What fundamental limitation necessitates the tokenization step for feeding text into a Transformer model?

    Show the answer

    Answer: b · Transformer models are mathematical functions that exclusively process numerical tensors.

    The card explicitly states that "Neural networks, including Transformers, are mathematical functions that operate on numbers, not raw text strings." Thus, text must be converted into a numerical tensor format. While tokenization helps manage vocabulary and prepares for embeddings, the core reason is the model's numerical input requirement.

    Read the full bite: Transformer Preprocessing: From Text to Tensors

  6. Question 6 of 30

    Before the softmax function is applied, what does the Transformer's final linear layer directly output?

    Show the answer

    Answer: c · Raw, un-normalized scores (logits) for each word in the vocabulary.

    The linear layer's specific function is to convert the decoder's abstract vector into raw, un-normalized scores (logits) for every word. The softmax function then takes these logits and transforms them into a probability distribution, not the linear layer itself.

    Read the full bite: Transformer: The Final Linear and Softmax Layers

  7. Question 7 of 30

    For what primary purpose is Common Crawl most effectively utilized?

    Show the answer

    Answer: b · Offering a massive, raw corpus of web content for large-scale research and model training.

    The card states Common Crawl is "the raw material for training many LLMs and for academic research on web-scale data" and is ideal for projects that "can handle the scale and messiness of raw web data." It explicitly notes it is "not a search engine" and is "famously noisy," requiring extensive cleaning, making options A, B, and D incorrect.

    Read the full bite: Common Crawl: A Free Snapshot of the Entire Web

  8. Question 8 of 30

    When is a learning rate schedule particularly crucial for achieving state-of-the-art results?

    Show the answer

    Answer: d · When fine-tuning large, complex models such as transformers.

    C is correct because the card states schedules are "standard practice for training and fine-tuning large models, especially transformers... essential for achieving state-of-the-art results." B is a tempting distractor, but the card explicitly warns against using external schedules with optimizers like AdaFactor due to potential conflicts.

    Read the full bite: Learning Rate Scheduling: A Gearbox for Model Training

  9. Question 9 of 30

    According to the card, what is the most accurate mental model for understanding how a Large Language Model (LLM) processes information?

    Show the answer

    Answer: b · A sophisticated pattern-matching engine that predicts word sequences based on learned statistical relationships.

    The card describes an LLM as a "sophisticated pattern-matching engine for words and ideas" that learns "statistical relationships between words" to predict text. Option C is incorrect because the card explicitly states an LLM is "not a database of facts".

    Read the full bite: What is a Large Language Model (LLM)?

  10. Question 10 of 30

    For a multi-step reasoning task, which factor most increases chain-of-thought prompting's cost and latency relative to zero-shot?

    Show the answer

    Answer: d · The many additional output tokens generated for the reasoning steps

    Chain-of-thought generates extra output tokens for intermediate reasoning, and sequential decoding makes output length the dominant cost and latency driver. It needs no fine-tuning or external tool calls per step.

    Read the full bite: Zero-Shot, Few-Shot, and Chain-of-Thought Trade-offs

  11. Question 11 of 30

    What is the primary advantage of employing pipeline parallelism in deep learning model training?

    Show the answer

    Answer: d · It enables the training of models whose total parameter count exceeds the memory capacity of a single GPU.

    B is correct as the card states pipeline parallelism is for models 'too large to fit into the memory of a single accelerator.' A is incorrect because, despite using parallelism, the card notes that communication overhead and pipeline bubbles can make it slower for models that fit on a single GPU, so its primary benefit isn't universal speedup.

    Read the full bite: Pipeline Parallelism: An Assembly Line for Your Model

  12. Question 12 of 30

    Which scenario most clearly demonstrates the value of prompt engineering?

    Show the answer

    Answer: b · Generating a consistent series of structured product descriptions for an e-commerce platform.

    Prompt engineering is essential for tasks requiring reliable, repeatable, and specific outputs, such as generating consistent content for an application. Casual brainstorming or one-off requests do not typically require the detailed guidance that prompt engineering provides.

    Read the full bite: Prompt Engineering: Guiding LLMs to Better Answers

  13. Question 13 of 30

    When is zero-shot prompting the most appropriate technique to use?

    Show the answer

    Answer: d · When performing a simple sentiment analysis on a product review.

    Zero-shot prompting is ideal for simple, common tasks like sentiment analysis that leverage the model's pre-existing knowledge without needing examples. Tasks requiring new, specific formatting rules (option A) are generally too novel for zero-shot and would likely require examples.

    Read the full bite: Zero-Shot Prompting: Ask, Don't Show

  14. Question 14 of 30

    Which statement accurately describes how in-context learning influences a large language model's behavior?

    Show the answer

    Answer: d · It temporarily guides the model's output for a specific query by providing examples within the current prompt.

    In-context learning temporarily guides the model's behavior for a specific task by providing examples within the prompt, without making any permanent changes to its underlying weights. It does not involve permanent modification of parameters or deep, lasting knowledge acquisition, which would require fine-tuning or retraining.

    Read the full bite: In-Context Learning: Teaching a GPT Without Retraining

  15. Question 15 of 30

    For which type of task is Chain-of-Thought (CoT) prompting most beneficial?

    Show the answer

    Answer: b · Solving complex problems that require multiple logical steps

    CoT prompting is designed to improve LLM performance on tasks requiring complex, multi-step reasoning, such as arithmetic word problems or logical puzzles. It is explicitly stated that CoT should be avoided for simple factual recall questions as it adds unnecessary latency and cost without improving accuracy.

    Read the full bite: Chain-of-Thought Prompting: Making LLMs 'Show Their Work'

  16. Question 16 of 30

    For complex reasoning tasks, what is the main benefit of using self-consistency over standard greedy decoding in LLMs?

    Show the answer

    Answer: d · It enables the model to overcome early reasoning errors by exploring multiple solution paths and selecting the most consistent outcome.

    Self-consistency's primary benefit is to prevent the model from getting 'locked into a flawed reasoning path early on' by generating and evaluating a diverse set of reasoning paths, then selecting the most frequent answer. Option C is incorrect because self-consistency samples a 'diverse set' of paths, not an exhaustive search, and does not guarantee the 'absolute optimal solution' but rather a more robust one.

    Read the full bite: Self-Consistency: Majority Rules for LLM Reasoning

  17. Question 17 of 30

    A RAG system contradicts retrieved evidence. Debugging reveals the correct document was retrieved but ranked below irrelevant chunks. What is the most targeted immediate fix?

    Show the answer

    Answer: c · Add a cross-encoder reranker to boost the relevant document and increase prompt emphasis on the top-ranked excerpt

    The correct fix targets the diagnosed ranking failure by reordering chunks and reinforcing prompt priority, which directly resolves the contradiction. Blaming hallucination ignores the explicit retrieval trace evidence, which is the biggest debugging red flag, and merely adding a trust-context instruction does not fix the ranking inversion.

    Read the full bite: Why does your RAG ignore or contradict retrieved context?

  18. Question 18 of 30

    For which type of problem is Tree of Thoughts (ToT) most beneficial compared to a single-path reasoning approach?

    Show the answer

    Answer: a · Problems where initial decisions are critical and backtracking from errors is necessary.

    The card states ToT excels "where initial decisions are pivotal and the ability to backtrack from a dead end is necessary." This directly matches option A. Option C is incorrect because the card explicitly mentions ToT's "massive overhead in computation, cost, and latency."

    Read the full bite: Tree of Thoughts: LLM Reasoning Beyond a Single Path

  19. Question 19 of 30

    Which scenario best illustrates the primary advantage of using the ReAct framework for an LLM?

    Show the answer

    Answer: c · Answering a question that requires current, real-world data.

    The ReAct framework is designed for tasks requiring information outside the model's training data or interaction with the world, making it ideal for answering questions with current, real-world data. Tasks like creative writing, summarization, or purely internal logical puzzles do not leverage ReAct's core benefit of external interaction and would incur unnecessary overhead.

    Read the full bite: ReAct: Teaching LLMs to Think, Act, and Observe

  20. Question 20 of 30

    What is the primary objective of Supervised Fine-Tuning (SFT) for a pre-trained base Large Language Model (LLM)?

    Show the answer

    Answer: c · To adapt the model to follow instructions and engage in helpful, conversational interactions.

    The card explains that SFT exists to transform a knowledgeable but unhelpful base model into a 'helpful, instruction-following assistant' by teaching it conversational skills. It explicitly states that SFT is not for teaching new domain-specific knowledge.

    Read the full bite: Supervised Fine-Tuning (SFT): Teaching a Model to Chat

  21. Question 21 of 30

    What is the fundamental reason catastrophic forgetting occurs in neural networks?

    Show the answer

    Answer: a · The model's internal parameters, optimized for new tasks, overwrite the configurations essential for previous knowledge.

    The card explains that catastrophic forgetting happens because neural networks adjust shared internal parameters (weights) to optimize for new tasks, which inadvertently overwrites the configurations vital for previously learned information. It is not due to a fixed memory capacity, but rather the process of parameter adjustment.

    Read the full bite: Catastrophic Forgetting: The AI's Amnesia Problem

  22. Question 22 of 30

    In a production RAG pipeline, which optimization best demonstrates systems-level thinking about retrieval latency?

    Show the answer

    Answer: d · Tune HNSW index parameters and implement hybrid dense-plus-sparse retrieval with BM25 pruning

    Tuning HNSW and adding BM25 hybrid pruning directly addresses vector search as a tunable distributed component rather than a black box. Option A is tempting because scaling GPUs is a common reflex, but it ignores that retrieval and embedding can consume 30 to 50 percent of total latency while failing to address index configuration or chunking strategy.

    Read the full bite: Identify RAG latency bottlenecks and propose optimizations

  23. Question 23 of 30

    A developer needs to adapt a large foundation model for a specific task using limited computational resources. Which method is most appropriate?

    Show the answer

    Answer: a · Parameter-Efficient Fine-Tuning (PEFT)

    PEFT is specifically designed to adapt large models for specific tasks on a budget by freezing most of the original model and only training a small number of new parameters. Full fine-tuning (B) is too resource-intensive for limited hardware, and training a new model from scratch (D) is even more demanding and inefficient for adapting an existing foundation model.

    Read the full bite: PEFT: Fine-Tune Large Models on a Budget

  24. Question 24 of 30

    Why is a hybrid query reformulation pipeline—using both rules and an LLM—preferred over an LLM-only rewriter in a multi-turn RAG system?

    Show the answer

    Answer: b · Rules handle high-volume simple references with low latency, while the LLM fallback handles complex coreference without rewriting every query

    The card describes LLM rewriting as effective for coreference resolution but advocates a hybrid to route common cases to fast rule-based matching and reserve LLM calls for complex references, managing latency and cost. Option C is tempting but wrong because the card explicitly credits LLMs with resolving pronouns; the hybrid exists for efficiency, not because LLMs lack capability.

    Read the full bite: How would you architect a multi-turn conversational RAG system?

  25. Question 25 of 30

    Which statement accurately describes a key outcome of instruction fine-tuning for a base LLM?

    Show the answer

    Answer: d · It teaches the model to generate responses that align with user intent and specific task formats.

    Instruction fine-tuning is designed to align the model's behavior with user intent, teaching it to follow directions and produce compliant, helpful responses in specific formats. The card explicitly states that it does not inject new factual knowledge; rather, it teaches conversational style and format.

    Read the full bite: Instruction Fine-Tuning: Teaching LLMs to Follow Orders

  26. Question 26 of 30

    For which task would a Reward Model likely be considered an inefficient or unnecessary approach?

    Show the answer

    Answer: d · Fine-tuning a code generation model to produce executable and bug-free code.

    The card explicitly states that reward modeling should be avoided when a clear, objective, and cheaper metric exists, citing code executability as an example. The other options involve subjective qualities like helpfulness, creativity, or ethics, for which reward models are specifically designed.

    Read the full bite: Reward Modeling: Teaching an LLM What 'Good' Means

  27. Question 27 of 30

    For which application scenario are adapter modules most beneficial for fine-tuning a large language model?

    Show the answer

    Answer: a · Adapting a single base model to numerous distinct downstream tasks with limited storage and compute.

    Adapter modules are designed for efficiently adapting a single base model to multiple tasks, saving resources by only storing small, task-specific weights. While tempting, aiming for absolute maximum performance on a single, critical task might still favor full fine-tuning if resources are unlimited, as adapters might not match its performance in such cases.

    Read the full bite: Adapter Modules: Efficient LLM Fine-Tuning

  28. Question 28 of 30

    Which approach allows QLoRA to finetune massive LLMs efficiently on a single GPU?

    Show the answer

    Answer: b · It freezes the 4-bit quantized base model and trains only small, inserted adapter layers.

    QLoRA's efficiency comes from freezing the large, 4-bit quantized base model and only training the much smaller LoRA adapter layers. Option A is a tempting distractor because it mentions 4-bit quantization, but incorrectly states that all quantized weights are updated.

    Read the full bite: QLoRA: Finetune Huge LLMs on a Single GPU

  29. Question 29 of 30

    What is the primary advantage of using an embedding model for document retrieval in a RAG system?

    Show the answer

    Answer: b · It efficiently identifies documents that are semantically similar to the user's query.

    The card explains that embedding models convert text into vectors where similar meanings are close, allowing the system to find documents that are semantically similar to a query. Option D describes keyword matching, which the card states embedding models are not ideal for. Options C and D describe functions of the LLM or data storage, not the embedding model's primary role.

    Read the full bite: Embedding Models: The 'Retrieval' in RAG

  30. Question 30 of 30

    Which statement best describes how Dense Passage Retrieval (DPR) primarily achieves semantic search for question answering?

    Show the answer

    Answer: b · It transforms questions and document passages into numerical vectors and identifies relevant passages by vector similarity.

    DPR's core mechanism is to convert both questions and document passages into dense numerical vectors using separate encoder models. It then finds semantically relevant passages by identifying the closest vectors in a shared 'meaning space'. Option C is incorrect because DPR is a retrieval system, not a generative one, and it uses two distinct encoders for queries and documents.

    Read the full bite: Dense Passage Retrieval (DPR): Semantic Search for QA

Could you explain these out loud?

That is what an interview actually tests. Tezvyn gives you questions like these with what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon