rohankaran commited on
Commit
1696acd
1 Parent(s): 97fb0a8

Add sensitive data detection flow in bot configuration

Browse files

A new flow has been added to the chatbot's configuration for detecting sensitive data from the bot's output. This enables the bot to prevent replying when it detects any potentially sensitive data, thus enhancing the bot-user interaction security.

Files changed (1) hide show
  1. nemoguardrails_config/bot_flows.co +7 -0
nemoguardrails_config/bot_flows.co CHANGED
@@ -12,5 +12,12 @@ define flow self check output
12
  bot refuse to respond
13
  stop
14
 
 
 
 
 
 
 
 
15
  define bot refuse to respond
16
  "⚠️ I'm sorry, I can't respond to that. (This message was blocked by the guardrail)"
 
12
  bot refuse to respond
13
  stop
14
 
15
+ define flow detect sensitive data on output
16
+ $has_sensitive_data = execute detect_sensitive_data(source="output", text=$bot_message)
17
+
18
+ if $has_sensitive_data
19
+ bot refuse to respond
20
+ stop
21
+
22
  define bot refuse to respond
23
  "⚠️ I'm sorry, I can't respond to that. (This message was blocked by the guardrail)"