Courseiva

NCA-GENL Core Machine Learning and AI Knowledge Practice Question

A machine learning engineer is evaluating a generative language model for a chatbot application. They notice that the model frequently generates repetitive phrases and gets stuck in loops. Which decoding strategy is most likely to reduce this repetition?

⚠ Common exam trap

The trap here is assuming that beam search, which is often used for high-quality outputs, will also prevent repetition, when in fact it can reinforce it.

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

✓

Nucleus sampling with a repetition penalty

Repetition in generated text often stems from decoding strategies that favor high-probability tokens. Nucleus sampling with a repetition penalty addresses this by dynamically truncating the probability distribution and penalizing repeated tokens, encouraging diverse and non-repetitive outputs. Greedy and beam search lack such penalties, and top-k with small k restricts diversity.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Top-k sampling with a small k

    Why it's wrong here

    Top-k sampling restricts the candidate pool to the k most likely tokens, which can reduce diversity if k is small. With a small k, the model often picks from a limited set, leading to repetitive outputs. It does not explicitly address repetition, and small k can make it worse.

  • ✗

    Greedy search

    Why it's wrong here

    Greedy search selects the highest-probability token at each step, which often leads to repetitive and dull outputs. It lacks mechanisms to penalize repeated tokens or explore alternatives, so it can easily fall into loops. Thus, it would likely exacerbate the repetition problem.

  • ✓

    Nucleus sampling with a repetition penalty

    Why this is correct

    Nucleus sampling (top-p) dynamically selects the smallest set of tokens whose cumulative probability exceeds p, promoting diversity. Adding a repetition penalty reduces the likelihood of tokens that have already appeared, directly mitigating loops. This combination effectively balances coherence and novelty, reducing repetitive phrases.

  • ✗

    Beam search with a large beam width

    Why it's wrong here

    Beam search explores multiple hypotheses but still tends to produce repetitive text because it optimizes for high-probability sequences, which often include common phrases. A large beam width can even increase repetition by reinforcing high-frequency patterns. It does not inherently penalize repetition.

About these practice questions

This NCA-GENL question is part of Courseiva's 367-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official NVIDIA exam blueprint

This NCA-GENL practice question is part of Courseiva's free NVIDIA 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 NCA-GENL exam.