PII detection
PII Detection leverages the Presidio open source project to detect dozens of different PII categories. Users can use this guardrail to define which types of PII categories they want to block if detected, and it can be applied to both input and model output. The higher the confidence parameter is configured, the more significant indication is required for the algorithm to classify a given text as a PII element, resulting in fewer violations.

Using the SDK
from superwise_api.models.agent.agent import AgentPiiDetectionGuard
restricted_topics_guard = AgentPiiDetectionGuard(
name="Rule name",
tags={"input", "output"}, # A Set containing "input", "output", or both
threshold=0.5,
categories={"CREDIT_CARD"} # Set of PII categories, see https://microsoft.github.io/presidio/supported_entities/.
)
Updated about 16 hours ago