AWS Certified AI Practitioner (AIF-C01) free question 5 / 10 · Domain 3: Applications of Foundation Models
An app that answers internal FAQs gives answers whose wording varies every time for the same question. The team wants to reduce that variation and make the answers more deterministic. Which adjustment matches the page?
- Raise the penalty to suppress repeated words and stabilize the answers
- Raise Top K to widen the candidates for the next token and stabilize the answers
- Lower the maximum response length so there is less room for the output to vary
- Lower the temperature so tokens with higher probability are more likely to be chosen
Show the answer and explanation
Answer: D
Why this is correct
Temperature is a parameter that affects the shape of the probability distribution for the next token. The page says that choosing a low value makes high-probability outputs more likely, and that technically, the lower the temperature, the steeper the function and the more deterministic the response. For uses such as FAQs where you want consistent answers, you lower the temperature.
Why the other options are wrong
"Raise the penalty to suppress repeated words and stabilize the answers" … Penalties specify how much to penalize things such as response length, repeated tokens, or token frequency. Repetition may decrease, but the shape of the probability distribution that decides which words are likely to be chosen does not change.
"Raise Top K to widen the candidates for the next token and stabilize the answers" … Raising Top K increases the number of candidates and lets lower-probability outputs be considered. Widening candidates adjusts toward more diversity.
"Lower the maximum response length so there is less room for the output to vary" … Response length sets the minimum and maximum number of tokens returned. It does not change the probability distribution over which words are selected, so variation in wording remains.
Key point
In the page's table, lowering the temperature makes higher-probability tokens more likely and raising it makes lower-probability tokens more likely. Top K and Top P narrow or widen the range of candidates: low values remove low-probability tokens and high values allow them. Defaults and ranges differ by model.