Redactor
The claim
A small model running in the browser fully hid 78% of names in 450 made-up documents with local ID numbers.
Why I built it
People paste payslips and chat logs into AI chats. Removing names and IC numbers by hand is slow and error-prone. I wanted a tool that does it on your own machine, and a number for what it misses.
Browser extensions such as Caviard and Purify already mask details before a prompt is sent. RemoveMyID reads screenshots in the browser. Rampart, the model I use, was built for this job. None publishes a test on local documents, and none checks a MyKad or NRIC number.
Paste text or drop a picture or PDF. Nothing leaves the page.
What I built
Rules test details with a fixed shape. A MyKad number must start with a real birth date and place code. Rampart, a 15 MB model, finds names and addresses. Pictures go through Tesseract first. In text, each detail becomes a placeholder such as [NAME_1], and the page restores the real details in the AI’s reply.
Decisions
- Detection in a background thread. A 100,000-character paste froze the page for about ten seconds. Pausing inside the model code would have changed code already frozen for the test.
- Exports rebuilt from pixels. A box drawn on a PDF can leave the text underneath. The page paints boxes into page images and builds a new PDF.
- Claude reads text only. Claude Haiku 5.5 got the text behind each picture, never the picture. A picture would test its reading too.
How I tested it
I wrote the rules against 150 practice documents, then scored the test set once with the code frozen by a hash. A detail counts as hidden only when every character is covered. Rules alone hid no names. The model did worst on names of Indian origin, at 41%. Claude Haiku 5.5 hid 83% of names. Its run cost $0.03.
What broke
- PDF boxes missed the edges of letters. I first spread each line’s characters evenly, which left parts of values visible. Measuring each glyph’s width fixed it before the test run.
- A second PDF failed offline. Each PDF started a new worker, which fetched its script again. The offline test caught it.
- OCR turned the S of an NRIC into a dollar sign. Rules found 58% of NRIC numbers in screenshots. I left it unfixed, because the fix would be tuned on the test set.
What next
Teach the rules that a dollar sign before seven digits and a letter may be an NRIC, then test on fresh documents. Try a second browser model on Indian names.