rohankaran's picture
Add sensitive data detection flow in bot configuration
1696acd
raw
history blame contribute delete
No virus
561 Bytes
define flow self check input
$allowed = execute self_check_input
if not $allowed
bot refuse to respond
stop
define flow self check output
$allowed = execute self_check_output
if not $allowed
bot refuse to respond
stop
define flow detect sensitive data on output
$has_sensitive_data = execute detect_sensitive_data(source="output", text=$bot_message)
if $has_sensitive_data
bot refuse to respond
stop
define bot refuse to respond
"⚠️ I'm sorry, I can't respond to that. (This message was blocked by the guardrail)"