AIF-C01 Fundamentals of Generative AI Practice Question
A developer is testing different prompts for a text generation model on Amazon Bedrock. Which parameter controls the randomness of the model's output?
⚠ Common exam trap
Candidates often confuse top_p (nucleus sampling) with randomness control, when temperature is the primary parameter for that purpose. Both affect output diversity but through different mechanisms.
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 directly controls the randomness of the model's output by scaling the logits before applying the softmax function. A higher temperature (e.g., 1.5) increases randomness and creativity, while a lower temperature (e.g., 0.1) makes the output more deterministic and focused. In Amazon Bedrock, this parameter is a core setting for text generation models like Anthropic Claude and Amazon Titan.
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 implements nucleus sampling, which truncates the probability mass; it is not the parameter that directly scales randomness. It is tempting because it influences output diversity, but temperature is the parameter that controls randomness, while top_p limits the token pool.
- ✗
stop_sequences
Why it's wrong here
The stop_sequences parameter halts generation when specified character sequences appear, so it cannot influence randomness at all. It is tempting because it genuinely shapes output, but its purpose is bounding response length or cutting off unwanted trailing text — the right choice when a scenario asks how to end generation at a delimiter.
- ✓
temperature
Why this is correct
Temperature directly scales the sampling distribution's entropy: low values sharpen probabilities toward the highest-scoring token, high values flatten them, increasing output variability. This is precisely the randomness control the developer needs when testing prompts on Amazon Bedrock, unlike top-p, which truncates the candidate token set rather than rescaling probabilities.
- ✗
max_tokens
Why it's wrong here
max_tokens caps the length of generated output, so it cannot alter randomness at all; raising or lowering it merely truncates or extends the response. It is tempting because token limits do shape output, and they are the correct control when the requirement is bounding response size or cost rather than varying sampling behaviour.
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.