Skip to content

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.

TypeDescriptionDetection
PERSONPersonal names, including first names, last names, full names, and honorifics.AI-based detection.
US_SSNUS Social Security Numbers.Pattern + validation.
US_ITINUS Individual Taxpayer Identification Numbers.Pattern + validation.
US_PASSPORTUS passport numbers.Pattern-based.
AGE_OVER_89Ages over 89, including labeled age phrases used in de-identification workflows.Pattern-based.
LICENSE_PLATEVehicle license plate numbers.Label-aware pattern.
VEHICLE_VINVehicle identification numbers.Pattern + checksum validation.
TypeDescriptionDetection
EMAIL_ADDRESSEmail addresses.Pattern + language-aware context.
PHONE_NUMBERPhone numbers in supported regional formats.Region-based validation.
URLWeb URLs.Pattern-based.
IP_ADDRESSIPv4 and IPv6 addresses.Pattern-based.
TypeDescriptionDetection
LOCATIONAddresses, cities, countries, landmarks, and other location references.AI-based detection.
ZIP_CODEUS ZIP codes.Pattern-based.
NRPNationality, religion, and political group affiliations.AI-based detection.
TypeDescriptionDetection
ACCOUNT_NUMBERAccount, checking, savings, and other labeled financial account numbers.Label-aware pattern.
CREDIT_CARDCredit card numbers.Luhn checksum validation.
US_BANK_NUMBERUS bank routing and account numbers.Pattern-based.
TypeDescriptionDetection
MEDICARE_IDCMS Medicare Beneficiary Identifier (MBI).MBI format validation.
NPINational Provider Identifier.Luhn validation.
HEALTH_PLAN_IDHealth insurance plan identifiers.Pattern-based.
DEA_NUMBERUS DEA registration numbers.Pattern + checksum.
MEDICAL_RECORD_NUMBERMedical record, chart, and patient identifiers.Label-aware pattern.
MEDICAL_LICENSEHealthcare professional license numbers.Label-aware pattern.
DEVICE_IDENTIFIERMedical device and implant identifiers, serials, and UDI values.Label-aware pattern.
TypeDescriptionDetection
ORGANIZATIONCompany, agency, and institution names.AI-based detection.
TypeDescriptionDetection
DATE_TIMEDates, 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'
)
)
)

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'))

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.

TypeDescriptionDetection
IBAN_CODEInternational bank account numbers.Pattern + checksum.
CRYPTOCryptocurrency wallet addresses.Pattern-based.

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.

  • Start with the default entity set, then use entities or exclude_entity_types to 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_list for 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.

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.