AIF-C01 practice question: Choosing FMs and inference parameters (5 of 7)
Applications of Foundation Models A free question from our original AIF-C01 practice exam. Try it, then open the answer to see why each option is right or wrong.
A developer tuning a text model on Amazon Bedrock wants responses to stay focused but still vary a little from run to run.
The developer sets Top P to 0.8.
When the model chooses each next token, what does this setting do?
Choose one answer.
AA. It caps the whole response at 80 percent of the maximum token count
BB. It considers only the 80 most likely candidate tokens at each step
CC. It stops generating once the model's confidence in its answer reaches 80 percent
DD. It samples from the smallest token set whose probabilities total 80 percent
Show the answer and explanation
Answer: D
A. Wrong: Response length is controlled by a separate maximum-tokens setting. Top P does not limit the total length of the reply.
B. Wrong: This describes Top K, which sets a fixed number of candidates. Top P instead uses a share of the cumulative probability, so the number of candidates varies from token to token.
C. Wrong: Generation ends at a stop sequence, the length limit or the natural end of the reply. Top P does not measure confidence or end generation.
D. Right: Correct. Top P is the percentage of most-likely candidates the model considers, so 0.8 covers the top 80 percent of the cumulative probability. Lower values give more focused output, and higher values allow less likely tokens. Learn more: Inference request parameters (opens in a new tab)
Explanation
Top P limits each next-token choice to the most likely tokens that together make up the chosen share of the probability distribution. It differs from Top K, which fixes the number of candidates, and from temperature, which reshapes the whole distribution.
Want more on Choosing FMs and inference parameters? The 5 full-length practice sets have 11 more Choosing FMs and inference parameters questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →