-
Notifications
You must be signed in to change notification settings - Fork 523
Add Colang v2 example for sensitive data detection #1301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Add Colang v2 example for sensitive data detection #1301
Conversation
d6a2949
to
cfd248e
Compare
cfd248e
to
b8b44c3
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1301 +/- ##
==========================================
Coverage ? 70.20%
==========================================
Files ? 161
Lines ? 16123
Branches ? 0
==========================================
Hits ? 11319
Misses ? 4804
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new Colang v2 example configuration for sensitive data detection using Presidio, enabling redaction of sensitive information from user inputs and bot outputs. The changes include necessary global variable declarations to support the data masking functionality.
Key Changes
- Added global variable declarations (
$user_message
,$bot_message
,$relevant_chunks
) to enable proper data flow for masking operations - Created a complete Colang v2 example configuration with input/output rails for sensitive data detection
- Fixed a typo in a comment ("RETRIVAL" → "RETRIEVAL")
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
nemoguardrails/library/sensitive_data_detection/flows.co | Added global variable declarations and fixed spelling error |
examples/configs/sensitive_data_detection_v2/main.co | Core flow configuration for Colang v2 example |
examples/configs/sensitive_data_detection_v2/flows.co | Input/output rail definitions for sensitive data masking |
examples/configs/sensitive_data_detection_v2/config.yml | Configuration file with model settings and detection parameters |
examples/configs/sensitive_data_detection_v2/README.md | Documentation for the new example configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Description
This PR adds a new example configuration for
sensitive_data_detection
using Colang v2 flows:examples/configs/sensitive_data_detection_v2/
It also adds the necessary
global
declarations to allow the rails to output redacted data (however, see the related issue below).Related Issue(s)
Mentions
@drazvan — it looks like you’ve contributed to this package along with [email protected]. If you could take a look, that would be great!
Checklist