rizzo-pii: A Local-First AI Privacy Guard for LLMs

Aug 7, 2026

Introduction

The convenience of using powerful cloud-based LLMs like ChatGPT or Claude for summarizing contracts or legal documents comes with a significant risk: data privacy. Every time a user pastes sensitive text, they are sending personally identifiable information (PII) to third-party servers, creating compliance and security vulnerabilities. A new open-source project, rizzo-pii, offers an elegant solution to this problem. It’s a local-first privacy guard that anonymizes your documents on your own machine before they are sent to an LLM, and then restores the original data in the response, ensuring sensitive information never leaves your control.

What Is rizzo-pii?

rizzo-pii is an open-source tool that provides local, reversible PII anonymization specifically designed for professionals who handle sensitive documents. Developed by the Rizzo AI Academy, the project features a lightweight, CPU-friendly AI model that detects 22 categories of personal data, with a special focus on Italian legal identifiers that are not covered by other open models. The core idea is to flip the traditional privacy trade-off: instead of giving up the powerful frontier LLM, you take the sensitive data out of the equation. Rizzo-pii runs entirely on the user’s local machine, where it scans text, replaces each piece of PII with a stable, type-aware placeholder (like [FULLNAME_1] or [CF_1]), and saves the mapping locally. Only this anonymized text is sent to the cloud. When the LLM’s response comes back containing these placeholders, a final local pass restores the original values, providing a secure workflow for using powerful AI on sensitive data.

Why rizzo-pii Matters

For professionals in fields like law, finance, and accounting, the need to use cutting-edge AI tools is often in direct conflict with their duty to protect client data under regulations like GDPR. Before a tool like rizzo-pii, they faced a difficult choice: risk sending sensitive data to the cloud, rely on weaker local models that can’t handle complex legal reasoning, or forgo the benefits of AI altogether. Rizzo-pii matters because it provides a practical and secure middle path. Its most significant contribution is its specialized focus on non-English, domain-specific PII, particularly Italian legal identifiers like the ‘codice fiscale’ and ‘partita IVA’, which general-purpose tools often miss. By providing a highly accurate, CPU-runnable model that understands these nuances, rizzo-pii empowers a whole class of professionals who were previously unable to safely leverage cloud LLMs. Furthermore, the project includes a ready-to-use desktop application, removing the need for any technical setup and making state-of-the-art privacy accessible to non-developers.

Key Features

  • Local-First Anonymization: The entire PII detection and replacement process runs on your local CPU. The model is lightweight, requiring less than 1.2 GB of RAM, and does not need a GPU. This ensures that sensitive information is never exposed to the network.
  • Reversible Workflow: rizzo-pii generates a local dictionary that maps the real PII values to stable placeholders. After the cloud LLM processes the anonymized text, this dictionary is used to seamlessly restore the original data in the final response.
  • Specialized Italian PII Detection: The underlying model, rizzo-pii:0.3B, is specifically trained to recognize 22 categories of PII with a strong focus on Italian legal and financial identifiers. It achieves perfect or near-perfect scores on entities like ‘codice fiscale’ and ‘dati catastali’ that other models overlook.
  • Hybrid Detection Engine: The system uses a sophisticated hybrid approach for maximum accuracy. A fine-tuned token-classification model (based on mmBERT) identifies contextual PII like names, while a deterministic network of regular expressions and checksum validators ensures mathematical certainty for structured identifiers like IBANs and credit card numbers.
  • Ready-to-Use Desktop Application: For non-technical users, the project provides standalone installers for Windows, macOS, and Linux. These applications bundle the model and Python backend into a simple user interface built with Tauri, requiring no setup or Python knowledge.
  • Open and Extensible: The entire project, including the model, training code, and dataset sources, is open-source under the Apache 2.0 license. This allows developers to inspect the logic, retrain the model on their own data, or integrate the library into their own Python applications.

How rizzo-pii Compares

rizzo-pii distinguishes itself by being a specialized, local-first application focused on high accuracy for a specific domain, rather than a general-purpose enterprise framework.

Aspect rizzo-pii Microsoft Presidio Simple Regex
Primary Goal Local, reversible anonymization for LLM workflows Enterprise-grade PII detection and anonymization pipeline Pattern matching for structured data
Core Technology Fine-tuned mmBERT model + Regex/Checksums spaCy NER models + Regex Recognizers Regular Expressions
Ease of Use Very High (Standalone desktop app) Medium (Requires Python integration) Low (Requires custom code)
Domain Specialization High (Italian legal text) General purpose, extensible None
Contextual Awareness High (via neural model) Medium (via spaCy NER) None
Offline Capability Yes, by design Yes Yes

rizzo-pii vs. Microsoft Presidio: Presidio is a powerful and highly modular framework for building enterprise-scale PII pipelines. Its strength lies in its extensibility and integrations. However, `rizzo-pii` is superior for its target audience for two reasons. First, its specialized model for Italian legal text provides out-of-the-box accuracy on domain-specific identifiers that would require custom recognizers in Presidio. Second, `rizzo-pii` is provided as a ready-to-use desktop application, making it immediately accessible to lawyers or accountants, whereas Presidio is a developer tool that requires coding to implement.

rizzo-pii vs. Simple Regex: A regex-only approach is effective for perfectly structured data like emails or IBANs, and in fact, `rizzo-pii` uses this method as part of its hybrid engine. However, regex fails completely on contextual PII. It cannot reliably distinguish between a person’s name, a company name, or a street name. The neural model component of `rizzo-pii` is specifically designed to solve this problem, providing the contextual understanding that regex lacks and dramatically increasing accuracy.

Getting Started: Installation

rizzo-pii offers two distinct paths for getting started: a simple download for non-technical users and a standard source installation for developers.

For Non-Technical Users (Recommended)

The easiest way to use rizzo-pii is to download the pre-built desktop application. No Python or command-line knowledge is required.

  1. Navigate to the Releases page on the GitHub repository.
  2. Download the appropriate file for your operating system: the .msi installer for Windows, the .dmg package for macOS, or the .AppImage for Linux.
  3. Run the installer or open the application. It’s a self-contained package that includes the model and all necessary components.

For Developers (from Source)

Developers who want to integrate rizzo-pii into their own applications or contribute to the project can install it from source.

# 1. Clone the repository
git clone https://github.com/Rizzo-AI-Academy/rizzo-pii.git
cd rizzo-pii

# 2. Set up a Python virtual environment
python -m venv .venv
source .venv/bin/activate  # On Linux/macOS
# ..venvScriptsActivate.ps1 # On Windows PowerShell

# 3. Install the required packages
pip install -r requirements.txt

# 4. (Optional) Copy the example environment file for API keys
# copy .env.example .env

Once installed, you can run the Flask application locally or use the model in your own scripts.

How to Use rizzo-pii

The core workflow of rizzo-pii involves three steps: anonymizing the source text, sending it to your preferred LLM, and then de-anonymizing (restoring) the LLM’s response.

Using the Desktop App

The desktop application provides a simple, three-tab interface for this process. You paste your document into the first tab to anonymize it. The app highlights the detected PII and provides the placeholder text to copy. You then paste this anonymized text into your cloud LLM (e.g., the ChatGPT website). Finally, you copy the LLM’s response (which contains placeholders) and paste it into the app’s “Restore” tab to get the final, re-identified text.

Using the Python Library

For developers, this workflow can be automated. You would use the library to perform the anonymization, make an API call to your LLM provider, and then use the mapping returned by the library to restore the response.

Real-World Use Cases

  • Legal Professionals: A lawyer can use the rizzo-pii desktop app to summarize a sensitive client contract using a powerful cloud model like Claude or Gemini, ensuring that client names, addresses, and financial details are never sent outside their local machine.
  • Accountants and Notaries: An accountant can safely use an LLM to analyze financial statements or tax documents containing Italian-specific identifiers like ‘partita IVA’, which are correctly identified and redacted by the specialized model.
  • GDPR Compliance Officers: A Data Protection Officer can use the tool to demonstrate a ‘privacy by design’ approach, showing a clear, auditable process for minimizing data exposure when using third-party AI services.
  • Developers Building AI Features: A developer creating a chatbot for a European market can integrate the rizzo-pii library into their backend to automatically sanitize all user inputs before they are processed by a central LLM, helping to ensure regulatory compliance.

Contributing to rizzo-pii

rizzo-pii is an open-source project and the maintainers explicitly ask for contributions, especially of real-world data to improve the model’s performance on weaker entity classes. The primary method for contributing is through the GitHub repository. You can report bugs, suggest new features, or start a discussion by opening an Issue. If you wish to contribute code or documentation, the standard workflow of forking the repository and submitting a Pull Request is encouraged.

Community and Support

The central hub for the rizzo-pii community is its GitHub repository. Support and technical questions are best handled through the Issues page. The project is managed by the Rizzo AI Academy, which also offers a series of Italian-language courses on AI topics and maintains a community around them.

Conclusion

rizzo-pii is a masterful example of a focused, domain-specific AI tool that solves a critical real-world problem. By choosing to tackle the specific privacy needs of Italian legal and financial professionals, it achieves a level of accuracy on key data types that generalist tools cannot match. Its hybrid model architecture and, most importantly, its commitment to a local-first, user-friendly desktop application make it a standout project in the crowded field of privacy tooling.

It demonstrates a powerful paradigm: you don’t have to sacrifice the performance of frontier LLMs to maintain data privacy. For any professional handling sensitive documents, especially in a European context, rizzo-pii is not just a useful utility; it’s an essential guardrail for safely navigating the new world of generative AI. Its combination of high performance and accessibility makes it one of the most practical open-source AI tools available today.

What is rizzo-pii?

rizzo-pii is an open-source privacy tool that detects and anonymizes Personally Identifiable Information (PII) in text. It runs entirely on your local computer, allowing you to replace sensitive data with placeholders before sending the text to a cloud-based Large Language Model (LLM) like ChatGPT or Claude.

How is rizzo-pii different from other PII detectors like Microsoft Presidio?

rizzo-pii’s main advantages are its specialization and ease of use. Its AI model is specifically trained to be highly accurate on Italian legal and financial PII, such as the ‘codice fiscale’, which other models miss. Additionally, it is available as a simple desktop application for Windows, macOS, and Linux, requiring no technical setup, whereas Presidio is a developer framework that requires programming to use.

Do I need a GPU to run rizzo-pii?

No, you do not. The `rizzo-pii` model is a lightweight 0.3B parameter model that has been optimized to run efficiently on a standard CPU. It typically uses between 0.5 GB and 1.2 GB of RAM and does not require any specialized hardware, making it accessible on any normal laptop or desktop computer.

Is the anonymization reversible?

Yes, the workflow is fully reversible. When rizzo-pii anonymizes a document, it creates a local dictionary that securely stores the mapping between the real data and the placeholders. When the LLM returns an answer containing these placeholders, you can use the application’s “Restore” function to swap them back to the original values.

How do I install rizzo-pii?

For most users, the easiest way is to go to the project’s GitHub Releases page and download the installer for your operating system (Windows, macOS, or Linux). This requires no technical knowledge. Developers who wish to use the Python library directly can clone the repository and install the dependencies using `pip install -r requirements.txt`.

What kind of PII can rizzo-pii detect?

The model is trained to detect 22 different categories of PII. This includes common entities like names, emails, phone numbers, and IBANs, as well as highly specific Italian legal identifiers such as ‘codice fiscale’ (CF), ‘partita IVA’ (PIVA), and ‘dati catastali’ (cadastral records).

How is rizzo-pii better than just using regular expressions (regex)?

rizzo-pii uses a hybrid approach. While it does use regex and checksums for structured data like IBANs, its main strength is a neural network model that understands context. This allows it to accurately identify PII like names, which can be ambiguous for a regex. For example, the model can determine if ‘Bianchi’ in a sentence refers to a person’s last name or a street name, a task where regex would fail.

Can I use rizzo-pii with sensitive documents for work?

The tool is designed for this exact purpose, especially for legal and financial documents. However, it is critical to understand that the local dictionary file containing the mapping of placeholders to real data is extremely sensitive and must be protected like a password. You should never store it in a cloud-synced folder or send it via email.