AWS Comprehend vs LangWatch PII Redaction
LangWatch redacts the PII in your agent traces before it stores them.
The LangWatch PII Redaction Model redacts 97% of personal information, compared to just 83% with AWS Comprehend.
AWS Comprehend
user › hi, it’s maya thornbury here.I live at 48 Larkspur Lane, Dunmore[ADDRESS].Call me on (555) 014-2290[PHONE], please.
agent tracePII left in: 1 of 3
12:04 WARN login jorg.weiss@example.de[EMAIL]12:04 INFO from 203.0.113.42[IP_ADDRESS] as Jörg Weiß12:05 INFO sms +44 20 7946 0958[PHONE]
server logPII left in: 1 of 4
refund({ name: "Priya Raghunathan[NAME]", card: "4111 1111 1111 1111[CREDIT_DEBIT_NUMBER]", note: "ask Dr. Okafor to call" })
tool callPII left in: 1 of 3
83%of PII redacted, middle score across 5 public tests
LangWatch PII Redaction Model
user › hi, it’s maya thornbury[PERSON] here.I live at 48 Larkspur Lane, Dunmore[LOCATION].Call me on (555) 014-2290[PHONE_NUMBER], please.
agent tracePII left in: 0 of 3
12:04 WARN login jorg.weiss@example.de[EMAIL_ADDRESS]12:04 INFO from 203.0.113.42[IP_ADDRESS] as Jörg Weiß[PERSON]12:05 INFO sms +44 20 7946 0958[PHONE_NUMBER]
server logPII left in: 0 of 4
refund({ name: "Priya Raghunathan[PERSON]", card: "4111 1111 1111 1111[CREDIT_CARD]", note: "ask Dr. Okafor[PERSON] to call" })
tool callPII left in: 0 of 3
97%of PII redacted, middle score across 5 public tests
83%AWS Comprehend, PII redacted
97%LangWatch, PII redacted
Synthetic examples, for illustration. The figures are the benchmark’s: PII redacted on the median of the 5 tests every tool ran, rounded.
Build evals without increasing your privacy risk
You keep the valuable information from your agents, with PII redacted automatically before LangWatch stores anything.
- 1Every traceEvery trace your agents send to LangWatch is masked before it is stored.
- 2Traces still readNames become [PERSON], emails [EMAIL_ADDRESS] and cards [CREDIT_CARD], so you still see what happened.
- 3Turn it onAsk us to turn it on for your organization, then pick Strict in Data Privacy.
user › hi, it’s maya thornbury here.my email is maya@example.comcard 4111 1111 1111 1111 for the refund
user › hi, it’s [PERSON] here.my email is [EMAIL_ADDRESS]card [CREDIT_CARD] for the refund
AWS Comprehend and LangWatch PII Redaction Model, side by side
Both tools ran on the same 5,996 public test items.
When Comprehend fits: your text is all in English or Spanish.
AWS Comprehend leaves more PII behind on every test
PII redacted, % of the labelled PII on 5,996 public test items. Higher is better.
Synthetic examples.[PERSON]PII masked[LOCATION]Not PII, masked anywayLangWatch PII Redaction ModelAWS Comprehend
Agent traces
PII left in: 7% vs 10%Conversations and tool calls from AI agents.
PII redacted
92.9%89.6%Business text
PII left in: 2% vs 6%Emails, tickets and forms.
PII redacted
97.8%94.1%Code and logs
PII left in: 14% vs 27%Source code and server logs.
PII redacted
86.3%72.8%Many languages
PII left in: 3% vs 21%Personal data in plain text across many languages.
PII redacted
96.6%78.6%Policy fields
PII left in: 3% vs 17%Everyday text checked against the LangWatch redaction policy: what must be masked and what may stay.
PII redacted
97.5%82.6%Look-alikes
PII left in: 4% vs 20%Real PII mixed with ids and reference numbers that only look like PII.
PII redacted
96.4%80.5%
It leans toward masking: on some tests it also masks text that is not PII. The method shows where.
Every number
Every tool on every test, as PII redacted.
See all numbers
Each cell: PII left in, % with its 95% interval, then text that is not PII masked, %. Lower is better for both. Darker green: less PII left in.
| Tool | Agent traces950 items | Business text990 items | Code and logs1,000 items | Many languages1,769 items | Policy fields787 items | Look-alikes500 items |
|---|---|---|---|---|---|---|
| LangWatch PII Redaction Model | 7.1%left in[5.8, 8.6]5.1% masked by mistake | 2.2%left in[1.5, 2.9]5.4% masked by mistake | 13.7%left in[10.6, 17.3]11.1%† masked by mistake | 3.4%left in[2.9, 3.8]5.3% masked by mistake | 2.5%left in[0.6, 4.9]57.9%† masked by mistake | 3.6%left in[2.2, 5.3]23.3%† masked by mistake55.3% look-alikes masked [51.2, 59.4] |
| AWS Comprehend | 10.4%left in[9.2, 11.7]1.7% masked by mistake | 5.9%left in[4.6, 7.2]3.3% masked by mistake | 27.2%left in[23.6, 31.4]5.9% masked by mistake | 21.4%left in[20.1, 22.7]3.1% masked by mistake | 17.4%left in[9.5, 27.8]21.4%† masked by mistake | 19.5%left in[15.7, 24.0]14.1%† masked by mistake46.8% look-alikes masked [42.8, 51.0] |
| Presidio (default) | 38.9%left in[36.4, 41.2]7.1% masked by mistake | 23.8%left in[21.2, 26.4]5.1% masked by mistake | 49.4%left in[44.2, 54.6]7.9% masked by mistake | 88.6%left in[88.0, 89.1]0.2% masked by mistake | 73.0%left in[63.5, 83.4]2.4% masked by mistake | over 20%*left in7.4% look-alikes masked [5.0, 10.1] |
| spaCy en_core_web_lg | 53.7%left in[50.6, 56.5]6.4% masked by mistake | 51.1%left in[48.5, 53.9]4.1% masked by mistake | 86.9%left in[83.9, 89.9]5.4% masked by mistake | 63.3%left in[62.0, 64.5]31.2%† masked by mistake | 80.6%left in[72.7, 87.1]9.0% masked by mistake | over 20%*left in19.0% look-alikes masked [16.4, 21.7] |
* Presidio (default) and spaCy en_core_web_lg leave more than 20% of the PII in on the look-alike test, so the benchmark gives no exact figure there.
† Masks more than 10% of the text that is not PII on this test: LangWatch PII Redaction Model, AWS Comprehend and spaCy en_core_web_lg.
Method and caveats
| Tool | Text that is not PII masked, % | PII left in, % |
|---|---|---|
| LangWatch PII Redaction Model | 5.4% (tests 5.1% to 57.9%) | 3.4% (tests 2.2% to 13.7%) |
| AWS Comprehend | 3.3% (tests 1.7% to 21.4%) | 17.4% (tests 5.9% to 27.2%) |
| Presidio (default) | 5.1% (tests 0.2% to 7.9%) | 49.4% (tests 23.8% to 88.6%) |
| spaCy en_core_web_lg | 6.4% (tests 4.1% to 31.2%) | 63.3% (tests 51.1% to 86.9%) |
Agent traces
Business text
Code and logs
Many languages
Policy fields
Look-alikes
LangWatch PII Redaction ModelAWS Comprehend
- Tests: the 6 public tests of our PII detection benchmark, 5,996 items of synthetic and public text. Labels come from how each item was built, checked by two blind model passes. Read the results as relative strength, not a production catch rate.
- PII left in: the share of labelled PII entities with any character left unmasked. Look-alikes (one test): the share of look-alike text, such as ids and reference numbers, masked by mistake. Intervals: 95% clustered bootstrap, 2,000 resamples.
- Masked by mistake: the share of characters that are not PII that a tool masks. The benchmark's limit is 10%.
- The charts' marks are each tool's median over the 5 tests every tool was scored on (agent traces, business text, code and logs, many languages and policy fields); the look-alike test has no leak figure for the open tools. The mean of text masked by mistake over the same tests: LangWatch PII Redaction Model 17.0%, AWS Comprehend 7.1%, Presidio (default) 4.5% and spaCy en_core_web_lg 11.2%. One high test pulls a mean up, so the charts use the median.
- LangWatch PII Redaction Model: a build of the production image from 3 Nov 2026, one pass. Its detection thresholds were chosen on a separate dev split before these tests were run. AWS Comprehend: DetectPiiEntities with no confidence threshold, the way you call it by default. The full PII detection benchmark instead tunes a AWS Comprehend threshold on its dev split, so its AWS Comprehend figures differ from these; with that threshold AWS Comprehend leaves as much or more PII in on every test, so the comparison here is the harder one for us. Presidio and spaCy en_core_web_lg: their default settings, from the PII detection benchmark.
- A card shows PII left in, ours then the other tool’s, only where our whole interval is below the other tool’s.
- The hero’s panes show synthetic examples written for this page, not test items. The figures under them are PII redacted on each tool’s median test, rounded to a whole number: 100% minus its median PII left in over the 5 tests every tool was scored on.
- PII redacted, on the cards, the table and the preview: 100% minus PII left in on that test. The folded table and the charts in this method show PII left in, where lower is better.
- Speed is not compared here yet: the tools were not timed on the same machine.
- Datasets, their licences and everything needed to replicate these runs (call settings, frozen sets, harness config) are in the method of the full PII detection benchmark.
- Every other tool, including open models that run on your own GPUs, is on the full PII detection benchmark.
- The model leans toward masking: on 3 of 6 tests it masks more than 10% of the text that is not PII.
- Each mark: a tool's median over the 5 tests every tool was scored on. Lower left is better on both axes. Solid line: no tool is better on both. Dashed line: the benchmark’s 10% limit for text masked by mistake.
- The highest single test: LangWatch PII Redaction Model masks 57.9% of the text that is not PII on policy fields.
- The full PII detection benchmark
This benchmark was created using LangWatch. Sign up to create your own
Questions
Is there an alternative to Amazon Comprehend PII detection?
Yes, the LangWatch PII Redaction Model. It redacts 97% of personal information on the median public test, compared to 83% with Amazon Comprehend.
Does Amazon Comprehend detect PII in non-English text?
Only English and Spanish, according to the AWS docs. On our test with plain text across many languages, AWS Comprehend redacts 79% of the PII and the LangWatch PII Redaction Model redacts 97%.
How do I redact PII from LLM traces?
Ask us to turn it on for your organization, then pick the Strict level of Data Privacy. From then on, LangWatch masks the PII in your traces before it stores them, with markers like [PERSON] in its place.
What does it mask?
About 17 kinds of personal data, such as names, emails, phone numbers, card numbers and national IDs.
Can it run self-hosted?
Yes. With an Enterprise licence, self-hosted LangWatch runs the model in your own cluster from a signed Docker image.
Can I get the original values back?
No. Masking happens before anything is stored and is one-way: what LangWatch keeps is your masked trace, with markers where the PII was.
Is this a production catch rate?
No. The tests are synthetic and public text with model-checked labels. They show how the tools compare on the same text, not how much PII any tool redacts in your traffic.
Why does over-masking matter?
It leans toward masking, because a leak exposes your customer’s data and an extra mask only hides a bit of context. On three of the six tests the model masks more than the benchmark’s limit of text that is not PII; the method shows where.
Why do the AWS Comprehend figures differ from the full PII detection benchmark?
That page tunes a confidence threshold for AWS Comprehend on a dev split. This page calls it with no threshold, the way you call it by default. With the threshold it leaves as much or more PII in on every test, so this is the harder comparison for us.
You do not need to sacrifice privacy and safety for your agent to do great work.
Sign up and ask us to turn it on for your organization, then pick Strict in Data Privacy.