Technical reference for security officers, compliance teams, and network administrators assessing SafePrompt's processing architecture and trust boundaries.
Local-First Detection Architecture
Unlike traditional cloud-based scanner integrations, SafePrompt runs its core detection suite entirely on the user's local endpoint. No raw prompt data or sensitive variables are sent to SafePrompt's cloud endpoints for scanning.
The on-device scanner operates using three distinct processing paradigms:
- Deterministic Matchers: High-speed pattern matching designed for structured identifiers (credit cards, government ID formats, database strings).
- Named Entity Recognition (NER): Lightweight machine learning models evaluating sentences for contextual entities (e.g. people's names, physical addresses, specific organizations) which cannot reliably be caught by patterns alone.
- ONNX Runtime: Standardized machine learning models executed directly on the device's CPU/GPU via ONNX, avoiding third-party server-side dependencies.
The 4-Layer Scan Pipeline
Every prompt intercepted at the browser or API gateway layer moves sequentially through four processing stages:
- Layer 1 — Deterministic Detection: Matches high-confidence structured formats (API keys, SSNs).
- Layer 2 — Local NER / ML: Evaluates the unstructured text around patterns to extract contextual metadata.
- Layer 3 — Unified Risk Decision: Resolves matches against your organization's custom security policies (e.g. custom keywords, project codenames).
- Layer 4 — Local Protection: Applies the specified policy action (Block, Warn, or Redact) locally on the device before the payload proceeds.
Redact-First, Verify-Second Workflow
For enterprise deployments requiring advanced cloud-assisted verification, SafePrompt employs a Redact-First topology:
Because the original sensitive strings are replaced with secure placeholders on-device, any downstream cloud-verification or logging systems only receive sanitized content, keeping the trust boundary secure.
Private AI Boundaries & Gateways
Enterprise plans support routing sanitized prompts through self-managed private AI infrastructure, including:
- Azure-hosted OpenAI private endpoints
- Private VPC-bound Large Language Models (LLMs)
- Enterprise inference gateways and security models
Comparison Matrix
| Capability | SafePrompt |
|---|---|
| On-device detection | ✓ |
| Local regex detection | ✓ |
| Local ML / NER | ✓ |
| ONNX inference | ✓ |
| Local redaction | ✓ |
| Secret detection | ✓ |
| PII detection | ✓ |
| AI interaction protection | ✓ |
| Customer-controlled AI endpoint | Enterprise |
| Cloud-independent detection | ✓ |
| Policy-based enforcement | ✓ |