fix(library): use bot refuse to respond in gliner PII detection flows - #1671
Conversation
Greptile SummaryThis PR correctly replaces Key changes:
Note: Other PII detection libraries (
|
| Filename | Overview |
|---|---|
| nemoguardrails/library/gliner/flows.co | Replaced bot inform answer unknown with bot refuse to respond in three PII detection flows (input, output, retrieval) - semantically correct change |
| nemoguardrails/library/gliner/flows.v1.co | Same changes as flows.co but for v1 syntax - replaced bot inform answer unknown with bot refuse to respond in three subflows |
| tests/test_gliner.py | Removed custom bot inform answer unknown definitions and updated test assertions to expect "I'm sorry, I can't respond to that." message |
Last reviewed commit: 024aa8d
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
tgasser-nv
left a comment
There was a problem hiding this comment.
Looks good, do you need to add define bot refuse to respond at the top of the Colang flows.co file like the content-safety, topic-safety, etc?
library $ find . -name 'flows.v1.co' -exec grep -Hn 'define bot refuse to respond' {} \;
./jailbreak_detection/flows.v1.co:1:define bot refuse to respond
./llama_guard/flows.v1.co:1:define bot refuse to respond
./content_safety/flows.v1.co:1:define bot refuse to respond
./regex/flows.v1.co:1:define bot refuse to respond
./topic_safety/flows.v1.co:3:define bot refuse to respond
./fiddler/flows.v1.co:1:define bot refuse to respond
./autoalign/flows.v1.co:37:define bot refuse to respond
./self_check/input_check/flows.v1.co:1:define bot refuse to respond
./self_check/output_check/flows.v1.co:1:define bot refuse to respond
./self_check/facts/flows.v1.co:1:define bot refuse to respond
Also could you do a local integration test (instructions are here) to make sure there are no errors and the response is correct?
Description
GLiNER PII detection was using "bot inform answer unknown" which returned a misleading "I don't know" message. Replaced with "bot refuse to respond" to correctly indicate an intentional block, consistent with all other rails.