Rizzo-AI-Academy/rizzo-pii
Local-first privacy guard: anonymize your documents before sharing with LLMs.
What it solves
It addresses the privacy risk of sending sensitive personal and confidential data to cloud-based LLMs (like ChatGPT, Claude, or Gemini). For professionals in law, accounting, and notary services—particularly in Italy—uploading documents often violates GDPR compliance. This project allows users to leverage powerful frontier models without transmitting real identifiable information.
How it works
The system implements a reversible anonymization workflow that runs entirely on the user's local CPU:
- Local Detection: A lightweight 0.3B parameter model (based on mmBERT/ModernBERT) identifies 22 categories of PII, including specific Italian legal identifiers like codice fiscale and partita IVA.
- Pseudonymization: Real data is replaced with stable, type-aware placeholders (e.g.,
[FULLNAME_1]). A mapping dictionary is stored locally on the user's disk. - Cloud Processing: Only the anonymized text is sent to the frontier LLM.
- Local Restoration: When the LLM responds, the tool uses the local dictionary to swap placeholders back into the original real values.
To ensure high accuracy, the neural model is paired with a deterministic regex and checksum network (e.g., Luhn for cards, mod-97 for IBAN) that overrides the model when a valid checksum is found.
Who it’s for
Law firms, accountants, notaries, and healthcare providers bound by GDPR who need to use LLMs for summarizing contracts or drafting legal documents while keeping sensitive data on their own devices.
Highlights
- Italian-Legal Specialization: Specifically detects Italian-specific identifiers (CF, PIVA, cadastral data) often missed by generic models.
- Low Hardware Requirements: Runs on a standard laptop CPU with a memory footprint of approximately 0.5 GB to 1.2 GB.
- Reversible Workflow: Unlike destructive redaction, it allows the final output to be restored to its original form locally.
- Privacy by Design: Operates fully offline with no API keys or telemetry, ensuring data never leaves the device during the anonymization phase.
Related
- Project
- Dispatch
- Project
- Project
- Project