Think first How do you keep an agent's logs useful for audits without turning them into a security risk?
Why it matters: Questions describe an agent deployment and ask which control protects the system, its tools or its audit trail.
Agent security works in layers: limit what the agent can touch, add injection detection to strengthen other controls, and log with care. Logs can reveal system architecture or security measures, so scrub sensitive data before logging.
Reported, thanks
Step 2 of 9
Term
Meaning
Audit trail exposure
The risk that logs reveal system architecture or security measures.
RBAC
Role Based Access Control: limiting agent permissions to specific resources.
YARA rule
A rule that lists string patterns to match plus a Boolean expression for its logic.
Context bloat detection
A rail against context manipulation that screens user input and retrieved knowledge-base chunks.
Reported, thanks
Step 3 of 9
Limit permissions and isolate execution. Use RBAC so the agent reaches only specific resources, which guards against tool abuse. Run it in a sandbox such as WebAssembly or a container to protect system integrity. Prefer signed models from trusted providers to cut supply chain risk.
Reported, thanks
Step 4 of 9
Injection detection is one layer of defense in depth. NeMo Guardrails looks for SQL injection, code injection, template injection and cross-site scripting. It is meant to strengthen other security controls in agentic systems, not replace them. Turn on the SQL injection rule when LLM output feeds a database query.
Reported, thanks
Step 5 of 9
YARA rules define what injection detection matches. Each rule lists text or binary patterns plus a Boolean expression for its logic. When a rule fires, rejecting the output is the safest action for production. The alternative is to omit the triggering text.
Exam trap Omitting the triggering text is not the safest choice for production. Rejecting the whole output is.
Reported, thanks
Step 6 of 9
Context bloat detection screens text the agent did not write. It covers both user input and the knowledge-base chunks an agent retrieves. Its size cap, max_chars, defaults to 5000 characters, which stops oversized input meant to exhaust the token budget.
Reported, thanks
Step 7 of 9
Guardrails traces go to ./.traces/trace.jsonl by default. The FileSystemAdapter writes interaction traces there. Agent Toolkit observability can also record LLM prompts and responses, and that capture raises security considerations of its own.
Reported, thanks
Step 8 of 9
Logs can expose the system they record. They may reveal system architecture or security measures. Scrub sensitive data before it is logged, set log retention policies, and use a SIEM for secure log management.
Exam trap Keeping logs longer is not automatically safer for audits. Holding them longer than necessary increases exposure risk.
Reported, thanks
Step 9 of 9
Use RBAC and sandboxing to limit and isolate what an agent can do.
In production, reject the output rather than omit text when injection is detected.
Context bloat detection caps input at 5000 characters by default.
Sanitize logs, limit their retention and manage them with a SIEM.
Think first How would you add privacy and company policy checks to an agent without rewriting the agent itself?
Why it matters: Questions describe a compliance need and ask which rail, setting or failure behavior meets it.
In NeMo Guardrails, compliance checks are rail flows you switch on in config.yml. PII detection protects privacy, while PolicyAI applies your own tagged policies to user messages and bot replies.
Reported, thanks
Step 2 of 9
Term
Meaning
Rail flow
A configurable guardrail you place in the input, output or retrieval part of config.yml.
config.yml
The only required file of a guardrails configuration; it names the LLMs and the active rails.
PolicyAI
Policy-based content moderation where you define custom policies and manage them with tags.
Policy tag
The label that groups PolicyAI policies, chosen with POLICYAI_TAG_NAME (default prod).
Reported, thanks
Step 3 of 9
Every guardrail is a rail flow in config.yml. Add each rail to the input, output or retrieval section. You can mix NVIDIA safety models, community models, self-check prompts and managed APIs for defense in depth.
Reported, thanks
Step 4 of 9
Only config.yml is required. Everything else is optional. Colang files load recursively from anywhere in the config folder, and custom actions suit jobs such as external API calls or validation logic.
What each part of a NeMo Guardrails configuration holds
Part
Required
What it holds
config.yml
Yes
LLMs, general instructions, active rails and rail options
Colang .co files
No
The rail flows, from the config root or any subfolder
actions.py or actions/
No
Python functions marked @action() that flows can call
Reported, thanks
Step 5 of 9
PII detection rails detect and mask sensitive data. Use them to protect user privacy. To hold an agent to approved subjects, topic control rails keep conversations inside predefined subject boundaries.
Reported, thanks
Step 6 of 9
PolicyAI checks both user messages and bot replies. Each result also carries a severity from 0 (safe) to 3 (high severity).
PolicyAI as an input rail and as an output rail
Feature
Input rail
Output rail
What it checks
The user's message
The bot's response, before the user sees it
When a policy fails
The message is blocked
The response is swapped for a refusal message
Exam trap One failing policy is enough. An input message is blocked if any policy attached to the tag returns UNSAFE, not only when most do.
Reported, thanks
Step 7 of 9
PolicyAI needs POLICYAI_API_KEY set. With the key in place it is ready to use on both input and output, with no extra code. POLICYAI_TAG_NAME is optional and defaults to prod; set it to use different tags for staging and production.
Reported, thanks
Step 8 of 9
An API error makes the PolicyAI action raise an exception. To choose fail-open or fail-closed behavior, catch that exception with a try-catch block around the action in your own custom flow.
Exam trap Do not expect PolicyAI to fall back quietly when its API fails. The action raises an exception unless your flow catches it.
Reported, thanks
Step 9 of 9
Compliance rails go in the input, output or retrieval section of config.yml.
PII detection rails detect and mask sensitive data to protect privacy.
PolicyAI blocks input or replaces output when any policy in the tag fails.
POLICYAI_TAG_NAME defaults to prod; change it for each environment.
Think first Where does bias and toxicity mitigation fit among the safeguards an agentic AI professional is expected to apply?
Why it matters: Questions ask which safeguard or NVIDIA component helps keep an agent's outputs responsible and safe.
Bias and toxicity mitigation belongs to the Safety, Ethics, and Compliance domain. It sits beside other ethical safeguards and layered safety frameworks. NeMo Guardrails is the NVIDIA component for enforcing safety.
Reported, thanks
Step 2 of 8
Term
Meaning
Ethical safeguards
Protections such as bias detection, privacy preservation and guardrails.
NeMo Guardrails
The NVIDIA component integrated for compliance and safety enforcement.
Layered safety framework
Safety built from several layers, such as filters and escalation protocols.
Safety, Ethics, and Compliance
The domain on running agentic AI responsibly and ethically; it carries 5% of the exam weight.
Reported, thanks
Step 3 of 8
Objective 9.3 belongs to Safety, Ethics, and Compliance. That domain covers the principles and practices that keep agentic AI systems responsible and ethical. It carries 5% of the exam weight.
Reported, thanks
Step 4 of 8
Bias detection is one of the expected ethical safeguards. The other named examples are privacy preservation and guardrails. They appear in the same list as workflows, monitoring and logging, and troubleshooting.
Exam trap Bias and toxicity mitigation is not the objective about filters and escalation protocols; those belong to objective 9.4, layered safety frameworks.
Reported, thanks
Step 5 of 8
NeMo Guardrails is NVIDIA's component for safety enforcement. Objective 7.1 integrates it for compliance and safety enforcement. Suggested readings pair it with NVIDIA NIM to secure generative AI deployments, and with LangChain Templates to build safer LLM apps.
Reported, thanks
Step 6 of 8
The same domain covers layered safety frameworks. Objective 9.4 asks you to deploy them, with filters and escalation protocols as examples. Study it next to bias and toxicity mitigation, since both sit in one domain.
Reported, thanks
Step 7 of 8
Ethically Aligned Design is a suggested reading. Its subtitle states the goal: a vision for prioritizing human well-being with autonomous and intelligent systems.
Reported, thanks
Step 8 of 8
Bias and toxicity mitigation is objective 9.3, in a domain worth 5% of the exam.
Bias detection, privacy preservation and guardrails are the named ethical safeguards.
NeMo Guardrails is NVIDIA's component for compliance and safety enforcement.
Think first How do you layer content safety checks and refusals so unsafe text is caught both coming in and going out?
Why it matters: Questions describe a guardrails setup and ask which model, prompt, parser or fallback makes the safety layer behave as intended.
Content safety in NeMo Guardrails runs as an input rail and an output rail. Each rail asks a safety model about the text and parses its reply into a safe or unsafe verdict. A refusal can then answer in the user's own language.
Reported, thanks
Step 2 of 9
Term
Meaning
Content safety rail
An input or output rail that runs content_safety_check_input or content_safety_check_output.
Output parser
Reads the safety model's reply and judges the content safe or unsafe; is_content_safe is the built-in one.
$model parameter
Names the safety model a flow uses; it must be defined under models in config.yml.
Model type
A model's unique identifier, passed to the input and output rails as a parameter.
Multilingual refusal
A refusal message in the user's detected language, for 9 supported languages.
Reported, thanks
Step 3 of 9
Plug in one of several content safety models. Options include NVIDIA's Nemotron Content Safety model, Meta's Llama Guard 3 and Google's ShieldGemma. Content moderation with Meta's Llama Guard is supported out of the box.
Reported, thanks
Step 4 of 9
Each rail runs its own content safety action. The $model parameter names the safety model both flows use. That model must be defined in the models section of config.yml, where its type is its unique identifier.
The two content safety rails compared
Feature
Input rail
Output rail
Action it runs
content_safety_check_input
content_safety_check_output
Text it judges
The input text
The output text
Safety model
Named by $model
Named by $model
Reported, thanks
Step 5 of 9
Every safety flow needs a prompt and an output parser. If the prompt is missing, an exception is raised when the configuration loads. For the parser, register your own or use the built-in is_content_safe. It treats a reply containing "unsafe" or "yes" as unsafe.
Exam trap A missing safety prompt is not skipped quietly at runtime; loading the configuration raises an exception.
Reported, thanks
Step 6 of 9
Each check returns a boolean saying whether the text is safe. Depending on the safety model, the check can also return a set of policy violations alongside that verdict.
Reported, thanks
Step 7 of 9
Unset max_tokens falls back to 1024 tokens. If max_tokens is too small, a reasoning guard model can spend it all on reasoning. It then returns empty content with finish_reason="length", and the parser typically treats that as unsafe.
Exam trap An empty reply from a guard model is not a pass: after finish_reason="length", the parser typically treats it as unsafe.
Reported, thanks
Step 8 of 9
Multilingual refusals support 9 languages. The detect_language action uses the fast-langdetect library to find the input's language. Any other language falls back to English. With no custom message for a detected language, that language's built-in default is used.
Exam trap An unsupported input language does not break the refusal; English is used as the fallback.
Reported, thanks
Step 9 of 9
Content safety runs as an input rail and an output rail, each with its own action.
Every safety flow needs a defined prompt and an output parser such as is_content_safe.
Unset max_tokens falls back to 1024; a reasoning guard that runs out returns empty content, usually judged unsafe.
Refusals cover 9 languages and fall back to English for any other.
Think first What do you owe when you add, edit, or borrow code in an agent toolkit released under Apache v2.0?
Why it matters: Questions describe a code change and ask which license header, date or notice it needs.
NeMo Agent Toolkit is released under Apache v2.0, and its files carry a header saying so. What you owe depends on the change: a new file, an edited file, or code taken from another project.
Reported, thanks
Step 2 of 10
Term
Meaning
Apache v2.0
The license NVIDIA NeMo Agent Toolkit is released under.
SPDX identifier
A standard tag in the file header; for this toolkit it reads Apache-2.0.
Copyright date range
The years in a file's copyright line, moved to the current year on every edit.
Third-party code
Code copied into the toolkit's tree, as opposed to an external dependency.
Reported, thanks
Step 3 of 10
The toolkit ships under Apache v2.0. New source files, including build scripts, must carry the same license in their header.
Reported, thanks
Step 4 of 10
Every new file gets the Apache v2.0 header. That includes CMake files and other build scripts, not only application code. The header pairs an NVIDIA CORPORATION & AFFILIATES copyright line with the SPDX tag Apache-2.0.
Exam trap Build scripts are not exempt. A new CMake file needs the same Apache v2.0 header as any other new file.
Reported, thanks
Step 5 of 10
The header disclaims all warranties. Unless law or a written agreement requires otherwise, the software is distributed AS IS. No warranties or conditions of any kind are given, express or implied.
Reported, thanks
Step 6 of 10
An edit moves the copyright years to now. When you change an existing file, update the date range in its copyright line so it ends in the current year. A new file and an edited file are handled differently.
Reported, thanks
Step 7 of 10
Borrowed code must be Apache v2.0 compatible. This covers code copied into the tree, not external dependencies. Keep its original license and a URL to where it came from. If you modify it, add the Apache v2.0 license first, then the original license and the URL.
What each kind of code change needs
Situation
What to do
Detail
Add a new file
Add the Apache v2.0 header
Applies to CMake and other build scripts too
Edit an existing file
Update the copyright date range
End the range in the current year
Copy in third-party code
Keep its original license
Add a URL to the original; it must be Apache-compatible
Modify copied third-party code
Apache v2.0 license, then the original
Also keep the URL to the original code
Exam trap Modified third-party code does not drop its original license. It carries Apache v2.0 first, followed by the original license and its URL.
Reported, thanks
Step 8 of 10
Licensing is part of a 5% domain. Safety, Ethics, and Compliance carries 5% of the exam weight. It is about agentic systems that act responsibly, ethically and within legal rules. Objective 9.2 in the same domain adds privacy and enterprise policy guardrails.
Reported, thanks
Step 9 of 10
Suggested reading covers AI regulation. Two items stand out. One is the EU proposal for harmonized AI rules, the Artificial Intelligence Act. The other covers AI and machine learning used as medical device software.
Reported, thanks
Step 10 of 10
New files, including CMake and other build scripts, need the Apache v2.0 header.
Editing a file means updating its copyright years to the current year.
Modified third-party code lists Apache v2.0 first, then its original license and URL.
Safety, Ethics, and Compliance is worth 5% of the exam.
Each topic's Check tested it on its own; this mixes them.
Mixed quiz
Take the Domain 9 quiz
3 questions mixed from every topic in this domain, each answer explained. Mixing topics is harder than one at a time, and it is what the exam does. No account needed; with a free account your answers also build your estimated exam score.
Free to start: the study notes and plan, quizzes, flashcards and the first mock exam, no card needed. A free account keeps your place and saves your quiz scores.