yoklainterview sim

AI Engineer Llm Fundamentals Interview Questions

75 verified AI Engineer Llm Fundamentals interview questions — solve with answers, learn from explanations, test yourself in a real simulation.

Try the real simulation →

Sample questions

Llm FundamentalsDifficulty 1
In large language models, what is a 'token'?
  • aA parameter stored inside the model's neural network weights, adjusted during training
  • bA single English word, where each individual word always maps to exactly one token
  • cA unit of text, such as a word, subword piece, or character sequence, processed as one item
  • dA unique identifier the API assigns to each user session for tracking purposes
Explanation:A token is the basic unit a tokenizer splits text into, which can be a whole word, part of a word, punctuation, or even a single character depending on the vocabulary. Tokens are not guaranteed to align with whole words, and they have nothing to do with session identifiers or model weight parameters.
Llm FundamentalsDifficulty 2
A developer notices that the same sentence produces a different number of tokens depending on whether it's written in English or in a language with many compound or agglutinative words. What best explains this?
  • aAll tokenizers guarantee exactly one token per word, regardless of the language or its vocabulary
  • bTokenizers split text using patterns learned from their vocabulary, so token counts can vary by language
  • cToken count depends only on the total number of characters, never on the tokenizer's vocabulary design
  • dThis kind of behavior is always a bug that should be reported to the model provider immediately
Explanation:A tokenizer's vocabulary is built from statistics over its training data, so languages with more compounding or unfamiliar subwords often get split into more, smaller tokens than a comparable English sentence. This is expected tokenizer behavior, not a bug or a purely character-count function.
Llm FundamentalsDifficulty 1
What is a model's 'context window'?
  • aThe number of conversation turns a single user account is allowed to have per day
  • bThe number of parallel requests the API infrastructure can serve at the same time
  • cThe amount of GPU memory that was allocated for the model's original training run overall
  • dThe maximum number of tokens the model can attend to in one request, input plus output
Explanation:The context window is a hard limit on how many tokens (prompt plus generated output) the model can process together in one call; beyond it, older or excess content must be dropped. It is unrelated to request concurrency, training-time GPU memory, or daily usage quotas.
Llm FundamentalsDifficulty 2
An application sends a long document plus a question to a model, and the combined token count exceeds the model's context window. What is the most likely outcome?
  • aThe model automatically writes a background summary of the input before answering
  • bThe model processes everything normally without any issue, simply taking somewhat longer to respond
  • cThe API silently raises the context window limit just for that one request
  • dThe request fails, or the input gets truncated and meaningful content may be dropped
Explanation:Exceeding the context window typically causes an error response or forces truncation of the input, which can silently cut off important parts of the document or the question. The context window is a fixed constraint per request; it isn't automatically summarized or expanded on the fly.
Llm FundamentalsDifficulty 2
A developer assumes that because a model has a large context window, it will 'remember' details from a completely separate conversation started in a brand-new session. Why is this assumption usually wrong?
  • aContext windows are shared globally across every user and every account using the same model
  • bLarge context windows are disabled by default and must be manually enabled for each new session
  • cThe context window only covers tokens included in the current request and doesn't persist across separate sessions
  • dThe model automatically queries an internal database of prior sessions before responding to a request
Explanation:A large context window only means more tokens can fit into one request — it does not give the model any built-in memory of past sessions. Any continuity across sessions has to come from the application explicitly resending prior history or retrieved context, not from the model itself.
Llm FundamentalsDifficulty 1
A team wants a model to produce the exact same output for the exact same input as consistently as possible, prioritizing repeatability over varied phrasing. Which decoding approach best fits this goal?
  • aGreedy decoding, always picking the single highest-probability next token
  • bHigh-temperature sampling, to explore a wide range of possible tokens
  • cIncreasing top-p toward its maximum value to widen the candidate pool
  • dRandomly sampling among a fairly large set of top-ranked tokens at each generation step
Explanation:Greedy decoding always selects the most probable next token, which maximizes consistency across repeated calls. Higher temperature, a wider top-p, or random sampling from a broad candidate set all deliberately introduce variation, working against the goal of repeatable output.

Test yourself against the 2025-question AI Engineer bank.

Start interview