Files
nemo_guardrails_configuration/nemo_guardrails_tracing_project/config/rails/input.co

33 lines
1.1 KiB
Plaintext

define bot refuse to respond
"I apologize, but I cannot provide that information."
define flow check_input_terms
# 🔐 Segurança
$ok_msk = execute mask_pii_action
$ok_tox = execute detectar_toxicidade_action
$ok_oos = execute detectar_out_of_scope_action
# 💰 Regras de negócio
$ok_adj = execute validar_alcada_action(ajuste_valor=$ajuste_valor,limite=$limite)
# 🧠 Contexto
$ok_hist = execute validar_consistencia_historica_action
# 🔁 Conversação
$ok_loop = execute detectar_loop_action
$ok_size = execute medir_tamanho_mensagem_action
$ok_fbk = execute detectar_fallback_action
# Segurança - Adicional
$ok_pinj = execute detectar_prompt_injection_jailbreak_action
$ok_ragsec = execute detectar_rag_injection_context_poisoning_action
$ok_dlex_in = execute detectar_data_leakage_input_action
# 🚨 HARD BLOCK
if not ($ok_msk and $ok_tox and $ok_oos and $ok_adj and $ok_hist and $ok_pinj and $ok_ragsec and $ok_dlex_in)
bot refuse to respond
stop
# ⚠️ SOFT SIGNALS (não bloqueiam)
# loop, tamanho e fallback são monitoramento