Skip to lesson

NVIDIANVIDIA-Certified Professional: Agentic AI2026-102.1 Engineer prompts and dynamic prompt chains for reliable performance.

Divide system prompts into role, rules, tools, examples

Completed by the knowledge check

Learning objective

Structure system prompts with role, constraints, tool guidance, and few-shot examples.

Core idea

A system prompt specifies how an agent should perform its task. Its useful content is operational: the role’s scope, constraints on answers and actions, rules for choosing tools, and examples of the behavior you expect. A confident persona contributes little if the prompt leaves those decisions ambiguous.

For a production agent, prompt structure also has an interface constraint. NVIDIA NeMo Agent Toolkit’s ReAct agent accepts system_prompt, but replacing that prompt must preserve the variables and output format its parser expects. Improving the prose while breaking the parser makes the workflow less reliable. See 1.2.2 for the ReAct execution loop; here you decide what belongs in its instructions.

How it works

Assign a role with a bounded task

In LangChain, SystemMessage supplies initial instructions, while HumanMessage carries user input. Give the system message a role that defines responsibility: a benefits assistant explains published policy and identifies missing information. It does not become the authority that grants an exception merely because you call it an expert.

Describe the intended outcome and the conditions for asking a question or declining to conclude. For example, require a policy citation for eligibility advice and a clarification when employment location is missing. This gives the model an observable decision to make. “Be accurate and helpful” gives you little to test when policy text is incomplete.

Keep role and tone subordinate to task rules. An empathetic tone can change how the assistant explains missing information; it must not change whether an eligibility claim needs a source. Put that distinction into examples so the style instruction does not silently become permission to improvise.

Separate constraints from tool selection

Write constraints as conditions and outcomes. If the supplied policy does not establish eligibility, say what is missing. If a request needs a decision outside the assistant’s scope, explain the handoff. These are instructions for generated behavior. Enforce access permissions in the application and tool implementation; the model’s compliance with prose is not an authorization check.

In NeMo Agent Toolkit, workflow._type: react_agent chooses the agent, llm_name selects a configured LLM, and tool_names selects its available functions. The ReAct implementation requires the nvidia-nat[langchain] plugin. Its decisions use tool names and descriptions. Give each function a description that distinguishes when to use it, rather than repeating its name.

For example, distinguish an application-defined lookup_policy from lookup_employee_location. The first retrieves published rules; the second retrieves a permitted employee attribute. The prompt should explain which observation answers which uncertainty. A tool’s presence is not a reason to call it on every request, and a plausible generated answer is not a substitute for a required lookup.

NeMo Agent Toolkit functions expose input and output schemas backed by Pydantic models. ReAct’s include_tool_input_schema_in_tool_description defaults to True: it appends each tool’s input schema to its description unless set to False. Those schemas consume prompt tokens as the tool set grows. Keep parameter meaning consistent between the schemas, descriptions, and prompt. If the function expects a policy identifier, examples should not teach the agent to send an entire conversation into that parameter.

Choose extension or replacement deliberately

The ReAct agent offers additional_instructions to extend its base prompt and system_prompt to override it. Prefer the extension when you need domain policy but want to keep the base interaction format. Choose replacement when the complete prompt needs to be controlled, and test the resulting tool and final-answer parsing.

A replacement must retain {tools} and {tool_names} and instruct the model to use the ReAct output format. That format includes Action and Action Input for a tool request and Final Answer for completion. Do not replace it with an unrelated JSON-only instruction and expect the same parser to work. Structured final answers are a separate interface choice; see 2.1.2.

Use examples to resolve ambiguity

Few-shot examples demonstrate decisions that a rule alone leaves easy to misread. Include a supported answer, a missing-information case, and a case where a superficially related tool is inappropriate. Keep each example short enough that its deciding condition remains visible.

Show the expected output style and the right use of observations. An example that invents a successful tool result teaches the model to skip the observation it needs. In a ReAct replacement prompt, preserve the documented interaction format in examples as well as in instructions. For a chat model used directly through LangChain, HumanMessage and AIMessage can represent example exchanges.

Examples consume input tokens on every request that includes them. Spend those tokens on distinct failure modes rather than several nearly identical successful answers. Review an example whenever a tool’s schema or domain policy changes; a stale example can contradict a correctly updated rule.

Key distinctions and trade-offs

Use each prompt element for a different decision:

ElementDeciding conditionMechanismCost or failure
RoleThe model needs a clear responsibilitySystemMessage; ReAct instructionsA persona can obscure missing task rules
ConstraintsA valid answer depends on a conditionExplicit condition and required outcomeProse does not enforce permissions
Tool guidanceSeveral tools could appear relevanttool_names, descriptions, include_tool_input_schema_in_tool_descriptionSchema tokens grow with tool count; ambiguity causes wrong calls
Few-shot examplesA boundary is difficult to express onceExample exchanges in the promptInput tokens and maintenance

An extension preserves the base prompt’s structure but gives you less control over the whole text. Replacement gives that control while making you responsible for template compatibility. Neither choice removes the need to evaluate real outputs.

Architecture / decision scenario

A hospital network launches a benefits assistant for 12,000 staff. The application team requires a policy citation for every eligibility answer and prohibits the assistant from approving exceptions. In a 200-case pilot, a persona-only prompt answers 28 incomplete requests without clarification; a structured candidate does so in six. The team’s acceptance target is zero unsupported eligibility conclusions.

A practitioner proposes adding ten more successful examples. The prompt owner instead keeps three contrasting examples: supported eligibility, missing location, and an exception request. They add the location and citation conditions through additional_instructions, clarify the two tool descriptions, and preserve the base ReAct format. The tool owner enforces which employee attributes the caller can retrieve.

The choice follows the observed failure, not prompt length. More successful examples do not address the missing-information decision. The six remaining failures block release and become regression cases for 2.1.4; the candidate’s lower error count does not satisfy the stated acceptance target.

Common exam traps

  • Treating an expert persona as a substitute for constraints and tool guidance.
  • Putting a tool in prose while forgetting its tool_names configuration.
  • Overriding system_prompt without {tools}, {tool_names}, or the expected output format.
  • Demonstrating invented tool observations in few-shot examples.
  • Treating a prompt restriction as the enforcement of access permissions.

Where the exam guide differs

Note:

The study guide’s suggested readings use “AIQ Toolkit” and “Agent Intelligence Toolkit.” The product documentation names NVIDIA NeMo Agent Toolkit. Read those guide references as the toolkit lineage, then use the documented react_agent, system_prompt, and additional_instructions interfaces rather than inferring configuration names from the earlier branding.

What to remember

Give every part of the prompt a job: role defines scope, constraints define conditions, tool guidance selects observations, and examples resolve ambiguity. Extend or replace the ReAct prompt deliberately, preserving its parser interface. Verify behavior through cases that could fail, not through the apparent authority of the wording.

Knowledge check

References