← All models · Prompt-injection detection

use case · practical · WASM · ~739 MB

Practical: Client-Side AI Firewall for RAG & Support Forms

Indirect prompt injections hide inside scraped web pages, emails, tickets, and retrieved RAG documents. This firewall scans the untrusted user input and all three retrieved chunks independently in a Web Worker, quarantines any injected segment before the prompt ever leaves the browser, and assembles a sanitized payload with per-chunk scores and latency.

On-device firewall model

1. Prompt assembly inputs

Load a scenario:

50%
Waiting for model…

2. Per-segment firewall verdicts

NOT SCANNED Load the model to scan every untrusted segment.
backend – total latency – scanned 0 quarantined 0

3. Sanitized outbound LLM payload

Quarantined RAG chunks are stripped (or stubbed) before the prompt is sent upstream. If the user's own message is flagged, the outbound call is blocked entirely.

{ "status": "waiting_for_scan" }

← Basics · Model overview · Next: Wild: Red-Team Sandbox →