Courseiva
Prompt Engineering →hardMultiple Choice

NCP-GENL Prompt Engineering Practice Question

An engineer is using an NVIDIA NIM for a Mixtral model to extract structured data from invoices. The model occasionally returns fields with the wrong data type, such as a numeric amount as a string. The team wants a prompt engineering fix that does not require changing the model or adding a separate parser. Which approach is most effective?

⚠ Common exam trap

The trap here is relying on self-checking or sampling parameters to fix data type errors, when the prompt never defined the expected types in the first place.

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

✓

Describe the desired output schema in the system prompt, including field names and expected data types, and provide one fully formatted example.

An explicit schema with field names and data types, paired with a complete example, gives the model an unambiguous template. The example shows numeric values without quotes, so the model imitates the correct types. Self-checking, sampling parameters, and natural language output do not provide the concrete structural guidance needed to eliminate type errors at the prompt level.

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 the data in a natural language paragraph and then extract the fields manually.

    Why it's wrong here

    Natural language paragraphs are harder to parse and do not enforce types at all. The task requires structured data, and moving away from a structured format increases ambiguity. Manual extraction is also not a prompt engineering fix and does not scale. This approach would worsen the type consistency problem rather than solve it.

  • ✗

    Ask the model to double-check its output for type correctness before returning it.

    Why it's wrong here

    Self-checking instructions can help, but they are unreliable for strict type adherence because the model may not recognize its own type errors. Without a concrete schema or example, the model has no reference for what correct types look like. This approach may reduce some errors but does not provide the deterministic guidance that an explicit schema and example offer.

  • ✗

    Lower the temperature to 0.0 and increase the repetition penalty to discourage type mistakes.

    Why it's wrong here

    Temperature and repetition penalty affect randomness and token repetition, not the semantic type of a field. A numeric amount may still be emitted as a string even at zero temperature if the prompt does not specify the type. These parameters do not communicate the schema, so they cannot reliably fix type mismatches.

  • ✓

    Describe the desired output schema in the system prompt, including field names and expected data types, and provide one fully formatted example.

    Why this is correct

    Specifying the schema with explicit data types and showing a complete example gives the model a precise template to follow. The example demonstrates the exact format, including numeric values without quotes. This combination is the most effective prompt-level fix because it removes ambiguity about both field names and types, reducing type errors without external parsing.

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 →

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.