AIF-C01 Applications of Foundation Models Practice Question
Which parameter controls the randomness of generated text in a foundation model?
⚠ Common exam trap
AWS often tests the distinction between temperature (which reshapes the probability distribution) and top_p (which truncates the token set), leading candidates to confuse 'randomness control' with 'diversity via cumulative probability threshold'.
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
✓
temperature
Temperature is the correct parameter because it directly controls the randomness of token sampling in a foundation model. A lower temperature (e.g., 0.1) makes the model more deterministic by concentrating probability mass on the most likely tokens, while a higher temperature (e.g., 1.5) flattens the probability distribution, increasing the likelihood of less probable tokens and thus generating more diverse or creative outputs.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
top_p
Why it's wrong here
Top_p, nucleus sampling, truncates the cumulative probability mass and does control randomness, but the question asks for the parameter governing randomness directly, which is temperature. Top_p suits tuning diversity alongside temperature rather than replacing it.
- ✗
stop sequences
Why it's wrong here
Stop sequences halt generation when specified tokens appear, so they shape output length and structure rather than sampling randomness. They are tempting because they genuinely control generation, and would be correct if the requirement were terminating a response at a delimiter. Temperature, top-p and top-k are the parameters that alter token probability distributions.
- ✗
max_tokens
Why it's wrong here
max_tokens caps the length of the generated output; it has no effect on sampling randomness, which temperature and top_p govern. It is tempting because token limits do shape output, but that is a length constraint, not a probability-distribution control, so it cannot make responses more or less random.
- ✓
temperature
Why this is correct
Temperature directly scales the model's output logits before the softmax, flattening or sharpening the probability distribution over the next token. Lower values make high-probability tokens dominate, producing deterministic text; higher values spread probability mass, increasing randomness. This satisfies the stem's requirement for the parameter governing randomness in foundation models.
Go deeper
Related to this question
About these practice questions
This AIF-C01 question is part of Courseiva's 862-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AIF-C01 practice question is part of Courseiva's free Amazon Web Services 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 AIF-C01 exam.