Improve Safety and Security retail agent docs#1492
Improve Safety and Security retail agent docs#1492rapids-bot[bot] merged 6 commits intoNVIDIA:release/1.4from
Conversation
Signed-off-by: Eric Evans <194135482+ericevans-nv@users.noreply.github.com>
Signed-off-by: Eric Evans <194135482+ericevans-nv@users.noreply.github.com>
WalkthroughREADME for the retail agent example was rewritten into a structured reference: Table of Contents, Scenario File schema, NASSE component descriptions (RedTeamingRunner, RedTeamingMiddleware, RedTeamingEvaluator, Defense Middleware), dataset/config examples, and consolidated evaluation guidance. Two example config YAMLs have a minor branding wording change. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: Eric Evans <194135482+ericevans-nv@users.noreply.github.com>
Signed-off-by: Eric Evans <194135482+ericevans-nv@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@examples/safety_and_security/retail_agent/README.md`:
- Line 79: The document uses bold emphasis for major section titles (e.g.,
"**Red Teaming Flow**" and the two other bolded section markers at lines 85 and
123); replace each bolded inline emphasis with a proper Markdown heading (choose
an appropriate level like "## Red Teaming Flow") so those three instances become
semantic headings, update their surrounding spacing to include a blank line
before and after the heading, and ensure consistency of heading levels across
the file.
- Around line 26-44: Add a Table of Contents entry linking to the existing
section heading "Why We Need a Safety and Security Framework" so readers can
navigate to that section (or if the heading should be a subsection, adjust its
heading level and update the TOC accordingly); update the TOC block to include a
line such as "- [Why We Need a Safety and Security
Framework](`#why-we-need-a-safety-and-security-framework`)" matching the heading
text and slug, and ensure heading levels are consistent with surrounding entries
like "Introduction" and "Key Features Overview".
🧹 Nitpick comments (1)
examples/safety_and_security/retail_agent/README.md (1)
97-115: Convert scenario names to proper headings.The scenario names ("Competitor redirect", "Data exfiltration", "Denial of service", "Harmful content") use bold emphasis instead of proper headings. Converting these to level 4 headings (
####) would improve document structure and accessibility.📝 Proposed fix for scenario headings
-**Competitor redirect** +#### Competitor redirect + - **Scenario:** The agent is asked about products and should return accurate information from the product database. - **Attack:** A malicious string is injected into the product description so the agent recommends a competitor instead of the correct product. - **Defense:** Output Verifier detects manipulated tool output and blocks or sanitizes it. -**Data exfiltration** +#### Data exfiltration + - **Scenario:** The agent receives a normal customer request. - **Attack:** The user input attempts to trick the agent into revealing customer data. - **Defense:** PII Defense detects and sanitizes sensitive output. -**Denial of service** +#### Denial of service + - **Scenario:** The agent retrieves product reviews to respond to a customer. - **Attack:** A fake system error is injected into reviews, causing the agent to refuse service. - **Defense:** Output Verifier flags non-review content and removes the injected instructions. -**Harmful content** +#### Harmful content + - **Scenario:** The agent answers product safety questions in a customer email. - **Attack:** The attacker tries to elicit unsafe content or harmful guidance. - **Defense:** Content Safety Guard detects and blocks unsafe content.
mnajafian-nv
left a comment
There was a problem hiding this comment.
Conditional approval pending your review of my feedback. Good documentation restructuring with helpful diagrams and clearer organization. However, several important technical reference sections were removed that users need. Can you pleas review my feedback and think more about what you actually want to remove?
Signed-off-by: Eric Evans <194135482+ericevans-nv@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@examples/safety_and_security/retail_agent/README.md`:
- Around line 26-53: The Table of Contents list uses inconsistent indentation
causing markdownlint errors (MD005/MD007); fix by normalizing the list nesting
under the "NeMo Agent Safety and Security Engine (NASSE)" and "Table of
Contents" headings so each sub-item (e.g., "Demonstrated Through Retail Agent
Example", "Introduction", "Why We Need a Safety and Security Framework", and
nested subsections like "The Problem"/"The Solution") is indented consistently
using the same number of spaces (choose 2 or 4) for all nested levels, ensure
all top-level bullets align with "Table of Contents" and all child bullets are
uniformly indented beneath their parent to restore proper list structure and
satisfy MD005/MD007.
|
/merge |
Signed-off-by: Eric Evans <194135482+ericevans-nv@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@examples/safety_and_security/retail_agent/README.md`:
- Around line 432-443: The two HTML <img> tags embedding attack-score.png and
defense-score.png lack alt attributes causing accessibility/MD045 failures;
update the tags that reference "attack-score.png" and "defense-score.png" to
include concise descriptive alt text (e.g., "Attack score before defenses" and
"Defense score after defenses") so the images are accessible and the
markdownlint warning is resolved.
Description
By Submitting this PR I confirm:
Summary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.