Duczer East
Healthcare

In-perimeter AI on governed clinical and operational data.

Financial Services

Private AI and data platforms built to clear model-risk and audit review.

Financial services

Private AI, KYC/AML, API gateways and data governance for banks.

Insurance

Change data capture, governed agents and integration for insurers.

Healthcare

PHI document intelligence, FHIR APIs and in-perimeter AI for health systems and plans.

All use cases
  1. Home
  2. Use cases
  3. Choreo Labs
  4. PII Masking on LLM Traffic for a Health System
Choreo LabsHealthcare

PII Masking on LLM Traffic for a Health System

Mask what a pattern can describe, add a second check for free text and test both with synthetic prompts.

The challenge

What teams are up against

Typical situation, not a client: staff at a health system paste notes into an AI assistant, and prompts may contain patient identifiers. The privacy office needs proof that masking works before the pilot starts.

Our approach

How we deliver it, step by step

  1. 01

    List the identifiers

    List the identifier formats that appear: record numbers, national IDs, phone numbers, emails.

  2. 02

    Attach pattern masking

    Use the gateway's PII masking guardrail with regex for formats you can describe.

  3. 03

    Add a second check

    For names and addresses in free text, add a meaning-based or external check and a hard rule on its result.

  4. 04

    Build a synthetic test set

    Write prompts in each case class, with identifiers in prompts and in answers. Never use real patient data.

  5. 05

    Run and record

    Run the set, record what was masked and what was missed, and fix the gaps before go-live.

Architecture

The components involved

From the top of the stack down

Staff assistantCallers
PII masking at the gatewayGuardrail
Second check for free textControl
ModelTarget

The guardrail sits at the AI gateway so every application inherits it. Pattern masking handles formats. A second check handles free text. Logs record each masking decision without storing the original value where policy forbids it.

AI gatewayregex guardrailsynthetic test set

Outcomes

What changes when it is in place

The privacy office has a test log, not an assurance.

Gaps in free-text masking are known before launch.

Every application behind the gateway inherits the same rule.

Why Duczer East

Senior practitioners, from scope to delivery

We test with synthetic prompts only and we say plainly what a regex guardrail does not catch.

About Duczer East

FAQ

Questions we are asked about this

Does regex catch names?

Not reliably. Regex catches formats. Names and addresses in free text need another check.

Do you use real patient data to test?

Never. We use synthetic data.

Can this run on Azure or on WSO2?

Both can host guardrails. This case describes the WSO2 AI Gateway, now Choreo AI Gateway.

Let's Talk

Talk through this use case

Tell us about your systems and where you are today. A senior practitioner replies, and only your email is required.

Get a quote