---
sourceDocument: Xanadu Enable AI
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/intelligent-experiences

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu Enable AI

ft:clusterId :

    - platai

bundleId :

    - platai

workflow :

    - Platform


---

# Create a pattern vocabulary item

# Create a pattern vocabulary item {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Use regular expression (regex) encoding to establish a pattern format for vocabulary
items such as email addresses, phone numbers, and record naming conventions. You can create
your own patterns for the vocabulary data in your instance.

## Before you begin

* Make sure that the NLU Workbench plugin, NLU Workbench - Core plugin, NLU Common Model plugin, and Predictive Intelligence plugin are all installed and activated on your instance.
* Create or use an existing NLU model for Virtual Agent or AI Search.
* Role required: nlu_editor, nlu_admin, or admin. The editor must be assigned to the model.
{#create-pattern-vocabulary-item__ul_shl_vvs_tgb}

## About this task

Pattern vocabulary items use regular expressions (regex) to find variations of words and phrases in your users' utterances. The pattern then maps these variations to the synonym you provide. The synonym is used during intent
prediction.

In this example scenario, you've created an NLU Virtual Agent model for
requests related to authentication. To refer to multi-factor authentication, your
users often use "MFA", "mfa", or "mfa authentication". You can provide a pattern to
cover these variations. They are replaced with the matching synonym
multi-factor authentication when predicting an intent.

See [Using regular expressions in entities](https://servicenow-prod.fluidtopics.net/MLF7GQKcQp5lQTgeBdhGfw "Learn how to use regular expressions in your NLU entities to establish patterns that help the system locate, match, and manage text.") for further details on regular expressions.

## Procedure

1. Navigate to AllNLU WorkbenchModels.  
   The Virtual Agent tab opens by default.
2. Select the tab corresponding to your model's application, then select the name of your model.
3. On the Model details tab, select the Vocabulary card.
4. Click Add a vocabulary.  
5. In the Type field of the Add a vocabulary window, select Pattern.
6. Add a regular expression that covers words or phrases in your users' utterances, and a synonym the model uses to predict the intent.  
   In this example, the regular expression covers several variations of "mfa authentication".

7. Click Save.  
   Result: Your pattern vocabulary item appears in the
   Vocabulary section of your Model screen. Each time a user's utterance
   contains one of the spelling variations, the system recognizes the meaning
   as multi-factor authentication, in this example.
**Related concepts**   

* [NLU vocabulary](https://servicenow-prod.fluidtopics.net/tq_m903i7eOWq4d8GevXmQ "Use NLU vocabulary items to help the system recognize the various ways your users express their requests. Use vocabulary sources to help the system recognize objects in tables or lists, such as names of conference rooms or catalog items.")
* [Using regular expressions in entities](https://servicenow-prod.fluidtopics.net/MLF7GQKcQp5lQTgeBdhGfw "Learn how to use regular expressions in your NLU entities to establish patterns that help the system locate, match, and manage text.")

*[\>]: and then


