Course menuAIF-C01

Exams / AIF-C01 / Choosing FMs and inference parameters / Question 2

AIF-C01 practice question: Choosing FMs and inference parameters (2 of 4)

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 sets Top P to 0.8 on a text model in Amazon Bedrock. What effect does this have when the model chooses each next token?

Choose one answer.

  1. A. It caps the response at 80 per cent of the maximum allowed length
  2. B. It considers only the 80 most likely candidate tokens at each step
  3. C. It stops generating once the model is 80 per cent confident
  4. D. It samples from the tokens making up the top 80% of probability
Show the answer and explanation

Answer: D

  • A. Wrong: Response length is set by a separate parameter. Top P does not limit the number of tokens returned.
  • B. Wrong: That describes Top K, which sets a fixed number of candidates. Top P sets a share of the probability distribution.
  • C. Wrong: Generation ends at a stop sequence, the length limit or the natural end. Top P has no confidence cut-off.
  • D. Right: Correct. Top P limits choices to the smallest set of likely tokens whose combined probability reaches the chosen share.

Explanation

Top P (nucleus sampling) restricts the next-token choice to the most likely tokens that together make up the chosen share of probability. Lower values make output more focused; higher values allow less likely tokens. Top K instead sets a fixed number of candidates, and temperature reshapes the whole distribution.

Study

Keep practising

Answer questions with a score at the end, or practise just this topic with the explanation after each one. No sign-up needed.