Skip to content

Naming rules

Many organizations name documents by a set pattern, built around a matter number, a client code, a chart number, or a part number. A naming rule describes that pattern, piece by piece, so that Sanitized AI can:

  • Flag a file whose name follows the pattern when someone attaches it to an AI tool, even when the extension can’t read what’s inside, such as a CAD drawing or an encrypted archive.
  • Find the reference number, such as MAT-2026-0142 in MAT-2026-0142_Tremblay_Requete_v2.docx, wherever it appears in a prompt or in a file’s text.
  • Find a file name that follows the pattern when someone types or pastes it into a prompt, such as Can you summarize MAT-2026-0142_Tremblay_Requete_v2.docx?

You don’t write patterns or code. You choose the pieces, and then try them on your own file names before you save.

Create a naming rule

  1. On the Guardrails page, open Guardrail Catalog, and then click New naming rule.

  2. In Start from, choose the template closest to how you name files, or Blank:

    TemplateExample file name
    Law firm matter numberMAT-2026-0142_Tremblay_Requete_v2.docx
    Clinic chart numberPT-0012345_lab_results.pdf
    Accounting client fileCLT-00421_T2_2025.pdf
    Engineering part drawing4410-223-01_RevC_bracket.dwg

    To start from your own names instead, choose Paste example names, paste a few real file names that follow your convention, one per line, and click Fill in the pieces. The pieces are worked out in your browser, and only the pieces are saved, not the names.

  3. Enter a Name and a Description, for example Client matter files.

  4. Change the pieces to match your own names. See Describe the pieces.

  5. Try the rule on a few real file names. See Test before you save.

  6. Click Save.

The rule appears in Guardrail Catalog with a Naming rule badge. To change it later, click the pencil icon next to it.

Describe the pieces

Under Pieces, list the parts of a file name in the order they appear. Each piece has a Type:

TypeWhat it matchesExample
Fixed textThe same text every timeMAT
LettersLetters only, between a Min and a Max lengthQC
DigitsDigits only, between a Min and a Max length0142
Letters and digitsLetters or digits, between a Min and a Max lengthT2
YearA four-digit year, from 1900 to 20992026
DateA date, in the Format you choose20260314
Free textAny text, such as a client’s name or a document titleTremblay
VersionA version mark that starts with v, ver, or revv2, RevC
SeparatorA dash, underscore, dot, or space, or any of these_

Then:

  • Select Optional for a piece that’s sometimes missing, such as a version at the end of the name.
  • In File extensions, list the file types the rule covers, separated by commas, such as pdf, docx. Leave it empty to cover every type.
  • In Look for it in, choose File names only, Prompts and file text only, or File names, prompts and file text.

Upper and lower case don’t matter. Copies that browsers and file managers make, with names ending in (1) or - Copy, match too.

Describe the reference number

If the rule looks in prompts and file text, select Part of the reference number for each piece of the number. In the law firm template, those are MAT, the year, the four digits, and the dashes between them. The pieces must sit next to each other, and Free text can’t be part of the number.

Under Reference number:

  • What it’s called: the name shown when the number is found, such as Matter number. Optional: add a French name in What it’s called in French. People who use Sanitized AI in French see it instead.
  • Nearby words: words that usually appear near the number, such as matter or file, separated by commas. Add French words, such as dossier, in Nearby words in French.
  • Nearby words are: choose Helpful, not needed to count the number either way, or Required to count it only when a nearby word is close by.

A number with no fixed text, such as a part number made only of digits, looks like many ordinary numbers. It needs nearby words, and it only counts when one of them is close by.

Test before you save

Under Try it:

  • In File names to test, one per line, paste a few of your real file names. Each one shows Matches or No match.
  • In Text to test, paste a sentence that mentions a reference number. The numbers found are listed after Found:. File names in the sentence are listed after File names found:.

A file name typed in a prompt is only looked for when the pattern is specific enough to tell it apart from ordinary text. If Try it says File names typed in text aren’t looked for, add a piece of fixed text, such as MAT, or another Separator. Attached files are still checked either way.

Try it also shows an example name and an example reference number built from your pieces. What you type in Try it stays in your browser: it isn’t saved or sent to Sanitized AI.

If the dialog shows Can’t save yet:, it lists what to fix. A common one is These pieces could split a name too many ways. It means two pieces of varying length sit side by side, so add a Separator between them.

Choose what happens

A naming rule has an enforcement action like any other guardrail. Change it in the Enforcement column of Guardrail Catalog. For a file whose name matches:

ActionWhat happens
MonitorNothing is shown. The match is recorded on the Events page.
NudgeThe file is held back with Sensitive Data Detected in File. The person can choose Remove File or Send Anyway.
BlockThe file is held back with Blocked by Policy, without Send Anyway.

A reference number found in a prompt is handled like any other flagged data. See Enforcement actions.

Rate the rule

To give the rule a severity, click the pencil icon next to it and choose a Severity, from Low to Critical. A new rule starts at Not set. The rating shows in Guardrail Catalog and weighs the rule’s matches in your risk scores. When the rule’s action is Default, the rating also picks it: High and Critical block, and the others nudge.

What people see

In the file warning, File name means the file’s name matched. In a prompt warning, File name means a matching file name was typed in the prompt. Sanitize Prompt replaces it like any other flagged value. When the reference number is in the file’s text, the warning shows the name you gave the number, such as Matter number.

A matching name counts even when the extension can’t read the file, for example a CAD drawing or an encrypted archive:

  • With Nudge or Block, people see the warning for that action instead of File Could Not Be Scanned.
  • With Monitor, people still see File Could Not Be Scanned. If they choose Send Anyway, the match is recorded.

If naming rules are turned off

If Sanitized AI turns naming rules off for your organization, your rules stop checking, but they’re kept. New naming rule disappears, and in an existing rule you can change only its name, description and severity. The rules work again as soon as naming rules are turned back on.

What’s stored

Sanitized AI stores the pieces you describe, not your file names. When a naming rule flags a file, the event records the file’s name and the rule that matched, as for any flagged file, unless your organization masks file names: the event then keeps only the file type. See File names in events. The file’s contents are never stored. See Privacy.