PII detection

PII detection checks what users send to AI, and the text written in training cards, for personal data such as names, email addresses and card numbers. Use it to decide what happens when personal data is found, and to add rules for the identifiers your organisation uses.

Turn on PII detection

Open Admin > PII Detection. The settings live on three tabs: Policy, Rules and Playground. The page opens on Policy, and the tab you have open is kept in the page address and in this browser, so a link opens the same tab.

  1. Turn on Global PII detection. The switch applies straight away, so there is no Save for it. The status line changes from Off for the whole platform to Active platform-wide.
  2. Move the Confidence threshold slider. It sets how confident the AI model must be before something counts as PII; the default is 90%.
  3. Under What to do when PII is detected, choose Block User Traffic, Warn User or Tokenize.
  4. Under Where PII detection works, set User messages to AI and Training Cards to AI model, Regex or Both. Choose Disabled to leave a surface out.
  5. Test your settings on Playground, then click Save.
SettingWhat it doesDefault
Global PII detectionTurns detection on or off for the whole platform. Shows Active platform-wide or Off for the whole platform.Off
Confidence thresholdHow confident the AI model must be before something counts as PII.90%
What to do when PII is detectedBlock User Traffic, Warn User or Tokenize.Block User Traffic
User messages to AIChecks chat messages, edits, and report and task prompts.On, AI model
Training CardsChecks text written in training cards.On, AI model
SQL OutputsLocked. Controlled in Lake or Warehouse.Not checked here
Skip PII detection in private chatsSkips checks for private chats.Off
PII detection loggingRecords every detection and every skipped warning.Enabled, cannot be changed

On a new installation, both surfaces start on with AI model.

Choose what happens when PII is found

Each detected value becomes a bracketed label for the kind of personal data it is, so the AI works with labels instead of the real values. DataMind OS also keeps tokenised copies of covered data for each role and data area, and a Mind that uses the data is switched to the tokenised copy before its access to the original values is withdrawn.

Choose where detection runs

Each surface has one control that turns it on or off and picks its engine:

A surface you switch on without picking an engine runs AI model, unless you choose otherwise.

Regex scans text of any size instantly. The AI model is slow on very large documents.

SQL Outputs is locked. PII in query results is controlled by the PII domain settings on Lake or Warehouse columns. See Configure a table and Define table columns.

Add your own rules

Open the Rules tab.

  1. Under AI model detection, open Enable built-in detectors… (search with Search detectors…) and select the detectors you need. On a new installation, person, email, phone_number, address, date_of_birth, national_id_number, passport_number, iban and card_number are on. Others, such as tax_id, ip_address and password, are off until you select them.
  2. To add an AI label, click Add label, enter a Label and a Description, then click Add label. The description is required: "Describe the data so the model can detect it accurately."
  3. Under Regex patterns, click Add pattern, enter a Label and a Pattern, then click Add pattern. The helper under the pattern reads "RE2 syntax, case-sensitive. Test it against sample text in the Playground tab."

Other things to know:

Note

Changes to Policy and Rules take effect only after you click Save. Revert discards them. Save appears only while something has changed, shows Saving… while it runs, and stores only your changes; a confirmation reads "PII detection policy updated". The Global PII detection switch is the exception.

Test the policy before you save

  1. Open Playground.
  2. Paste sample text into Sample text.
  3. Under Test as, choose User messages to AI or Training Cards.
  4. Read Detected entities, or Tokenized output when the mode is Tokenize, and the match count.

The Playground uses your unsaved changes and applies the same checks as enforcement. The panel names the engine it runs for the chosen surface.

Tip

If the global switch is off, the Playground says "PII detection is off platform-wide - enable the global switch to test." If the surface's engine has no enabled rules, it says "No enabled rules for this scope's engine - enable a rule or switch the engine." Before you paste anything it says "Enter sample text on the left.", and text with no findings reads "No PII detected."

What users see in chat

Users can check a draft before sending it with Check PII, and a flagged message is held back with the parts shown to them. What a user sees depends on the mode you chose. The full experience is described in PII checks in chat.

Turn detection off

  1. Switch Global PII detection off. There is no Save, and an impact check runs before the dialog opens.
  2. Read the dialog Turn off Global PII detection?. It explains that PII will no longer be detected in users' prompts to AI and asks "Are you sure you want to turn it off?". If any Minds use enforced PII column clarification on Excel or CSV uploads, the dialog also says that "Enforced PII column clarification on Excel / CSV uploads will also be turned off" and names how many Minds are affected.
  3. Click Turn off to confirm, or Cancel. Turning the switch on has no dialog.

While the switch is off, Check PII is not offered to users and the Playground cannot run a test.

Warning

While the switch is off, no PII is detected in chats or training cards.

Who can change PII settings

To do thisYou need
See the PII Detection tabPII Configuration Viewer or System Settings Viewer
Change the policy and rules, and click SavePII Configuration Manager
Turn Global PII detection on or offSystem Settings Manager
Continue after a warning with Send it anywayPII Detection Bypass
Read PII log entriesPII Log Viewer
Export PII log entriesPII Log Manager

Without change rights, the controls are shown but disabled, and the save actions are hidden. See the Permission reference and Roles and permissions.

Limits and edge cases

Questions, answered

Which mode should I choose?

Choose Block User Traffic when personal data must never reach the AI. Choose Warn User when people sometimes need to send it and you trust those users with PII Detection Bypass. Choose Tokenize when the AI should work without seeing the real values.

What happens when I turn off Global PII detection?

Detection stops everywhere at once: chats and training cards are not checked, Check PII disappears from message boxes, and the Playground cannot test. The dialog also tells you if any Minds lose enforced PII column clarification on Excel or CSV uploads, and turns it off for them. The switch is instant and does not wait for Save. Switch it back on to start checking again; turning it on has no dialog.

Does PII detection check SQL query results?

No. SQL output is locked on this page. Its PII is controlled by the PII domain settings on Lake or Warehouse columns. See Configure a table and Define table columns.

Does the confidence threshold apply to regex rules?

No. The Confidence threshold is for AI model detections. A regex rule either matches or it does not, so its matches carry no confidence score and the threshold does not change what it finds.

Our employee IDs are not detected. What do I do?

Add an AI label with a clear Description of the format, or a regex pattern if the format is always the same. Test a sample on Playground before you click Save.

Why does my regex work elsewhere but get rejected?

DataMind OS uses RE2 syntax, which does not support backreferences or lookaround. Rewrite the pattern without them. Some invalid patterns are flagged as you type. Others fail when you click Save, with an "Invalid RE2 pattern" message.

Detection flags too much. What should I change?

Raise the Confidence threshold, which is 90% by default. Or set the surface to Regex if the data follows a fixed format, knowing that regex only finds what your patterns describe. Check the change on Playground first.

Can I change or remove a built-in detector?

No. Built-in detectors can be switched on or off, but their labels, descriptions and patterns are fixed and they cannot be removed. A custom rule also cannot reuse a built-in label.

Where do I see what was detected?

In Observability > Logs > PII. Every detection and every skipped warning is logged. You need PII Log Viewer to read the entries and PII Log Manager to export them. See AI, socket and PII logs.

Why does the Playground say there are no enabled rules?

The surface's engine has no enabled rule to run. Turn on a rule on Rules, or change the surface's engine to one that has enabled rules.

Can I send someone a link that opens the Rules tab?

Yes. The tab you have open is kept in the page address, so a copied link opens the same tab. A link without a tab opens Policy.

Which regex rules come with DataMind OS?

A standard pack of sixteen, all switched off so you opt in: rules for personal ID numbers, IBANs, mobile numbers, vehicle plates, passports and bank codes, plus email addresses, card numbers, social security numbers, IP and MAC addresses, JWT tokens, AWS access keys, private-key blocks and URLs carrying credentials. Review the pack on Playground before you switch rules on: some patterns are deliberately loose. Unlike the built-in detectors, a regex rule can be edited or deleted, and an edit keeps your change through platform updates; a rule you delete is added back, switched off, by the next update.