Courseiva
Prompt Engineering →mediumMultiple Choice

NCP-GENL Prompt Engineering Practice Question

A developer is using an NVIDIA NIM-hosted model to classify support tickets into a fixed set of categories. The model occasionally invents new category names. The team wants to guarantee that only allowed categories are returned. Which approach is most appropriate?

⚠ Common exam trap

The trap here is relying on prompt wording or examples to restrict categories, when only an explicit enumeration combined with constrained decoding guarantees the model cannot invent a label.

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

✓

Provide the full category list in the prompt and use the NIM guided_choice parameter with those categories.

When output must be one of a fixed set, enumerating the categories in the prompt and applying a decoding constraint such as guided_choice ensures only valid labels are emitted. Few-shot examples and reasoning improve quality but do not enforce the boundary. High temperature and broad top_k work against the requirement by increasing variability.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Provide the full category list in the prompt and use the NIM guided_choice parameter with those categories.

    Why this is correct

    Listing the categories gives the model the allowed set, and guided_choice constrains decoding to exactly one of those strings. This eliminates invented labels at the sampling level, guaranteeing compliance. It is the most reliable method when the output must be one of a fixed enumeration.

  • ✗

    Use few-shot examples of each category and set top_k to 100.

    Why it's wrong here

    Few-shot examples demonstrate categories but do not prevent the model from generating a new label, especially with a high top_k that broadens sampling. The model could still produce a plausible but unauthorized category. Without a hard constraint or explicit enumerated list, the output space remains open.

  • ✗

    Ask the model to explain its reasoning before choosing a category.

    Why it's wrong here

    Chain-of-thought reasoning can improve classification quality but does not restrict the final label to the allowed set. The model might still conclude with an invented category name. Reasoning also adds tokens and latency without addressing the core requirement of constrained output. A decoding constraint or explicit enumeration is needed.

  • ✗

    Add 'Choose from the list' to the prompt and set temperature to 1.0.

    Why it's wrong here

    A vague instruction does not enumerate the allowed categories, and high temperature encourages creative outputs, including invented labels. This combination increases the chance of invalid categories rather than preventing them. The model needs an explicit list or a decoding constraint, not more randomness.

About these practice questions

Courseiva writes every NCP-GENL question from scratch — 352 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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 NCP-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 NCP-GENL exam.