NCP-GENL Prompt Engineering Practice Question
A team fine-tunes an NVIDIA NeMo model to classify support tickets into five categories. In production, the model sometimes outputs free-form explanations instead of a single category label, breaking the downstream parser. Which prompt engineering change MOST reliably constrains the output format?
⚠ Common exam trap
The trap here is believing that temperature zero guarantees a clean label-only output, when format compliance is determined by prompt instructions and examples rather than by decoding settings.
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
✓
Add three few-shot examples that each end with the exact category label, and instruct the model to output only the label with no additional text.
Strict output contracts are best enforced by showing the exact desired format through few-shot examples and explicitly prohibiting any additional text. Demonstrations act as in-context conditioning that shapes the model's continuation pattern, while the instruction closes the loophole of adding commentary. Sampling parameters control randomness, not structure.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Add a polite request asking the model to 'try to keep answers short and to the point' while leaving the output format unspecified.
Why it's wrong here
Vague brevity requests do not define a parseable structure. The model may still prepend 'Category:' or append a sentence of rationale, and behavior will vary across tickets. Without a demonstrated format or an explicit prohibition on extra text, the downstream parser will continue to fail intermittently.
- ✗
Increase max_tokens so the model has more room to explain its reasoning before stating the final category label.
Why it's wrong here
Allowing more tokens explicitly permits longer output, which is the opposite of what a strict single-label contract needs. The parser would receive reasoning text plus a label, requiring additional extraction logic. This change worsens the problem rather than constraining the response format.
- ✗
Lower the temperature to zero and trust that deterministic sampling will force the model to emit only a category label.
Why it's wrong here
Temperature zero reduces randomness but does not change what the model was asked to produce. If the prompt permits explanations, greedy decoding will still generate the most likely continuation, which may include explanatory text. Format constraints come from prompt design, not from sampling determinism alone.
- ✓
Add three few-shot examples that each end with the exact category label, and instruct the model to output only the label with no additional text.
Why this is correct
Few-shot examples demonstrate the precise output pattern, and the explicit instruction forbids extra text. Because the model conditions on the demonstrated format, it strongly biases toward emitting only a label. This combination is the most reliable prompt-level method to enforce a strict output contract without changing decoding or adding post-processing.
About these practice questions
One of 352 original NCP-GENL practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.