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) | piilite | OpenRedaction 1.1.5 |
|---|---|---|
| Recall: PII fully redacted | 84.3% | 45.7% |
| Precision: detections that were PII | 99.7% | 76.7% |
| Clean sentences wrongly redacted (lower is better) | 6.7% | 86.7% |
| Names | 71.6% | 64.2% |
| Addresses | 50.0% | 0.0% |
How accurate is each PII type?
| Type | piilite recall | OpenRedaction recall |
|---|---|---|
| Aadhaar | 100.0% | 86.7% |
| PAN | 100.0% | 0.0% |
| GSTIN | 100.0% | 0.0% |
| UPI ID | 100.0% | 0.0% |
| Phone (+91) | 100.0% | 20.0% |
| Bank account | 100.0% | 20.0% |
| IFSC | 100.0% | 0.0% |
| Voter ID | 100.0% | 0.0% |
| Driving licence | 100.0% | 0.0% |
| Vehicle number | 100.0% | 0.0% |
| Passport | 100.0% | 100.0% |
| 100.0% | 100.0% | |
| Card number | 100.0% | 100.0% |
| Date of birth | 100.0% | 100.0% |
| OTP | 100.0% | 0.0% |
| API key | 100.0% | 0.0% |
| Name | 71.6% | 64.2% |
| Address | 50.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