Skip to content

Exact data match

Exact data match (EDM) finds your sensitive records in prompts, such as a specific customer’s name together with their account number, without giving PromptGlass the records themselves. You hash an export locally with a secret salt, and only the hashes are uploaded. The gateway hashes candidate tokens from each prompt the same way and checks for matches. EDM produces very few false positives, because it matches real records rather than shapes.

  1. You export a table such as customers, employees or patients to CSV.
  2. promptglass edm hash normalizes each cell (case, whitespace, punctuation), salts it with a key held only by you, and hashes it with SHA-256.
  3. The hashed file is uploaded. The salt never is. In self-hosted deployments the salt lives in your KMS.
  4. The gateway tokenizes prompts, hashes candidate tokens and n-grams with the same salt, and looks for matches.
  5. A rule fires when enough fields from the same row match, for example name + account_number.
Terminal window
promptglass edm schema create customers \
--fields "full_name:name,email:email,account_number:id,phone:phone" \
--primary account_number
promptglass edm hash customers --input customers.csv --salt-from kms://alias/promptglass-edm \
--output customers.edm
promptglass edm upload customers customers.edm
kind: Detector
metadata: { name: customer-record }
spec:
dataClass: acme.customer_record
edm:
dataset: customers
match:
primary: account_number
anyOf: [full_name, email, phone]
minFields: 2

code.proprietary uses the same approach for code. Point promptglass edm fingerprint at your repositories. It computes winnowed fingerprints of normalized code and uploads only those. Pasting a function from your monorepo into a public chatbot then triggers a match, even after small edits.

Terminal window
promptglass edm fingerprint --repo ./monorepo --exclude "vendor/**,node_modules/**" --name monorepo

Re-hash and upload on a schedule, nightly for fast-changing tables. Uploading a new version replaces the old one atomically. Removed rows stop matching immediately.