CertKeen

AWS AI Practitioner (AIF-C01) · Free practice question 9 of 12

Stop sequences end generation

A developer at Greystone Apps wants a text generation model to stop producing output as soon as it writes the marker '###'. Which inference parameter should the developer set?

  1. A.Temperature
  2. B.Top-k
  3. C.A stop sequence
  4. D.The context window size
Show answer and explanation

Correct answer: C. A stop sequence

Why: A stop sequence is a string that, when generated, causes the model to stop producing further tokens, which is useful for ending output at a known marker. Temperature and top-k shape which tokens are sampled, and the context window is a fixed property of the model that limits how much text it can process.

More free AWS AI Practitioner (AIF-C01) questions