easyMultiple Choice
Generative AI Leader Practice Question: The primary purpose of the temperature parameter…
What is the primary purpose of the temperature parameter in a generative language model?
⚠ Common exam trap
Candidates often confuse temperature with other sampling parameters (top-k, top-p) — they mistakenly think temperature controls output length or vocabulary size, when it strictly governs the randomness of token selection.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
It controls the tradeoff between creativity and determinism
The temperature parameter directly controls the probability distribution over the next token. A lower temperature (e.g., 0.1) makes the model more deterministic by favoring high-probability tokens, while a higher temperature (e.g., 1.5) flattens the distribution, increasing randomness and creative output. This tradeoff is fundamental to balancing coherence with novelty in generative models.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
It defines the context window size for the prompt
Why it's wrong here
Temperature adjusts sampling randomness; it does not define the context window, which is the model's fixed maximum token capacity for input plus output. It is tempting because both affect how much text is processed, but context length is a model architecture limit, not a runtime sampling setting.
- ✓
It controls the tradeoff between creativity and determinism
Why this is correct
Temperature scales the sampling distribution before token selection. Lower values sharpen probabilities toward the highest-scoring tokens, producing deterministic output; higher values flatten the distribution, letting lower-probability tokens be chosen and increasing creative variation. This directly governs the creativity-versus-determinism tradeoff.
- ✗
It limits the vocabulary to the top K tokens
Why it's wrong here
Temperature rescales logits before sampling; it does not restrict candidates to the top K tokens, which is the separate top-k parameter. It is tempting because both influence output diversity, but top-k truncates the vocabulary while temperature only flattens or sharpens the distribution over it.
- ✗
It sets the maximum number of tokens in the output
Why it's wrong here
Temperature scales the sampling distribution's randomness, not the output token count. It is tempting because both parameters shape generated output, yet length is governed by max_tokens or max output tokens. Temperature is correct when you need to control creativity versus determinism in sampling.
Go deeper
Related to this question
About these practice questions
One of 1,008 original Generative AI Leader practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This Generative AI Leader practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Generative AI Leader exam.