AWS Certified AI Practitioner AIF-C01 Practice Question
A developer lowers the Top-K value from 40 to 5 when calling a large language model through Amazon Bedrock. What effect will this change most likely have on the model's token selection during inference?
The model will switch to greedy decoding and always choose the single most-likely token.
The temperature parameter will be ignored, and only Top-K will control randomness.
The model will consider fewer high-probability tokens, making its responses less random and more predictable.
The model will generate longer outputs because more tokens can be selected before repetition occurs.
Top-K sampling keeps only the K tokens with the highest probability at each generation step and samples among them. Reducing K narrows the candidate pool, so the model is more likely to pick high-probability tokens repeatedly, yielding less varied and more predictable text. It does not automatically lengthen the response, override temperature, or force greedy decoding (which would require K = 1).
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the role of Top-K in large language models?
Open an interactive chat with Bash
How does Top-K differ from temperature in text generation?
Open an interactive chat with Bash
What happens if K is set to 1 in Top-K sampling?
Open an interactive chat with Bash
AWS Certified AI Practitioner AIF-C01
Applications of Foundation Models
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .