Built-in Entity Types
Agent Mask detects the following entity types by default when you call mask() without custom detection settings. Detection combines model-based recognition, pattern matching, context cues, and checksum validation depending on the entity type.
Use the defaults as a starting point, then review analyzer_results and the entity_ledger on representative data before treating a configuration as final.
Personal identifiers
Section titled “Personal identifiers”| Type | Description | Detection |
|---|---|---|
PERSON | Personal names, including first names, last names, full names, and honorifics. | AI-based detection. |
US_SSN | US Social Security Numbers. | Pattern + validation. |
US_ITIN | US Individual Taxpayer Identification Numbers. | Pattern + validation. |
US_PASSPORT | US passport numbers. | Pattern-based. |
AGE_OVER_89 | Ages over 89, including labeled age phrases used in de-identification workflows. | Pattern-based. |
LICENSE_PLATE | Vehicle license plate numbers. | Label-aware pattern. |
VEHICLE_VIN | Vehicle identification numbers. | Pattern + checksum validation. |
Contact
Section titled “Contact”| Type | Description | Detection |
|---|---|---|
EMAIL_ADDRESS | Email addresses. | Pattern + language-aware context. |
PHONE_NUMBER | Phone numbers in supported regional formats. | Region-based validation. |
URL | Web URLs. | Pattern-based. |
IP_ADDRESS | IPv4 and IPv6 addresses. | Pattern-based. |
Location
Section titled “Location”| Type | Description | Detection |
|---|---|---|
LOCATION | Addresses, cities, countries, landmarks, and other location references. | AI-based detection. |
ZIP_CODE | US ZIP codes. | Pattern-based. |
NRP | Nationality, religion, and political group affiliations. | AI-based detection. |
Financial
Section titled “Financial”| Type | Description | Detection |
|---|---|---|
ACCOUNT_NUMBER | Account, checking, savings, and other labeled financial account numbers. | Label-aware pattern. |
CREDIT_CARD | Credit card numbers. | Luhn checksum validation. |
US_BANK_NUMBER | US bank routing and account numbers. | Pattern-based. |
Healthcare
Section titled “Healthcare”| Type | Description | Detection |
|---|---|---|
MEDICARE_ID | CMS Medicare Beneficiary Identifier (MBI). | MBI format validation. |
NPI | National Provider Identifier. | Luhn validation. |
HEALTH_PLAN_ID | Health insurance plan identifiers. | Pattern-based. |
DEA_NUMBER | US DEA registration numbers. | Pattern + checksum. |
MEDICAL_RECORD_NUMBER | Medical record, chart, and patient identifiers. | Label-aware pattern. |
MEDICAL_LICENSE | Healthcare professional license numbers. | Label-aware pattern. |
DEVICE_IDENTIFIER | Medical device and implant identifiers, serials, and UDI values. | Label-aware pattern. |
Organizational
Section titled “Organizational”| Type | Description | Detection |
|---|---|---|
ORGANIZATION | Company, agency, and institution names. | AI-based detection. |
Temporal
Section titled “Temporal”| Type | Description | Detection |
|---|---|---|
DATE_TIME | Dates, times, timestamps, and temporal phrases. | AI-based detection + pattern. |
DATE_TIME is intentionally broad. It can detect values such as March 14, 2026, 03/14/2026, 2026-03-14T09:30:00Z, July 12, March 2026, 2020, 9:30 AM, next Tuesday, and in two weeks.
If you only want an operator to transform concrete calendar dates, add value_filter: 'absolute_date' under DATE_TIME in entity_config. This lets absolute date values continue to the operator, including partial dates such as July 12, March 2026, and 2020, while relative phrases and time-only values are ignored before the operator runs.
OBJECT_CONSTRUCT( 'entity_config', OBJECT_CONSTRUCT( 'DATE_TIME', OBJECT_CONSTRUCT( 'operator', 'mask', 'value_filter', 'absolute_date' ) ))Restrict detection to specific types
Section titled “Restrict detection to specific types”Use the entities parameter when you only want a selected set of built-in types:
SELECT app_public.mask( intake_note, OBJECT_CONSTRUCT('entities', ARRAY_CONSTRUCT('PERSON', 'US_SSN', 'EMAIL_ADDRESS')))FROM app_public.sample_records;Use exclude_entity_types when the defaults are mostly right but one or two entity types are too broad for a workflow:
OBJECT_CONSTRUCT('exclude_entity_types', ARRAY_CONSTRUCT('DATE_TIME', 'ORGANIZATION'))Additional built-in recognizers
Section titled “Additional built-in recognizers”Some recognizers are available but not included in the default entity set because they can be domain-specific or noisy in general text. Enable them explicitly with entities or configure them in entity_config.
| Type | Description | Detection |
|---|---|---|
IBAN_CODE | International bank account numbers. | Pattern + checksum. |
CRYPTO | Cryptocurrency wallet addresses. | Pattern-based. |
Configure per type
Section titled “Configure per type”Use entity_config to set a different operator or confidence threshold per type:
OBJECT_CONSTRUCT( 'entity_config', OBJECT_CONSTRUCT( 'PERSON', OBJECT_CONSTRUCT('operator', 'faker', 'threshold', 0.7), 'US_SSN', OBJECT_CONSTRUCT('operator', 'mask') ))Lower thresholds can catch more ambiguous matches but may increase false positives. Higher thresholds can reduce false positives but may miss less obvious mentions. Tune thresholds on representative data and check the detected spans in analyzer_results.
Tuning guidance
Section titled “Tuning guidance”- Start with the default entity set, then use
entitiesorexclude_entity_typesto match the workflow. - Raise thresholds for entity types that are too noisy in your corpus; lower them only when missing that entity type is a bigger risk than reviewing extra matches.
- Use
allow_listfor repeated values that should remain visible, such as product names, test accounts, or public organization names. - Add description-based custom entities or regex-based custom entities for domain-specific identifiers that are not covered by the built-in list.
- Validate output on the text and document formats you plan to process. Detection quality depends on the input language, formatting, OCR quality, context, and the entity types you enable.
Limitations
Section titled “Limitations”Built-in detection helps create de-identified output and review evidence, but it is not a legal determination that a dataset meets a specific regulatory or release requirement. AI-based entities depend on surrounding context, and pattern-based entities depend on the value’s surface format. Short or generic values, such as account-like numbers, ZIP-like numbers, dates, initials, or organization names, may need threshold tuning, allow lists, or custom entities for your corpus.