Add PII redaction POC for secure LLM prompting.

Implements detect-redact-sanitize pipeline with regex, domain rules, and ONNX NER before the LLM boundary, plus NUnit tests and Xenovex push documentation.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Bilal Nazer Ali
2026-07-07 13:05:07 +05:30
commit dfc81dea28
60 changed files with 3283 additions and 0 deletions

62
docs/git-xenovex-setup.md Normal file
View File

@@ -0,0 +1,62 @@
# Git setup — Xenovex (xts.xenovex.com)
This repository is ready for push to your Xenovex Git server after you create a remote repository.
## Prerequisites
- Git 2.x (installed at `C:\Program Files\Git\bin\git.exe`)
- Access to https://xts.xenovex.com/explore/repos
- .NET 10 SDK for build/test
## 1. Create the remote repository
1. Sign in to **https://xts.xenovex.com**
2. Open **Explore repos** (or **New repository**)
3. Create a new empty repository, e.g. `llm-pii-poc`
4. Copy the **HTTPS** or **SSH** clone URL (example shapes):
- `https://xts.xenovex.com/<org-or-user>/llm-pii-poc.git`
- `git@xts.xenovex.com:<org-or-user>/llm-pii-poc.git`
Do **not** initialize the remote with a README if you are pushing an existing local history.
## 2. Add remote and push (from repository root)
```powershell
cd C:\Users\bilal.n\Projects\llm-pii-poc
# Use full path if git is not on PATH
$git = "C:\Program Files\Git\bin\git.exe"
& $git remote add origin <YOUR_CLONE_URL>
& $git branch -M main
& $git push -u origin main
```
If the remote already has commits (e.g. auto-generated README), either use an empty remote or:
```powershell
& $git pull origin main --rebase
& $git push -u origin main
```
## 3. What is committed vs excluded
| Included | Excluded (`.gitignore`) |
|----------|-------------------------|
| Source (`src/`), tests, scripts, docs | `bin/`, `obj/`, `.vs/` |
| `README.md`, `PiiRedaction.slnx` | `models/*.onnx`, `vocab.txt`, `ner-labels.txt` (~431MB model) |
| `models/.gitkeep` (empty models folder) | `scratch/` |
After clone, download the NER model locally:
```powershell
.\scripts\download-ner-model.ps1
```
## 4. Verify after clone
```powershell
dotnet build
dotnet test
dotnet run --project src/PiiRedaction.ConsoleApp -- --sample 0
```