Redakto - The Incognito Tab for LLMs
An open-source tool that strips names and addresses before text hits an LLM, without hurting downstream accuracy
Redakto is an open-source tool that automatically detects and removes or replaces personally identifiable information (PII) in text before it is sent to a large language model (LLM). The authors tested it on emails, clinical notes and legal documents, and packaged it as a web app, REST APIs, and a Model Context Protocol (MCP) server that LLM assistants can call directly. Across two downstream tasks, redacted text performed about as well as the original, unredacted text.
METAL MEDIA explanatory visual
An open-source tool that strips names and addresses before text hits an LLM, without hurting downstream accuracy
- 01On German emails (CodE Alltag) and legal documents (LER), PII-detection accuracy (macro F1) reached about 0.95, while the smaller clinical corpus (GraSCCo) scored lower - a gap the authors attribute to limited training data rather than model architecture
- 02Three redaction strategies were compared: replacing entities with semantic placeholders, random masking, and generic masking; semantic placeholder masking preserved original performance best
- 03Utility was directly tested on two tasks: classifying a doctor's intent in medical dialogue turns, and predicting whether a human rights violation occurred in European Court of Human Rights case texts
- 04Even in documents packed with private entities (roughly 86 on average, sometimes several hundred), performance drops were mainly explained by document length, not by the redaction itself
- 05The system runs a Streamlit interface with a FastAPI backend, is containerized with Docker and Kubernetes, and both code and models are released openly
What they did
- On German emails (CodE Alltag) and legal documents (LER), PII-detection accuracy (macro F1) reached about 0.95, while the smaller clinical corpus (GraSCCo) scored lower - a gap the authors attribute to limited training data rather than model architecture
- Three redaction strategies were compared: replacing entities with semantic placeholders, random masking, and generic masking; semantic placeholder masking preserved original performance best
- Utility was directly tested on two tasks: classifying a doctor's intent in medical dialogue turns, and predicting whether a human rights violation occurred in European Court of Human Rights case texts
- Even in documents packed with private entities (roughly 86 on average, sometimes several hundred), performance drops were mainly explained by document length, not by the redaction itself
- The system runs a Streamlit interface with a FastAPI backend, is containerized with Docker and Kubernetes, and both code and models are released openly
| Model | Prec | Rec | F1 |
|---|---|---|---|
| xlm-roberta-large | 0.9442 ±0.0 | 0.9358 ±0.0 | 0.9399 ±0.0 |
| gelectra-large | 0.9433 ±0.0 | 0.9371 ±0.0 | 0.9401 ±0.0 |
| bert-base-german-cased | 0.9251 ±0.0 | 0.9160 ±0.0 | 0.9204 ±0.0 |
| Model | Prec | Rec | F1 |
|---|---|---|---|
| xlm-roberta-large | 0.94 | 0.95 | 0.94 |
| gelectra-large | 0.95 | 0.96 | 0.95 |
| bert-base-german-cased | 0.95 | 0.94 | 0.95 |
| Version | Text |
|---|---|
| Original | miss edwards is here for evaluation of facial pain this is a 54-year-old female |
| Semantic Label Masking | miss [PERSON] is here for evaluation of facial pain this is a [DATE] female |
| Random Masking | miss lhyZXSX is here for evaluation of facial pain this is a vejE4fPRUxkG female |
| Generic Masking | miss XXXX is here for evaluation of facial pain this is a XXXX female |
| Redaction Strategy | xlm-roberta-large | bert-large-cased | electra-large-discri. |
|---|---|---|---|
| No Redaction | 0.86 ±0.01 | 0.85 ±0.01 | 0.84 ±0.01 |
| Semantic Label Masking | 0.86 ±0.01 | 0.84 ±0.01 | 0.82 ±0.02 |
| Random Masking | 0.85 ±0.01 | 0.82 ±0.02 | 0.82 ±0.01 |
| Generic Masking | 0.84 ±0.02 | 0.85 ±0.01 | 0.82 ±0.02 |

Why it matters
Uncertainty over EU privacy rules has been slowing adoption of LLMs in hospitals, legal offices and public administration, so empirical evidence that redaction doesn't hurt task quality directly addresses that barrier. Because it's open source and self-hostable, developers and researchers can adopt privacy-preserving LLM workflows without sending sensitive data to third-party services.
Terms in this paper
- PII (personally identifiable information) · Details like names, addresses or birthdates that can identify a specific person
- LLM (large language model) · An AI model trained on huge amounts of text to understand and generate language
- pseudonymization · Replacing personal data with substitute identifiers instead of deleting it, keeping the text readable
- Model Context Protocol (MCP) · A standard interface letting LLM assistants and agents call external tools directly
- macro F1 · An accuracy measure averaged evenly across categories, so no single category dominates the score
Figures we cannot republish
- Figure 5: Entity density wise performance (Macro-F1) comparison for different redaction strategies (electra-large-discriminator)
Original abstract (English)
Large Language Models (LLMs) are being increasingly used in everyday applications. A major challenge in the context of LLMs or Artificial Intelligence (AI) in general is to ensure privacy when using them, meaning that personally identifiable information (PII) is removed from any text that enters an LLM. These challenges have become more urgent with novel EU legislation. Uncertainty around LLM usage with respect to privacy concerns in EU countries can be a major blocker for the speed of innovation and transfer from research to applications. Here we present \textbf{Redakto}, a tool that can be used for anonymizing text prior to feeding it to an LLM or other downstream text processing. We provide state-of-the-art functionalities for both redaction of PII but also when used for pseudonymization. These functionalities are exposed such that they can easily be used by end-users, through the Redakto web application, and by developers and researchers, via REST APIs and model context protocol (MCP) hooks. The implementation is fully open source, requires modest compute resources, and can be readily deployed on local hardware. In contrast to prior work and in order to better assess the quality of the anonymized texts, we conduct extensive empirical evaluations on textual data from legal and medical domain with respect to both privacy and utility of the redacted texts. Our empirical results demonstrate that the texts anonymized with different redaction strategies achieve utility scores on par with the original texts, suggesting that anonymization with Redakto can be used for LLM tasks without substantial negative impact for the tasks we explored.
Read on arXivLatest papers
- SWE-bench Science: Can Coding Agents Resolve Engineering Tasks in Science?AI coding agents were tested on fixing real scientific software, and even the best one failed more than half the time
- FlashPrefill V2: Block-Sparse Prefill Attention for Long-Context LLM ServingMaking sparse attention fast enough and accurate enough for real LLM serving, not just papers
- PolicyGuide: From Guarding One Action to Guiding the Whole Workflow for Policy-Compliant LLM AgentsMaking customer-service AI agents follow the whole procedure, not just avoid one bad action
- EXIMO: VLM Guided Exploration of VLA PoliciesTeaching a robot new chores without human teleoperation, by letting a chatty AI supervise it
- EnvHarness: Awakening Static Worlds for Agent LearningInstead of building new training worlds from scratch, this work adds a plug-in layer that reshapes existing ones around each agent's actual weaknesses
- Bounded Sovereignty and the Control Tax: Pricing AI Oversight When the Deployer Does Not Own the ModelCompanies that rent AI instead of owning it can only do half of AI safety oversight
- Beyond Imitation: Filtering On-Policy Distillation by Reasoning ProgressA fix for AI models that get penalized by their teacher even when they're reasoning correctly
- PersonalBench: Measuring the Authorship Gap in LLM PersonalizationAI can be prompted to write 'like someone,' but its own voice never fully disappears
Latest from METAL MEDIA
Figures: Saurav Kumar Saha et al., arXiv:2608.18260, CC BY-SA 4.0