ProjectA PII firewall for LLM apps · Milestones · part 3 of 9
Part 3 · Milestones

Structured identifiers

8 min read·12 Oct 2026

Write five recognisers, Aadhaar with its check digit, PAN, Indian mobile, IFSC and UPI id, and get the given tests green. The artifact is piiwall/patterns.py and a patterns row in your results table where Aadhaar precision is above 0.9.

Try first

Take the 195 false positives from milestone 1 (add a --show-fp flag to the CLI if you want them listed, ten lines of code). Sort them into piles by hand: phone numbers, account numbers, 12-digit traps, order ids. Write down which pile each of these ideas would remove: a length check, a first-digit check, a check digit, a look at the surrounding words.

Then, for PAN, which has no check digit, write down the strongest structural test you can think of. Only then read on.

The rest of this project is yours to keep

This project is bought on its own, once, and stays readable afterwards, including the parts added to it later.