Status: [UNTESTED] Endpoints found: http://localhost:8000/api/v1/scrub/text http://localhost:8000/api/v1/detect/scan http://localhost:8000/api/v1/proxy/chat Source: https://github.com/MuhsinunC/llm-privacy-layer # LLM Privacy Layer [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/) [![FastAPI](https://img.shields.io/badge/FastAPI-0.115+-009688.svg)](https://fastapi.tiangolo.com/) [![Next.js 16](https://img.shields.io/badge/Next.js-16-black.svg)](https://nextjs.org/) [![HuggingFace Model](https://img.shields.io/badge/🤗%20Model-MuhsinunC%2Fpii--ner--roberta--base-yellow)](https://huggingface.co/MuhsinunC/pii-ner-roberta-base) [![Eval F1](https://img.shields.io/badge/eval%20F1-0.9782-brightgreen)](https://huggingface.co/MuhsinunC/pii-ner-roberta-base) [![Tests](https://img.shields.io/badge/tests-260%20passing-brightgreen)](https://github.com/MuhsinunC/llm-privacy-layer/actions) > **Note on metrics:** The "Eval F1 = 0.9782" badge reports the **training-eval F1** (span-level, on the ai4privacy/pii-masking-200k validation set, the model's training distribution). The repo also includes a separate **count-based benchmark** on a 100-record hand-labeled fixture (`backend/tests/fixtures/pii_test_dataset.jsonl`) where the same model scores F1 ≈ 0.74 — that lower number is a benchmark methodology artifact (count-based vs span-based matching), not a real accuracy gap. Both numbers and the analysis are documented in [`docs/report.md`](docs/report.md#phase-4-benchmarking--comparison). A privacy-preserving data transformation platform that protects sensitive information in AI/LLM workflows. Detects and replaces PII (Personally Identifiable Information) with semantically equivalent synthetic data, enabling safe dataset creation for model training and real-time privacy protection for LLM API interactions. ## The Problem - **LLMs memorize training data**: Fine-tuning on raw sensitive data leads to measurable PII leakage (~19% in empirical studies) - **Data masking fails**: Traditional masking is reversible — LLMs learn c