Spaces:
Running
Running
Update README.md
Browse files15 unmodified lines16171819202122232425262728293031323315 unmodified lines- pyodide---# PromptGateScreens prompts for injection, PII and leaked credentials before they reach anLLM. Deterministic rules, no model weights.**This Space runs the real detector in your browser.** The same`promptgate_rules.py` and `rules.json` published in[NagaYu/promptgate-rules](https://huggingface.co/NagaYu/promptgate-rules) areexecuted client-side through Pyodide. There is no server and no inference call,so nothing you type leaves your machine. The first load fetches the Pythonruntime (~10 MB); after that every check takes a few milliseconds and worksoffline.## Measured results15 unmodified lines1617181920212223242526272815 unmodified lines- pyodide---# PromptGate — screen the prompt before it reaches the modelPromptGate is the single front door for this project's prompt screening: prompt injection, PII and leaked credentials, checked in your browser (via Pyodide) before anything is sent anywhere. It returns a verdict — `allow`, `sanitize` or `block` — with the exact spans that produced it, so you caThe engine is deliberately boring: deterministic rules, ~0.2 ms per prompt, no network. The rules are published separately as [`NagaYu/promptgate-rules`](https://huggingface.co/NagaYu/promptgate-rules) and exported from this Space's engine, so the demo and the pack cannot silently drift — verified identical verdicts on all 275 benchmark cases.The honest numbers (held-out test split, 70 cases written after the rules were frozen): exact verdict accuracy **61.4%**; PII/secret prompts correctly redacted **83.3%**; benign prompts wrongly flagged **11.1%**; injection attacks correctly blocked **25.0%**. The finding those numbers support: rule-based detection of sensitive *data* generalises, rule-based detection of *injection* does not. Use PromptGate as a cheap deterministic first layer and a redaction tool — not as your prompt-injection defence.## Measured results
README.md+5-10