Courseiva
Prompt Engineering →mediumMultiple Choice

NCP-GENL Prompt Engineering Practice Question

An engineer is deploying an NVIDIA NeMo Guardrails system to moderate a chatbot's responses. The chatbot must refuse to answer questions about politics but should answer questions about weather. Which prompt engineering strategy in NeMo Guardrails is most appropriate to enforce this behavior?

⚠ Common exam trap

Candidates often confuse runtime guardrail flows with model-level instructions or fine-tuning, which do not provide the same deterministic enforcement.

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

✓

Define a dialogue flow with a canonical form for political questions that triggers a refusal response, and a separate flow for weather questions that allows the answer.

NeMo Guardrails uses Colang dialogue flows to define bot behavior based on user intent. Creating separate flows for political and weather questions ensures deterministic refusal or answering. This is the core prompt engineering approach within the guardrails framework and provides reliable, auditable control.

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 Python function that checks the user input for political keywords and returns a refusal, bypassing the model entirely.

    Why it's wrong here

    This approach is a form of input filtering, but it does not leverage NeMo Guardrails' dialogue management. It could be part of a guardrail, but the scenario asks for a prompt engineering strategy within NeMo Guardrails. Dialogue flows are the recommended way to handle intent-based responses, including refusals and allowed topics.

  • ✓

    Define a dialogue flow with a canonical form for political questions that triggers a refusal response, and a separate flow for weather questions that allows the answer.

    Why this is correct

    NeMo Guardrails uses dialogue flows defined in Colang to specify how the bot should respond to different user intents. By creating a flow that detects political questions and triggers a refusal, and another flow for weather that permits answering, you enforce the desired behavior. This is the intended use of the guardrails framework.

  • ✗

    Use a system prompt that instructs the model to refuse political questions and answer weather questions.

    Why it's wrong here

    While a system prompt can influence behavior, it is not a robust enforcement mechanism. The model might still answer political questions if prompted cleverly. NeMo Guardrails is designed to provide deterministic control through dialogue flows, which are more reliable than relying solely on the model's instruction-following.

  • ✗

    Fine-tune the underlying LLM to refuse political questions and answer weather questions.

    Why it's wrong here

    Fine-tuning is a training-time intervention, not a prompt engineering strategy in NeMo Guardrails. It is expensive and inflexible if policies change. NeMo Guardrails is designed for runtime control through prompts and flows, making it the appropriate tool for this scenario.

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.