MugUp logoMugUp
HomeBrowsePricingAboutBlogContact
LoginSign Up
© 2026 MugUp. All rights reserved.
HomeAboutDeck LibraryBlogChangelogContactFeature RequestsDeck Requests
Terms of ServicePrivacy PolicyCookie Policy
  1. Browse decks
  2. AI & Prompt Engineering
  3. LLM Basics: Tokens, Context and Sampling
Public deck

AI & Prompt Engineering

Vendor-neutral fundamentals of working with large language models: tokens and sampling, prompting patterns, embeddings and vector search, retrieval-augmented generation, and the failure modes that bite in production.

Engineering
AShared by Alex Chen
0PlaySign in to clone

You’re reading a free preview. Sign up to see every topic and question — and to play this deck as games.

See the whole deck

LLM Basics: Tokens, Context and Sampling

What a model actually reads, how much of it fits, and the knobs that decide what comes out.

Play topicBack to deck

Content

50 total questions

MCQ: 12
Fill-in: 9
Flashcards: 14
Pair match: 15
LLM Basics: Tokens, Context and Sampling – Flashcards
Flashcards

Card #1

What is a token?

Card #2

Why does the same sentence cost more tokens in some languages than in English?

Card #3

What is the context window?

11 more questions in this game

Showing 3 of 14. Sign up free to see the rest.

Sign up freeLog in
LLM Basics: Tokens, Context and Sampling – MCQ
Multiple Choice Questions
  1. 1. The context window of a model limits:

    • The combined number of prompt and generated tokens the model can attend to at once
    • The number of prompt tokens only — output length is unbounded
    • The number of separate conversations the model can hold open
    • The number of documents that may be embedded for retrieval
  2. 2. Lowering the temperature toward zero makes the model:

    • Concentrate probability on the highest-scoring tokens, giving more repeatable output
    • Consider a wider range of candidate tokens at each step
    • Run measurably faster, because fewer tokens are evaluated
    • Ignore the instructions in its system prompt
  3. 3. Top-p (nucleus) sampling differs from top-k in that:

    • The candidate set is chosen by cumulative probability mass, so its size varies with the model's confidence
    • It always considers exactly p candidate tokens
    • It replaces the need for a temperature setting
    • It is applied to the prompt rather than to generation
9 more questions in this game

Showing 3 of 12. Sign up free to see the rest.

Sign up freeLog in
LLM Basics: Tokens, Context and Sampling – Fill-in-the-blank
Fill in the Blank
  1. 1. The unit of text a language model actually reads and predicts is a ___.

    Answer:tokenalso: tokens

    Hint: often a sub-word piece

  2. 2. The maximum number of tokens a model can attend to at once — prompt and output together — is its context ___.

    Answer:window
  3. 3. Sampling from the smallest set of tokens whose probabilities sum to p is called ___ sampling.

    Answer:nucleusalso: top-p, top p

    Hint: also written top-p

6 more questions in this game

Showing 3 of 9. Sign up free to see the rest.

Sign up freeLog in
LLM Basics: Tokens, Context and Sampling – Pair match
Pair Match
Token↔Sub-word unit the model reads and predicts
Context window↔Total prompt plus output tokens attendable at once
Temperature↔Knob that sharpens or flattens the next-token distribution
12 more questions in this game

Showing 3 of 15. Sign up free to see the rest.

Sign up freeLog in