piilite accuracy benchmark

On a held-out set of 480 labelled samples, piilite caught 84.3% of personal data with 99.7% precision. Every ID-style type scored 100%; names and addresses are the hard part.

How does piilite compare with OpenRedaction?

Metric (held-out set)piiliteOpenRedaction 1.1.5
Recall: PII fully redacted84.3%45.7%
Precision: detections that were PII99.7%76.7%
Clean sentences wrongly redacted (lower is better)6.7%86.7%
Names71.6%64.2%
Addresses50.0%0.0%

How accurate is each PII type?

Typepiilite recallOpenRedaction recall
Aadhaar100.0%86.7%
PAN100.0%0.0%
GSTIN100.0%0.0%
UPI ID100.0%0.0%
Phone (+91)100.0%20.0%
Bank account100.0%20.0%
IFSC100.0%0.0%
Voter ID100.0%0.0%
Driving licence100.0%0.0%
Vehicle number100.0%0.0%
Passport100.0%100.0%
Email100.0%100.0%
Card number100.0%100.0%
Date of birth100.0%100.0%
OTP100.0%0.0%
API key100.0%0.0%
Name71.6%64.2%
Address50.0%0.0%

How was this measured?

  • Data: synthetic samples built from templates (forms, Hinglish chat, emails, tickets, résumés, KYC, CSV and JSON rows) with fake values, plus PII-free sentences with prices, UTRs, train numbers, product codes and Hinglish chat.
  • Recall counts labelled values that end up fully redacted; precision counts detections that overlap a labelled value.
  • Honesty: piilite's rules were tuned on two earlier sets (99.9% and 98.3% recall there). The held-out set reported here was written in one pass after tuning and never used to change a rule.
  • OpenRedaction ran as its lite entry with default options; its full class with NER was not scored.

Reproduce it from the repository: npm run eval:all.

Has piilite been tested on real data?

Yes, on a small set: 61 real résumé and profile chunks (17 people) from a hiring platform's AI search index. Every occurrence of each person's name, email, phone number, GitHub and LinkedIn was redacted, with no wrong detections. The text never left the server and is not in the repository.

What are the known limits?

  • Names with no clue around them, and addresses with no label, marker or PIN code, can be missed.
  • Bank account, passport, UAN, ESIC and OTP need a label nearby.
  • The benchmark is synthetic and the real-data check is small; real text will contain other cases.
  • Names of famous people are redacted like anyone else's.

Found a miss? Open an issue with a fake-data example.

Last updated · piilite 0.3.0