Skip to content

detectPii()

PromptScript API


detectPii(text): EvalCode[]

Defined in: eval/src/dataset/pii.ts:203

Find personal data in one dataset value: an email address, a payment card number of 13 to 19 digits that passes the Luhn check, or an IBAN of one of 30 European countries that passes the mod-97 check. Spaces and dashes inside numbers are ignored.

Parameters

text

string

One string value of a row

Returns

EvalCode[]

The PII codes that fired, in email, card, IBAN order