NCP-GENL Prompt Engineering Practice Question
An engineer is designing prompts for an NVIDIA NIM-hosted model that must extract structured fields from unstructured invoices. The extraction accuracy is inconsistent across vendors with different layouts. Which TWO prompt engineering techniques would MOST improve reliability? (Choose two.)
⚠ Common exam trap
The trap here is treating higher temperature as a way to reason through ambiguity, when in extraction tasks it mainly adds run-to-run inconsistency and invented values.
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
✓
Instruct the model to output fields in a fixed JSON schema and to use null for any field not present in the document.
Reliable structured extraction combines format constraints with demonstrated patterns. A fixed JSON schema with a null convention makes outputs machine-parseable and defines behavior for absent fields, while few-shot examples across varied layouts teach the model to handle layout diversity. Together they reduce both structural errors and hallucinated values, which prose summarization and high-temperature sampling would worsen.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Instruct the model to output fields in a fixed JSON schema and to use null for any field not present in the document.
Why this is correct
A fixed schema removes ambiguity about output shape and key names, and the null convention gives the model a defined behavior for missing data instead of inventing values. Together these constraints make outputs parseable and reduce hallucinated field values, which is essential for downstream automation.
- ✗
Ask the model to summarize the invoice in prose first and then extract fields from its own summary in a second pass.
Why it's wrong here
Summarization loses exact values and can introduce paraphrase errors before extraction even begins. The second pass then works from degraded information, compounding inaccuracy. Direct extraction with few-shot guidance and a fixed schema is more reliable than routing through a lossy intermediate representation.
- ✗
Raise the temperature to 0.9 so the model explores multiple interpretations of ambiguous invoice text before committing to values.
Why it's wrong here
Higher temperature increases variability in generated tokens, which is harmful for deterministic extraction tasks. Field values may change between runs, and hallucinated numbers become more likely. Extraction benefits from low-variance decoding combined with strong structural instructions, not from creative sampling.
- ✓
Provide few-shot examples that cover several distinct invoice layouts, each showing the exact input-to-output field mapping.
Why this is correct
Few-shot examples with layout diversity teach the model to generalize extraction patterns rather than memorize one format. Showing the precise field mapping in the completion clarifies expected keys and value styles, which directly reduces variance when new vendor layouts appear. This is a core technique for improving structured extraction consistency.
- ✗
Remove all formatting and concatenate the entire invoice text into a single lowercase string before sending it to the model.
Why it's wrong here
Stripping layout and case destroys spatial and typographic cues that distinguish labels from values, such as table alignment and header capitalization. This makes extraction harder, not easier. Preserving document structure, or converting it to a structured representation like Markdown, generally improves accuracy.
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.