1Z0-1127-25 Prompt Engineering Practice Question
What is the primary purpose of setting the 'top-k' parameter in an LLM?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
To limit the next token selection to the k most probable tokens
Top-k restricts the model to sample only from the k most likely next tokens, reducing the chance of unusual or off-topic words. Top-p is nucleus sampling; temperature controls randomness; frequency penalty reduces repetition.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
To truncate the output after k tokens
Why it's wrong here
Max tokens truncates output length, not top-k.
- ✗
To control the creativity of the output by scaling logits
Why it's wrong here
Temperature controls creativity, not top-k.
- ✗
To penalize tokens that have already appeared in the generated text
Why it's wrong here
Frequency penalty reduces repetition, not top-k.
- ✓
To limit the next token selection to the k most probable tokens
Why this is correct
Top-k sampling selects only from the top k tokens by probability, ignoring the long tail of low-probability tokens.
Go deeper
Related to this question
About these practice questions
This 1Z0-1127-25 question is part of Courseiva's 768-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 1Z0-1127-25 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-1127-25 exam.