Scan a RAG corpus for personal data before you index it
Scanning a RAG corpus for personal data before indexing means flagging passages that look like email addresses, phone numbers, payment cards, credentials or confidential markings, then having a person review the flagged passages before they reach a vector store, because a retriever will return whatever it was given.
How do I check a RAG corpus for personal data before indexing it?
Scan every chunk before it is indexed, flag likely email addresses, phone numbers, card numbers, credentials and confidential markings, and review the highest-scoring passages first. Treat a zero score as nothing matched, not as safe, and decide per file whether flagged text is indexed, redacted or left out.
A retriever returns whatever you gave it
Chunking does not know what a passage means. A public handbook, a scrape log and a thread of investor email all become clean, well-sized chunks, and each one is equally retrievable once it is in the index. The first time anyone notices that a customer's card number or a vendor key was in the folder is often the moment a chatbot quotes it back. The OWASP Top 10 for Large Language Model Applications lists sensitive information disclosure among the risks of LLM systems for exactly this reason.
So the check belongs before indexing, while the corpus is still a set of files you can read. After vectors are written, removal becomes a lifecycle problem, which the deletion test covers. Before they are written, it is a review step, and a review step is cheaper.
What RAG Converter flags in each chunk
RAG Converter scans every passage it emits. According to the project's source and README at the time of writing, the scan looks for email addresses, digit runs shaped like phone numbers, card numbers that pass a Luhn check, credentials that carry a vendor's own prefix or a PEM private key header, and phrases an author writes on purpose, such as "confidential" or "do not distribute". What it found travels with the chunk as `metadata.sensitivity`, a score from 0 to 100, and `metadata.sensitive`, and the manifest summarizes it per file. The JSONL format guide explains where that metadata sits.
The score is a ranking, not a measurement. A leaked key weighs more than one email address, and repeated matches saturate, so a mailing list does not outrank a private key. Its job is to sort a corpus so the worst passages are the ones a person reads first.
It flags and never drops, and zero is not safe
The scan never removes a passage. A false positive that silently deleted text would leave a document incomplete, and an answer built from it would be confidently wrong. Every chunk is emitted, and the decision stays with you. That is deliberate: a converter cannot know whether an email address in a support macro is a public contact or a customer.
Read a score of zero literally. It means none of those shapes matched. It does not mean the passage is safe to publish. The scan does not attempt names, postal addresses or dates of birth, because a detector for those without a model mostly flags ordinary prose. NIST's guide to protecting personally identifiable information (SP 800-122) makes the same point from the other side: whether information is sensitive depends on context, so identification needs judgment, not only pattern matching.
Review flagged passages in a fixed order
Sort chunks by score and start at the top. Secrets first: a credential in a corpus should be rotated at its source, not just excluded from the index, because the file it came from still exists. Then payment card matches, then internal markings, then contact details. For each flagged passage, record one of three decisions: index as is, redact and re-convert, or leave the file out of the corpus.
Keep the decision at file level where you can. If one attachment in a folder is correspondence, removing that file is cleaner than editing a dozen chunks. Write the decision beside the source mapping you already keep for citations, so a later reviewer can see why a passage is or is not in the index.
Run the scan where the files already are
A privacy check that requires uploading the files first has already moved them. In the free tier, conversion and this scan run in the visitor's browser tab as WebAssembly, and the bytes do not leave the device. Browser conversion is a Preview capability, so check its current status on the site before relying on it for a production pipeline. The case for converting locally is in why convert documents locally, and the residency question is in RAG data residency.
Start with one representative folder at the converter, open the manifest, and read the highest-scoring passages before you index anything. The parsing stack comes from Remade with Rust, the memory-safe libraries behind the converter. If you also want the files themselves to stay on hardware you own, MATA's Digital Freedom roadmap is that context, not a claim that it reviews your corpus for you.