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.
How it works
Section titled “How it works”- You export a table such as customers, employees or patients to CSV.
promptglass edm hashnormalizes each cell (case, whitespace, punctuation), salts it with a key held only by you, and hashes it with SHA-256.- The hashed file is uploaded. The salt never is. In self-hosted deployments the salt lives in your KMS.
- The gateway tokenizes prompts, hashes candidate tokens and n-grams with the same salt, and looks for matches.
- A rule fires when enough fields from the same row match, for example
name+account_number.
Create an EDM dataset
Section titled “Create an EDM dataset”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.edmpromptglass edm upload customers customers.edmUse it in a detector
Section titled “Use it in a detector”kind: Detectormetadata: { name: customer-record }spec: dataClass: acme.customer_record edm: dataset: customers match: primary: account_number anyOf: [full_name, email, phone] minFields: 2Source code fingerprints
Section titled “Source code fingerprints”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.
promptglass edm fingerprint --repo ./monorepo --exclude "vendor/**,node_modules/**" --name monorepoRefresh
Section titled “Refresh”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.