Skip to content

Conversation

@mikemckiernan
Copy link
Collaborator

@mikemckiernan mikemckiernan commented Nov 5, 2025

Description

The Nemotron Safety Guard model and container supersede the previous multilingual model and container as well as the English-only NemoGuard ContentSafety model and container.

Review HTML:

Related Issue(s)

Checklist

  • I've read the CONTRIBUTING guidelines.
  • I've updated the documentation if applicable.
  • I've added tests if applicable.
  • @mentions of the person or team responsible for reviewing proposed changes.

Signed-off-by: Mike McKiernan <[email protected]>
The Nemotron Safety Guard model provides content safety
and is multilingual.

Signed-off-by: Mike McKiernan <[email protected]>
@mikemckiernan mikemckiernan added the documentation Improvements or additions to documentation label Nov 5, 2025
@mikemckiernan mikemckiernan self-assigned this Nov 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

Documentation preview

https://nvidia-nemo.github.io/Guardrails/review/pr-1494

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Greptile Summary

This PR consolidates three separate content safety documentation pages into a single unified guide for the Nemotron Safety Guard V3 model. The changes reflect the migration from deprecated models (English-only NemoGuard ContentSafety and multilingual V1) to the newer V3 model.

Key Changes:

  • Deleted nemoguard-contentsafety-deployment.md (English-only model guide)
  • Renamed and updated nemotron-content-safety-multilingual-deployment.md to nemotron-safety-guard-deployment.md
  • Updated model references from V1 to V3 (llama-3.1-nemotron-safety-guard-8b-v3:1.14.0)
  • Simplified prerequisites by consolidating NGC API key requirements
  • Added redirects in conf.py for backward compatibility
  • Updated navigation in index.md to reflect the consolidated structure

Issues Found:

  • Minor grammatical typo: "rails" should be "rail" (line 19)
  • Text encoding issues in Hindi example output (lines 289-299)
  • Stale references to old documentation files exist in examples/ directories and docs/user-guides/advanced/index.rst (outside this PR scope)

Confidence Score: 4/5

  • This PR is safe to merge with minor issues that should be addressed
  • The documentation changes correctly implement the model migration with proper redirects for backward compatibility. However, there are minor issues: a grammatical typo, text encoding problems in example output, and incomplete migration (stale references in other files not updated in this PR). These issues don't break functionality but should be fixed for documentation quality.
  • Pay attention to docs/user-guides/advanced/nemotron-safety-guard-deployment.md for the typo and encoding issues, and verify that stale references outside this PR are tracked for cleanup

Important Files Changed

File Analysis

Filename Score Overview
docs/conf.py 4/5 Added redirects for old documentation URLs to ensure backward compatibility. However, references to old files exist in other parts of the codebase that weren't updated.
docs/user-guides/advanced/nemotron-safety-guard-deployment.md 4/5 Renamed and updated from multilingual deployment guide. Updated model version to V3, simplified prerequisites, fixed grammatical typo, but has minor text encoding issues in example output.

Sequence Diagram

sequenceDiagram
    participant User
    participant OldURL as Old Documentation URLs
    participant Redirects as conf.py Redirects
    participant NewDoc as Nemotron Safety Guard Deployment
    
    User->>OldURL: Access nemoguard-contentsafety-deployment
    OldURL->>Redirects: Check redirect mapping
    Redirects->>NewDoc: Redirect to nemotron-safety-guard-deployment.md
    NewDoc->>User: Display unified V3 documentation
    
    User->>OldURL: Access nemotron-content-safety-multilingual-deployment
    OldURL->>Redirects: Check redirect mapping
    Redirects->>NewDoc: Redirect to nemotron-safety-guard-deployment.md
    NewDoc->>User: Display unified V3 documentation
    
    Note over NewDoc: Single unified guide for<br/>Nemotron Safety Guard 8B V3<br/>replacing two legacy guides
Loading

Additional Comments (1)

  1. docs/user-guides/advanced/index.rst, line 22 (link)

    logic: This references the old deleted file nemoguard-contentsafety-deployment which is now nemotron-safety-guard-deployment. Update the reference or this will create a broken link.

4 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

@mikemckiernan mikemckiernan changed the title Mmck nemotron safety guard docs: Add nemotron safety guard Nov 5, 2025
@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Greptile Summary

This PR adds redirects in docs/conf.py to handle the deprecation of two older documentation files in favor of the new Nemotron Safety Guard deployment guide. The redirects properly map old URLs to the new unified documentation.

Major changes:

  • Added redirect from nemotron-content-safety-multilingual-deployment to nemotron-safety-guard-deployment.html
  • Added redirect from nemoguard-contentsafety-deployment to nemotron-safety-guard-deployment.html

Issue found:

  • Stale references to the old nemoguard-contentsafety-deployment documentation file remain in the codebase (index.rst and two README files in examples/configs/), which should be updated to prevent broken links when accessed directly from those files.

Confidence Score: 3/5

  • This PR is moderately safe to merge but requires follow-up fixes to update stale references
  • The redirects themselves are correctly implemented and will handle web traffic properly. However, there are unresolved stale references in other documentation files that could cause broken links when users navigate from those files. These should be fixed before or immediately after merging.
  • The stale references issue affects docs/user-guides/advanced/index.rst and README files in the examples directory - these need updating to reference the new documentation file.

Important Files Changed

File Analysis

Filename Score Overview
docs/conf.py 3/5 Added redirects from deprecated documentation files to the new Nemotron Safety Guard deployment page. However, stale references to the old files still exist in other parts of the codebase.

Sequence Diagram

sequenceDiagram
    participant User
    participant Sphinx
    participant OldURL1 as nemotron-content-safety-multilingual-deployment
    participant OldURL2 as nemoguard-contentsafety-deployment
    participant NewURL as nemotron-safety-guard-deployment.html
    
    User->>Sphinx: Request old URL (multilingual)
    Sphinx->>OldURL1: Check redirects config
    OldURL1->>NewURL: Redirect to new page
    NewURL-->>User: Return new documentation
    
    User->>Sphinx: Request old URL (contentsafety)
    Sphinx->>OldURL2: Check redirects config
    OldURL2->>NewURL: Redirect to new page
    NewURL-->>User: Return new documentation
Loading

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@mikemckiernan mikemckiernan force-pushed the mmck-nemotron-safety-guard branch from a4d5102 to bc53bab Compare November 5, 2025 13:58
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Greptile Summary

This PR adds redirect rules in Sphinx configuration to handle deprecated documentation paths for the Nemotron Safety Guard. The redirects map old paths (nemoguard-contentsafety-deployment and nemotron-content-safety-multilingual-deployment) to the new unified documentation (nemotron-safety-guard-deployment).

Key changes:

  • Added two redirect entries in docs/conf.py to ensure web users can still access documentation via old URLs

Issues found:

  • Stale hardcoded references to old documentation paths remain in source files (index.rst and example READMEs), which should be updated to point to the new documentation path

Confidence Score: 2/5

  • This PR partially addresses documentation updates but leaves broken internal references that will confuse users
  • The redirect configuration is syntactically correct and will work for web navigation, but the PR leaves multiple stale references in source files (index.rst and example READMEs) that still point to the old documentation paths. This creates an inconsistent documentation experience where internal links will be broken.
  • Pay close attention to the stale references in docs/user-guides/advanced/index.rst, examples/configs/content_safety/README.md, and examples/configs/content_safety_api_keys/README.md that need updating

Important Files Changed

File Analysis

Filename Score Overview
docs/conf.py 2/5 Added redirects for deprecated doc paths, but stale references still exist in source files

Sequence Diagram

sequenceDiagram
    participant User as Documentation User
    participant Browser as Web Browser
    participant Sphinx as Sphinx Doc Server
    participant Redirect as Redirect Config
    participant NewDoc as nemotron-safety-guard-deployment.html
    
    User->>Browser: Access old documentation URL
    Browser->>Sphinx: Request nemoguard-contentsafety-deployment.html
    Sphinx->>Redirect: Check redirects in conf.py
    Redirect->>Sphinx: Return redirect target
    Sphinx->>NewDoc: Redirect to nemotron-safety-guard-deployment.html
    NewDoc->>Browser: Serve new documentation
    Browser->>User: Display updated Nemotron Safety Guard docs
    
    Note over User,NewDoc: Redirects handle web navigation<br/>but source file references still outdated
Loading

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

- Clarify input and output rails
- Update reference in unused (but built) index.rst

Signed-off-by: Mike McKiernan <[email protected]>
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Greptile Summary

Updates documentation to reflect the new Nemotron Safety Guard 8B V3 model that supersedes both the previous multilingual model and the NemoGuard ContentSafety model. Renames documentation file and adds redirects from old URLs.

Key Changes:

  • Renamed nemotron-content-safety-multilingual-deployment.md to nemotron-safety-guard-deployment.md
  • Updated container references from V1 to V3 (llama-3.1-nemotron-safety-guard-8b-v3:1.14.0)
  • Added redirects in conf.py for both old documentation URLs
  • Simplified prerequisites by consolidating NGC API key usage for both NGC downloads and build.nvidia.com access
  • Updated model configuration to use content_safety instead of multilingual_content_safety

Issues Found:

  • Critical: docs/user-guides/advanced/index.rst:22 references wrong filename (nemotron-content-safety-multilingual-deployment instead of nemotron-safety-guard-deployment) which will break the documentation build
  • Non-critical: Hindi text rendering issues in example output (already noted in previous comments)
  • Non-critical: Stale references remain in example README files (already noted in previous comments)

Confidence Score: 1/5

  • This PR has a critical documentation build error that must be fixed before merging
  • The incorrect filename reference in index.rst will cause the Sphinx documentation build to fail when it tries to include a non-existent file. This is a blocking issue that prevents the documentation from building successfully.
  • Critical attention required for docs/user-guides/advanced/index.rst - contains incorrect filename reference that will break the build

Important Files Changed

File Analysis

Filename Score Overview
docs/user-guides/advanced/index.rst 1/5 Contains incorrect file reference that will break documentation build - references nemotron-content-safety-multilingual-deployment instead of nemotron-safety-guard-deployment
docs/user-guides/advanced/nemotron-safety-guard-deployment.md 3/5 New documentation file with good content structure, but contains Hindi text rendering issues in example output

Sequence Diagram

sequenceDiagram
    participant User
    participant Guardrails as NeMo Guardrails
    participant SafetyGuard as Nemotron Safety Guard NIM
    participant LLM as Llama 3.3 70B (build.nvidia.com)
    
    User->>Guardrails: Send request (multilingual)
    Guardrails->>SafetyGuard: Check input safety
    SafetyGuard-->>Guardrails: Safety assessment (safe/unsafe)
    
    alt Input is unsafe
        Guardrails-->>User: "I'm sorry, I can't respond to that."
    else Input is safe
        Guardrails->>LLM: Forward request
        LLM-->>Guardrails: Generate response
        Guardrails->>SafetyGuard: Check output safety
        SafetyGuard-->>Guardrails: Safety assessment
        
        alt Output is unsafe
            Guardrails-->>User: "I'm sorry, I can't respond to that."
        else Output is safe
            Guardrails-->>User: Return response
        end
    end
Loading

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Greptile Summary

This PR consolidates documentation for NVIDIA's safety guard models by replacing two older documentation files with a single unified page for the Llama 3.1 Nemotron Safety Guard 8B V3.

Key Changes:

  • Deleted nemoguard-contentsafety-deployment.md (English-only model)
  • Renamed and updated nemotron-content-safety-multilingual-deployment.md to nemotron-safety-guard-deployment.md
  • Updated container references from V1 multilingual model to V3 unified model
  • Added redirects in docs/conf.py to maintain backward compatibility
  • Updated toctree references in docs/index.md and docs/user-guides/advanced/index.rst

Issues Found:

  • Stale references remain in examples/configs/content_safety/README.md and examples/configs/content_safety_api_keys/README.md that still point to the deleted nemoguard-contentsafety-deployment.md file (lines 3 and 10 in both files)

Confidence Score: 3/5

  • This PR has critical stale references in example README files that will break documentation links
  • The documentation refactoring is well-structured with proper redirects in place, but the PR leaves broken links in example README files that reference the deleted documentation. These stale references will confuse users and break navigation, requiring fixes before merge.
  • Pay close attention to examples/configs/content_safety/README.md and examples/configs/content_safety_api_keys/README.md - both files contain stale references that must be updated

Important Files Changed

File Analysis

Filename Score Overview
docs/conf.py 4/5 Adds redirects from old documentation paths to new nemotron-safety-guard-deployment.html page
docs/user-guides/advanced/index.rst 5/5 Updates toctree reference from old nemoguard-contentsafety-deployment to new nemotron-safety-guard-deployment
docs/user-guides/advanced/nemotron-safety-guard-deployment.md 4/5 Renames and updates documentation from multilingual model v1 to unified safety guard v3 with updated container references

Sequence Diagram

sequenceDiagram
    participant User
    participant Docs as Documentation Site
    participant Redirect as Redirect Handler
    participant NewPage as nemotron-safety-guard-deployment.html
    participant OldContent as Deprecated Pages

    Note over OldContent: nemoguard-contentsafety-deployment<br/>nemotron-content-safety-multilingual-deployment
    
    User->>Docs: Access old URL paths
    Docs->>Redirect: Check redirects in conf.py
    Redirect->>NewPage: Redirect to unified page
    NewPage->>User: Display consolidated documentation
    
    Note over NewPage: Uses Llama 3.1 Nemotron<br/>Safety Guard 8B V3<br/>(replaces V1 multilingual)
    
    User->>Docs: Follow toctree links
    Docs->>NewPage: Load from index.rst/index.md
    NewPage->>User: Display updated content
Loading

Additional Comments (4)

  1. examples/configs/content_safety/README.md, line 3 (link)

    logic: Stale reference - should point to nemotron-safety-guard-deployment instead

  2. examples/configs/content_safety/README.md, line 10 (link)

    logic: Stale reference - should point to nemotron-safety-guard-deployment instead

  3. examples/configs/content_safety_api_keys/README.md, line 3 (link)

    logic: Stale reference - should point to nemotron-safety-guard-deployment instead

  4. examples/configs/content_safety_api_keys/README.md, line 10 (link)

    logic: Stale reference - should point to nemotron-safety-guard-deployment instead

1 file reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

@miyoungc miyoungc merged commit b3b6237 into develop Nov 5, 2025
10 checks passed
@miyoungc miyoungc deleted the mmck-nemotron-safety-guard branch November 5, 2025 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants