Skip to content

Compare approaches

Four ways teams keep personal data out of an LLM prompt. This page compares the approaches, not vendors - the Zer0pii column describes what the gateway does; the other columns state only general properties of that approach.

Compare approaches

  1. Does the provider ever see raw PII?

    Zer0pii (masking gateway)
    No - detected entities are replaced with placeholder tokens before the request leaves the gateway, and restored in the response.
    Provider-side data controls / Generic DLP / DIY regex
    Provider-side data controls
    The provider does see the raw text; the control is a contractual or configuration promise (zero-retention terms, an enterprise data-processing agreement) about what happens to it afterward, not a technical barrier before the call.
    Generic DLP
    Usually inspects traffic to detect or block a pattern; it does not rewrite the payload, so if the request is allowed through, the provider sees the raw content.
    DIY regex
    Only whatever the regex actually matches is removed before sending; anything the pattern misses reaches the provider raw.
  2. Does the model still get useful context?

    Zer0pii (masking gateway)
    Yes - placeholders preserve sentence structure and entity type, and are restored in the reply, so the model reasons over the same shape of text.
    Provider-side data controls / Generic DLP / DIY regex
    Provider-side data controls
    Yes, always - since the model receives the unmodified text.
    Generic DLP
    Not applicable in the same sense - a block/alert tool does not rewrite the payload, so context is either fully present (allowed) or the request does not proceed (blocked).
    DIY regex
    Depends on the replacement chosen; a blunt find-and-delete regex can strip words the model needed, or leave gaps that read oddly.
  3. Names, organizations, places (context-dependent entities)

    Zer0pii (masking gateway)
    Names, organisations and places are detected; detection is not complete.
    Provider-side data controls / Generic DLP / DIY regex
    Provider-side data controls
    Not addressed by this approach at all - it does not detect or redact anything, since it only governs what the provider does with whatever it receives.
    Generic DLP
    Weak on this class by design: DLP pattern libraries are built around structured identifiers (card numbers, ID formats), not free-text names or organizations, which do not have a fixed shape to match.
    DIY regex
    Effectively unable to catch these reliably - a name or place has no fixed pattern, so a regex either misses most of them or over-matches common words.
  4. Card, ID and IBAN numbers

    Zer0pii (masking gateway)
    These identifiers are validated before a match is treated as real.
    Provider-side data controls / Generic DLP / DIY regex
    Provider-side data controls
    Not addressed - this is a detection capability the provider-side control does not have.
    Generic DLP
    Often supported - checksum validation for common identifier formats is a standard DLP pattern-library feature.
    DIY regex
    Possible to hand-write, but each checksum algorithm is its own bug surface, and coverage is only as complete as the identifiers someone thought to add.
  5. Streaming responses restored correctly?

    Zer0pii (masking gateway)
    Yes - streamed replies are restored as they arrive.
    Provider-side data controls / Generic DLP / DIY regex
    Provider-side data controls
    Not applicable - nothing is masked, so there is nothing to restore in a stream.
    Generic DLP
    Not applicable to LLM response streams in the way it applies to network traffic; most DLP tooling targets file transfer and email, not token-by-token model output.
    DIY regex
    Hard to get right - a hand-rolled scan-and-replace over a stream has to handle a match split across two chunks, which is easy to miss and easy to get subtly wrong.
  6. Code blocks left intact?

    Zer0pii (masking gateway)
    Yes by design - code blocks, variable names and package names are left as written; only a hardcoded credential found in code is masked.
    Provider-side data controls / Generic DLP / DIY regex
    Provider-side data controls
    Not applicable - nothing is rewritten, so code is not at risk of corruption from a redaction pass.
    Generic DLP
    Depends on the tool; a pattern scanner not written for source code can flag or mangle look-alike strings (a hex constant, a fake-looking test fixture) inside code.
    DIY regex
    A real risk - a general-purpose regex tuned for prose will often match inside code (a UUID literal, a phone-shaped test constant) and break it.
  7. Proof of what happened (signed receipts)?

    Zer0pii (masking gateway)
    Yes - each request is attested with an Ed25519 signature over a hash of the raw and sanitized payloads, verifiable independently of Zer0pii.
    Provider-side data controls / Generic DLP / DIY regex
    Provider-side data controls
    Only whatever the provider's own logs or compliance reports state; no independently verifiable, per-request cryptographic proof is a standard feature of this approach.
    Generic DLP
    Usually an internal log entry in the DLP vendor's own console, not a portable, independently verifiable artifact.
    DIY regex
    None unless someone builds it - a homegrown script has no attestation layer unless it is added deliberately.
  8. Latency cost

    Zer0pii (masking gateway)
    The added time can be measured on your own traffic.
    Provider-side data controls / Generic DLP / DIY regex
    Provider-side data controls
    None beyond the provider's own response time - there is no separate scanning step in front of the call.
    Generic DLP
    Varies by deployment (inline network inspection adds some latency; out-of-band monitoring adds none to the request itself), but is not a number this page can state without a specific product in mind.
    DIY regex
    Depends entirely on the implementation; a naive large regex set run per request can be slow, but there is no fixed number, since it is whatever code someone writes.
  9. Setup effort

    Zer0pii (masking gateway)
    Point the SDK base URL at the gateway host and add the API key - the request/response shape is unchanged otherwise.
    Provider-side data controls / Generic DLP / DIY regex
    Provider-side data controls
    Usually a contract or account-tier change (enterprise terms, a data-processing addendum) rather than a code change.
    Generic DLP
    Typically an infrastructure deployment: an agent, a proxy, or a network tap, plus policy authoring - more operational surface than a client-side change.
    DIY regex
    Fast to start, since it is just a script - but every entity type, edge case and checksum has to be written and maintained by hand.
  10. How complete is the coverage?

    Zer0pii (masking gateway)
    Detection is not complete. Check it on your own data before you rely on it.
    Provider-side data controls / Generic DLP / DIY regex
    Provider-side data controls
    Does not detect or redact anything at all - it is a policy about the provider's handling of whatever it receives, not a technical control on the data itself.
    Generic DLP
    Free-text, context-dependent entities (names, organizations, addresses) with no fixed shape to match; also generally not designed for token-level LLM streaming output.
    DIY regex
    Anything the author did not anticipate - new formats, new locales, streaming, checksum validation, and code-safety are all separate problems a regex-only approach does not solve on its own.

Internal report, available to customers under a security review

When not to choose Zer0pii

If your only requirement is a contractual zero-retention promise from the model provider and you do not need entity-level detection, provider-side data controls alone may be simpler. If you need to inspect non-LLM traffic (email, file transfers, general network egress), that is DLP's actual scope, not this gateway's. And if your volume is tiny and your formats are fixed and known in advance, a small DIY regex may genuinely be enough - until the format changes.