You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the script detect_pi_vectorbase.py in python-sdk/rebuff/, the below code snippet assumes higher similarity score implies prompt injection, whereas it seems it should be the opposite i.e. a lower similarity score should mean prompt injection? The same logic is then used in detect_injection method in sdk.py to declare if injection exists.
Also the first if condition equates score and top_score and therefore second if condition would never run?
According to the script
detect_pi_vectorbase.pyinpython-sdk/rebuff/, the below code snippet assumes higher similarity score implies prompt injection, whereas it seems it should be the opposite i.e. a lower similarity score should mean prompt injection? The same logic is then used indetect_injectionmethod insdk.pyto declare if injection exists.Also the first
ifcondition equatesscoreandtop_scoreand therefore secondifcondition would never run?Am I missing something here?
snipped from

detect_pi_vectorbase.pysnipped from

sdk.py