Module quiz

LLM foundations quiz

32 questions across 3 lessons. Choose an answer, check it, and read why each option is right or wrong.

Checking answers needs JavaScript. You can still read every question and option below.

0 of 32 answered

Keyboard: arrow keys move between options. Space or Enter selects the focused option.

How LLMs work11 questions

ObjectiveTrace what happens between a prompt and a streamed response: tokenize, embed, transformer blocks, logits, softmax, sample, append, repeat.

  1. Question 1 of 32The transformer has just produced logits for the next position. What happens next in a normal generation loop?

    Choose one answer.

  2. Question 2 of 32A teammate says tool calls and system prompts need a different mechanism from ordinary text generation. What is the most accurate response?

    Choose one answer.

  3. Question 11 of 32A model's reply names a station that is not on the route, in the same fluent tone as the correct names around it. Which description of the generation loop best fits what happened?

    Choose one answer.

ObjectiveExplain why self-attention replaced RNNs: parallel training and direct links between tokens.

  1. Question 3 of 32What is the main reason self-attention replaced RNNs for large language models?

    Choose one answer.

  2. Question 10 of 32A colleague proposes replacing a transformer with an RNN to save compute on a long-document training job. Which point best explains why this would likely hurt?

    Choose one answer.

ObjectiveDescribe how Query/Key/Value scoring, the causal mask and the sequence-length-squared score matrix work.

  1. Question 4 of 32Which statement about information flow is correct for a decoder-only LLM generating text?

    Choose one answer.

  2. Question 5 of 32You double the prompt length. What happens to the number of attention scores computed in a layer during prefill?

    Choose one answer.

  3. Question 6 of 32In scaled dot-product attention, what is the Query compared against, and what is blended using the resulting weights?

    Choose one answer.

ObjectiveExplain prefill versus decode, why the KV-cache saves compute, and why it costs memory that grows with context length and concurrency.

  1. Question 7 of 32Which statements about the KV-cache are true? Select all that apply.

    Choose all that apply.

  2. Question 8 of 32A model uses 128 KiB of KV-cache per token. You serve 4 concurrent requests, each with 2,048 tokens of context. About how much cache memory is that, excluding model weights?

    Choose one answer.

  3. Question 9 of 32Users sending very long prompts see a long wait before the first word appears, but once text starts streaming it flows smoothly. Which phase is most likely responsible for the wait?

    Choose one answer.

Tokenization and embeddings10 questions

ObjectiveExplain how byte-pair encoding builds a subword vocabulary and why that lets a model handle words it never saw whole.

  1. Question 12 of 32A user types a product name the model has never seen as a whole word. What does a byte-level BPE tokenizer do?

    Choose one answer.

  2. Question 13 of 32How is a BPE vocabulary built?

    Choose one answer.

  3. Question 21 of 32A tokenizer splits a rare place name into pieces that look arbitrary to a reader. What most likely decided where it cut?

    Choose one answer.

ObjectiveExplain why token count is not word count, and how language, code and numbers change the count and therefore cost and context budget.

  1. Question 14 of 32A teammate estimates cost for a Hindi-language feature by multiplying English word counts by a fixed tokens-per-word ratio. What is the risk?

    Choose one answer.

  2. Question 15 of 32Why do language models sometimes miscount the letters in a word or slip on multi-digit arithmetic?

    Choose one answer.

  3. Question 20 of 32You bill customers a flat price per API call, and a new customer starts sending 20-page documents in a script that tokenizes poorly. What breaks?

    Choose one answer.

ObjectiveDescribe how token IDs become learned embedding vectors, and the vocabulary-size trade-off.

  1. Question 16 of 32What does the embedding table contain, and where do its values come from?

    Choose one answer.

  2. Question 17 of 32A vendor releases a tokenizer with a much larger vocabulary. Which trade-off is most accurate?

    Choose one answer.

ObjectiveChoose the correct tokenizer to count tokens for a given model, and say why a count from another model family is only an estimate.

  1. Question 18 of 32You budget context for a Llama-based model but count tokens with an OpenAI tokenizer because it is convenient. What is the correct view?

    Choose one answer.

  2. Question 19 of 32You switch the production model to a new family. What should you do about token budgeting?

    Choose one answer.

Sampling parameters and the model landscape11 questions

ObjectiveExplain how temperature rescales logits and how top-k and top-p filter the candidate tokens, including why top-p adapts to the distribution.

  1. Question 22 of 32You raise the temperature from 0.5 to 2.0. What happens to the next-token distribution?

    Choose one answer.

  2. Question 23 of 32The model is very confident: probabilities 0.97, 0.02, 0.01. With top-p = 0.9, which tokens remain candidates?

    Choose one answer.

  3. Question 24 of 32Why is top-p often described as adaptive while top-k is not?

    Choose one answer.

  4. Question 32 of 32A hosted model is called three times with the same prompt and default settings, and returns three different answers to a factual question. What is the most reasonable first conclusion?

    Choose one answer.

ObjectiveChoose sampling settings for a task such as extraction, classification or creative writing, and justify the choice.

  1. Question 25 of 32You build a pipeline that extracts invoice numbers from emails and a feature that suggests playful subject lines. Which sampling choice fits best?

    Choose one answer.

  2. Question 26 of 32A teammate sets temperature to 0.3, top-p to 0.5 and top-k to 10 after reading several blog posts, with no measurements. What is the best advice?

    Choose one answer.

ObjectiveExplain why temperature 0 does not guarantee identical outputs, and name practical ways to handle that.

  1. Question 27 of 32Your code sets temperature=0 on a hosted model for a compliance audit, and later you re-run the same prompt and get different text. What is the most accurate explanation?

    Choose one answer.

  2. Question 28 of 32For an auditable workflow on a hosted API, which design choices are defensible? Select all that apply.

    Choose all that apply.

ObjectiveCompare open-weight and API-only models on control, data, cost and operations, and propose criteria and a measurement plan for choosing.

  1. Question 29 of 32A healthcare startup must keep patient text inside its own cloud account and has one ML engineer. It is weighing an open-weight model against an API-only model. What is the best next step?

    Choose one answer.

  2. Question 30 of 32Which statement about open-weight models is accurate?

    Choose one answer.

ObjectiveExplain why a larger context window is a cost and quality decision rather than a free upgrade, and why it does not replace retrieval.

  1. Question 31 of 32A product lead says: 'The new model has a very large context window, so we can drop retrieval and paste in the whole knowledge base.' What is the strongest objection?

    Choose one answer.