Home / Role Guides / LLM Engineer

LLM Engineer Interview Questions (2026)

Questions modeled on recurring requirements in 53 LLM-titled postings at 20 companies, collected in August 2026. Of those 20 companies, 14 name inference, 13 name PyTorch, 12 name latency, and 7 name fine-tuning. These are keyword counts, not verified requirements. See how the postings were collected.

An LLM engineer works one layer below the application. You make a large language model fast, cheap, and correct for a product: you tune inference, adapt the model, and control its output. Job boards list the work under several titles: LLM Engineer, LLM Inference Engineer, LLM Infrastructure Engineer, and Machine Learning Engineer for LLM fine-tuning. The interview tests how the model produces tokens, how you serve the model under load, how you adapt the model to a task, and how you measure each change.

Want scored practice for LLM Engineer?

Vote for this practice track →

Preparing for an adjacent role?

  • AI Engineer questions. Use this guide if the role builds RAG, agents, and product features on top of model APIs.
  • ML Engineer questions. Use this guide for training fundamentals, features, ranking, and classic model rounds.
  • MLOps Engineer questions. Use this guide for model registries, deployment patterns, monitoring, and GPU operations.

1.What does an LLM engineer do, and how is the role different from an AI engineer or an ML engineer?

What a strong answer covers: Give the split by layer. An AI engineer builds the product on top of a model: retrieval, tools, prompts, and evals. An LLM engineer works on the model and its runtime: serving, latency, memory, fine-tuning, and output control. An ML engineer trains and ships models of many types, and most of those models are not language models. Say that companies use the three titles in different ways. Then read the posting for the words inference, serving, fine-tuning, and GPU, and state which layer this team owns. Match your examples to that layer.

2.What is a token, and why does tokenization matter for cost, latency, and context limits?

What a strong answer covers: A token is a piece of text that the model reads and writes as one unit. A tokenizer splits text into sub-word pieces, so one word can be one token or several. Price, context limits, and output speed all count tokens, not words or characters. Code, rare words, and many non-English languages use more tokens for the same meaning. Each model family has its own tokenizer, so count tokens with the tokenizer of the model you use. Give one practical effect: a prompt that fits one model can exceed the limit of a second model.

3.Explain temperature and top-p. The same prompt gives two different answers at temperature 0. Why?

What a strong answer covers: The model gives a score to each possible next token. Temperature scales those scores before the model samples: a low value favors the top token, and a high value spreads the choice. Top-p keeps the smallest set of tokens whose total probability reaches p, then samples from that set. Temperature 0 selects the top token at each step, but the result can still change. Requests run in different batches and on different hardware, so small numeric differences can change a close choice. A hosted provider can also update the model. For a repeatable test, pin the model version, store the outputs, and score a set of runs.

4.A user uploads a document that fills most of the context window. Answers about the middle of the document are wrong. What do you do?

What a strong answer covers: First prove the cause with a test: put the same fact at the start, the middle, and the end, and compare the answers. Models often use text at the start and the end of a long prompt better than text in the middle. Then reduce what the model must read. Retrieve the passages that relate to the question, or summarize sections in a first pass. Put the question and the instructions after the document, near the end of the prompt. Ask the model to quote the passage before the answer. Measure each change on a fixed set of questions with known answers.

5.A downstream service needs valid JSON from the model on every call. How do you get that result?

What a strong answer covers: Use three layers. Layer one is the prompt: give the schema and one example. Layer two is constrained decoding, if the model or the server supports structured output. At each step, the decoder blocks tokens that break the schema, so the output always parses. Layer three is validation in your code: parse the output, check the types and the allowed values, and retry or fail with a clear error. Name the failures that remain. An output token limit can cut the JSON before the end. A valid structure can still hold a wrong value, so the eval must check content, not only format.

6.How does function calling work between your code and the model? Where does it fail?

What a strong answer covers: Your code sends the tool names, descriptions, and argument schemas with the request. The model does not run a tool. The model writes a structured request that names a tool and gives the arguments. Your code validates the arguments, runs the tool, and sends the result back as a new message. The model then writes the answer or requests a second tool. Failures have four common forms: the model selects the wrong tool, invents an argument, repeats the same call, or ignores the tool result. Fix these with clear tool descriptions, strict argument validation, a limit on the number of steps, and an eval set of tool-use cases.

6 questions read. Want these scored?

Vote for this practice track →One click, no account needed. Sign up free →

7.Users say the assistant is slow. How do you find the cause and reduce the latency?

What a strong answer covers: Split latency into two numbers: the time to the first token, and the output speed in tokens per second. The time to the first token includes the queue, the network, and the time to process the prompt. Total time grows with the output length. Measure both numbers at the median and at the slow end. Then select the lever that matches the cause. A long prompt needs a shorter context or a cached prefix. A long output needs a tighter format or an output limit. A queue needs more capacity. Streaming does not reduce total time, but the user sees text sooner. A smaller model for easy requests reduces both numbers.

8.What is the KV cache, and what does continuous batching do in an inference server?

What a strong answer covers: During generation, each new token attends to all earlier tokens. The KV cache stores the attention keys and values of the earlier tokens, so the server does not compute them again for each new token. The cost is memory: the cache grows with the sequence length and with the number of requests in the batch. Continuous batching adds a new request to the running batch at a decode step, as soon as a slot is free. A static batch makes each request wait until the full batch ends. Explain the trade: a larger batch raises the tokens per second of the GPU, and can raise the latency of each request.

9.What does quantization do to a model, and how do you decide if a quantized model is good enough?

What a strong answer covers: Quantization stores the model weights with fewer bits, for example 8-bit or 4-bit integers in place of 16-bit floats. The model uses less memory, so the model fits on a smaller GPU, or one GPU holds a larger batch. The cost is accuracy, and the loss grows as the bit count goes down. Do not rely on a public benchmark for the decision. Run your own eval set on the full model and on the quantized model, and compare the results by task type. Check the hard cases: long outputs, structured output, and rare languages. Measure the speed on your hardware too, because the gain depends on the runtime.

10.How does LoRA work, and when would you select full fine-tuning in its place?

What a strong answer covers: LoRA freezes the base model weights. Training adds a pair of small low-rank matrices to selected layers and updates only those matrices. The result is a small adapter file. You can merge the adapter into the base weights, or load a different adapter for each task on one base model. LoRA needs less GPU memory and less time than full fine-tuning. Select full fine-tuning when the task is far from the base model's behavior and you have enough data and compute. With either method, hold out a test set, compare with the base model, and test tasks outside the training data for lost ability.

11.A large hosted model does a narrow task well, but the cost is too high. Plan the move to a smaller model.

What a strong answer covers: Start with the eval set, not with training. Collect real inputs and the outputs of the large model, and get a person to correct a sample. Test a small model with a good prompt first, because that step can be enough. If a gap remains, fine-tune the small model on the corrected outputs of the large model. Score both models on the same held-out set, by case type. Send a small part of the traffic to the small model and compare the results. Keep a route to the large model for inputs that the small model handles badly. Include the cost of hosting and operations in the comparison.

12.A new model is at the top of a public leaderboard. How do you decide to adopt the model for your product?

What a strong answer covers: Treat the leaderboard as a reason to test, not as a result. A public benchmark measures general tasks, and the test questions can be in the training data of a model. Run your own eval set, built from real product inputs, on the current model and on the new model. Adapt the prompts for the new model before you score, because a prompt written for one model can hurt a second model. Compare quality by case type, then latency, price, rate limits, and context size. Check the output format and the refusal behavior. Release the new model to a small share of traffic and keep the old model ready.

13.Tell me about a change to a model, a prompt, or a serving setup that made quality worse in production. How did you find the problem?

What a strong answer covers: Pick a real case where you owned the change. Give the situation in two sentences. Then give the signal that showed the problem: an eval score, a user report, or a metric such as retries or refusals. State the cause in specific terms: a new model version, a quantized build, a changed sampling setting, or a cut context. Describe the rollback and how long the rollback took. End with the change you made to your method, such as a regression set that runs before each release. The interviewer checks that you measure model changes and that you can undo them fast.