PII Detection
Objective: This guardrail ensures that any given text does not leak any Personally Identifiable Information. Currently, PIIs supported are:- 'EMAIL_ADDRESS' and 'URL'. If PII is detected, it will fail with a reason that anonymises the detected PII entities.
Required Parameters: Response
Interpretation: Higher score indicates the model response has PII exposed.
Code Execution:
Refer Executing tests page to learn about Metric Configuration
Example:
Response: John Doe's MRI results were sent to john.doe@hospital.com.
Metric Output: {‘score’: 1, ‘reason’: ‘John Doe’s MRI results were sent to EMAIL’}
Model and Provider parameter are not required to run Guardrails
Last updated