arXiv:2611.07633cs.AINov 2026

Manuscript Offprint

arXiv:2611.07633

Redacting Personal Data: A Speed and Accuracy Comparison of Regex, Presidio and Hybrid Designs

Sai Yashwant, Manoj Kumar Gondimalla, Arjun Sharma, Shubham

Sai Yashwant

AI Product & Platform Head

ManpowerGroup Services India Pvt. Ltd.

sai.yashwant@manpowergroup.com

Manoj Kumar Gondimalla

AI Operations Lead

ManpowerGroup Services India Pvt. Ltd.

manojkumar.gondimalla@manpowergroup.com

Arjun Sharma

AIOps Engineer

ManpowerGroup Services India Pvt. Ltd.

arjun.sharma@manpowergroup.com

Shubham

Data Scientist

ManpowerGroup Services India Pvt. Ltd.

shubham.kumar@manpowergroup.com

ABSTRACT

Many enterprise projects now pass free text to large language models (LLMs), and that text often contains personally identifiable information (PII) such as names, phone numbers, email addresses, home addresses and dates of birth. Once a prompt is sent, this data is copied into provider systems, application logs and observability traces. Redacting PII before the call is an obvious control, yet teams seldom have numbers on what it costs in latency or what it lets through. This paper compares four redaction designs that any LLM pipeline can adopt: a pure regular-expression (regex) redactor, Microsoft Presidio running on a spaCy model, a hybrid in which Presidio finds only person names while regex handles structured identifiers, and a fast hybrid that calls spaCy's named-entity component directly. All four share a known-entity rule, which removes the person the system already knows it is handling, and a consistent placeholder scheme, so the LLM can still tell one person from another after redaction. We evaluate the designs on a sample workflow, which we call ProfileAssist, that turns resumes into structured profiles, using 100 synthetic resumes (523 characters on average, with 900 PII values and 600 business terms that must survive). Regex ran at a 0.20 ms median but caught only 88.9% of PII, because it cannot find names that are not known in advance, such as the references listed in a resume. Presidio, hybrid and fast hybrid each caught 100% of PII and kept 100% of business terms, at median latencies of 37.59 ms, 30.23 ms and 13.48 ms. Measured against a 9,120 ms median LLM call, even the slowest option adds only 0.41% to the request. We therefore recommend the fast hybrid as a default for LLM pipelines that handle personal data, with regex kept as a safety net rather than as the only control.

Keywords PII redaction, Microsoft Presidio, regular expressions, named entity recognition, spaCy, LLM privacy, LLMOps, data minimization

1 Introduction

Large language models are now part of many enterprise projects. Teams use them to summarize documents, classify requests, extract fields from free text and draft replies. In a large share of these projects the input contains personally identifiable information (PII): a support ticket names the customer and gives a phone number, an HR document lists an employee's address, and a resume holds a person's contact details along with the names of their references. The value of the LLM is real, but so is the risk, because every prompt that carries PII spreads it further.

That data does not stay in one place once the call is made. It travels to the model provider, it is written into application logs, and in a well-run LLMOps setup it is also captured by an observability platform, where prompts and responses are stored as traces for debugging and evaluation. Each copy is one more place where personal data must be protected, retained and finally deleted under rules such as the GDPR [1], the CCPA [2] and India's Digital Personal Data Protection Act [3]. Research on training-data extraction and PII leakage shows that what goes into a language model, or into a dataset later used for tuning, can come back out [4,5]. For this reason the OWASP Top 10 for LLM applications lists sensitive information disclosure among the leading risks of LLM systems [6].

The simplest defense is to redact PII before it ever reaches the model. Here, however, engineering teams face a familiar trade-off. Regular expressions are fast and predictable, and they handle structured identifiers such as emails and phone numbers well, but they cannot recognize a name they have never seen. Machine-learning tools such as Microsoft Presidio [7], which relies on spaCy named entity recognition (NER) [8], can find unseen names, yet they cost more CPU time and take seconds to load. In a request path that already waits on an LLM, it is not obvious whether that extra cost matters, and so teams often decide on instinct rather than on measurement.

This paper replaces that instinct with numbers. We compare four redaction designs that can be placed in front of any LLM call: regex alone, Presidio, a hybrid of Presidio names plus regex, and a fast hybrid that uses only spaCy's NER component plus regex. All four reuse one redaction core with a known-entity rule and consistent placeholders. We report accuracy both as PII recall and as business-term retention, so that over-redaction is measured as well as leakage, and we set load time and latency against the median latency of an LLM call. We then turn the results into practical guidance for any team that runs LLM pipelines over personal data.

To keep the measurements concrete, we ground them in a sample workflow that we call ProfileAssist. In ProfileAssist, a resume is passed to an LLM that returns a structured profile with skills, job titles and a short summary. We chose resumes because they are among the densest sources of PII a company handles, and because they show a pattern that recurs in many other projects. The text is about one person the system already knows, yet it also mentions other people, such as references, whom the system does not know. The same pattern appears in support tickets that mention agents, in case notes that mention relatives, and in email threads that copy colleagues. The example, in other words, uses resumes, but the problem is general.

ProfileAssist and all names in this paper are illustrative. All benchmark text is synthetic, and the only measured external figure is the median LLM latency, taken from traces of a representative LLM workload.