Question 20
Domain 2: Fundamentals of Generative AIA company wants to use a large language model (LLM) on Amazon Bedrock for sentiment analysis. The company needs the LLM to produce more consistent responses to the same input prompt. Which adjustment to an inference parameter should the company make to meet these requirements?
Correct answer: A
Explanation
Temperature controls randomness in sampling; lowering it makes outputs more deterministic. The source says at temperature = 0 “the model always selects the highest-probability next token,” which produces “deterministic” results for the same prompt.
Why each option is right or wrong
A. Decrease the temperature value.
Amazon Bedrock inference parameters include temperature, top-p, and maximum tokens; among these, temperature is the parameter that governs sampling randomness. In the cited Bedrock guidance, lowering temperature toward 0 makes the model choose the highest-probability next token, so repeated runs on the same sentiment-analysis prompt become more stable and reproducible.
B. Increase the temperature value.
Higher temperature increases randomness and output variability.
C. Decrease the length of output tokens.
Output token length limits response size, not sampling consistency.
D. Increase the maximum generation length.
Maximum generation length controls how long outputs can be, not determinism.