Source: https://vaultcrmhelp.veeva.com/doc/Content/CRM_topics/VeevaAI/TextMonitoringAgent/EndUser/Configuration.htm

## Configuring Agentic Text Monitoring

### Configuring Agentic Text Monitoring for

[![Closed](../../../../../Skins/Default/Stylesheets/Images/transparent.gif)Admin Users](#)

To configure this feature:

1. Ensure [Configuring Vault AI in CRM](../../Configuration.htm) is complete.
2. Navigate to **Admin > Users & Groups > Permission Sets**.
3. Select the appropriate permission set.
4. Select the **Objects** tab.
5. Grant the following permissions:

   | Object | Object Permission | Object Types | Fields | Field Permission |
   | --- | --- | --- | --- | --- |
   | ai\_settings\_\_v | RE | None | * application\_profile\_\_v * vector\_sync\_scope\_\_v | Edit |
6. Navigate to **Business Admin > Objects > AI Settings**.
7. Select the **Global AI Settings** record.
8. Populate the **Vector Sync Scope** (vector\_sync\_scope\_\_v) setting with the appropriate values to determine which types of content are included in the Vector Database:
   * compliance\_documents\_\_v
   * pi\_documents\_\_v

[![Closed](../../../../../Skins/Default/Stylesheets/Images/transparent.gif)End Users](#)

To configure Agentic Text Monitoring:

1. Ensure the following configuration is complete:

   * [Configuring Vault AI in CRM](../../Configuration.htm)
   * [Managing the Vector Database](../../RefreshVectorDB.htm)
2. Ensure users have Execute permission to the **Text Monitoring Agent**:

   * Navigate to **Admin > Users & Groups > Permission Sets**
   * Select the appropriate permission set
   * Select the **Agents** tab
   * Select the Execute checkbox for the **Text Monitoring Agent** (text\_monitoring\_agent\_\_v)
3. Select the **Objects** tab.
4. Grant the following permissions:

   | Object | Object Permission | Object Types | Fields | Field Permission |
   | --- | --- | --- | --- | --- |
   | ai\_settings\_\_v | At least R | None | * text\_monitoring\_check\_\_v * text\_monitoring\_block\_save\_\_v | Read |
5. Edit the appropriate Vault Messages for safety reporting, using the Message Catalog translation process described in [Managing Vault Messages and Veeva Messages](../../../Getting_Started/SettingUp/Veeva_Messages.htm):

   * **SAFETY\_REPORT;;crmai\_\_v** - To change the message displayed to users for potential product safety issues, edit the Text field on this Vault Message. The default value is: A safety report is required for information highlighted in purple. Please click here to report in the safety system.
   * **SAFETY\_SYSTEM\_LINK;;crmai\_\_v** - To provide users a link to your organization's external safety reporting system, populate the Text field on this Vault Message with the appropriate link. The provided link is hyperlinked in the safety reporting message.

   If a safety reporting link is not provided in the SAFETY\_SYSTEM\_LINK;;crmai\_\_v Vault Message, it is recommended to remove the sentence in the SAFETY\_REPORT;;crmai\_\_v Vault Message instructing users to click here.
6. Ensure the **SAFETY\_REPORT;;crmai\_\_v** and **SAFETY\_SYSTEM\_LINK;;crmai\_\_v** messages are marked as Active.
7. Navigate to **Business Admin > Objects > AI Settings**.
8. Set the **text\_monitoring\_check\_\_v** field to one of the following values:

   * In Edit (in\_edit\_\_v) - The agent analyzes text each time the user exits a field while editing the record. This is the default value.
   * On Save and Submit (save\_submit\_\_v) - The agent analyzes text only when the user saves or submits the record
9. Set the **text\_monitoring\_block\_save\_\_v** field to one of the following values:

   * Selected (true) - Prevents users from saving or submitting a record with unresolved issues. This is the default value.
   * Deselected (false) - Enables users to save or submit a record with unresolved issues or when the text is not checked by the agent
10. Navigate to **Admin > Configuration > Vault AI Setup > Agents**.
11. Select the **Text Monitoring Agent**.
12. Select **Edit**.
13. Select **Active** in the Status picklist.
14. Select **Save**.
15. Expand the **Actions** section.
16. Verify the appropriate agent actions are Active for the agent:

    * Monitor Call Notes - Monitors the Call Text (call\_notes\_\_v) field on the call report

### Providing Additional Compliance Context

[![Closed](../../../../../Skins/Default/Stylesheets/Images/transparent.gif)Providing PI Reference Documents](#)

To ensure Agentic Text Monitoring accesses the appropriate prescribing information for each product, provide PI reference documents in PromoMats/MedComms. Agentic Text Monitoring references these records when determining which text needs to be flagged as a potential compliance or safety risk, relative to each product’s prescribing information.

For more on configuring and using PI documents in Vault CRM, see [Accessing ISI and PI Documents for CLM Content in the HCP Content Player](../../../Multichannel/Engage/Share/ISIPIDoc.htm). For information on managing the connection between Vault CRM and PromoMats/MedComms, see [Managing Field Mappings Between Vault CRM and PromoMats/MedComms](../../../Multichannel/CLM/ConfiguringCLM/ManageFieldMapping.htm).

Alternatively, PI reference documents can be manually created in Vault CRM:

1. Navigate to **Business Admin > Objects > reference\_document\_\_v**.
2. Select **Create**.
3. Select the **PI** object type.
4. Populate the following fields:

   * reference\_document\_status\_\_v - Approved
   * product\_\_v - Appropriate product. This value must match a my\_setup\_products\_\_v record where the company\_product\_\_v checkbox is selected.
5. Select **Save**.
6. Navigate to **Attachments** on the reference\_document\_\_v record.
7. Upload or drag and drop the appropriate document file to the **reference\_document\_\_v** record.

   Attach one file per reference\_document\_\_v record. Additional files are not included in the agent's compliance context.
8. Initialize a [Vector Database refresh](#Initiali).

[![Closed](../../../../../Skins/Default/Stylesheets/Images/transparent.gif)Providing Compliance Documents](#)

To include company-specific or brand-specific definitions of compliance in Agentic Text Monitoring’s analysis, provide documents with the compliance\_\_v document type in Vault CRM. Optionally, a product and country can be specified on each compliance document.

To provide compliance documents:

1. Upload or create the document in Vault CRM, using one of the supported methods. For information on supported methods, see [Creating Documents](https://platform.veevavault.help/en/gr/15085/) on the Vault platform help site.
2. Select the **compliance\_\_v** document type when prompted.
3. Select the **Standard** document lifecycle.
4. Populate either or both of the following fields (optional):

   * country\_\_v - Appropriate country, if the compliance information is country-specific. This value is matched to the call address’ country, or the user’s country. If a country is not specified, the compliance information applies across countries.
   * product\_\_v - Appropriate product, if the compliance information is product-specific. This value is matched to the user’s My Setup Products. If the field is not populated, the compliance information applies across products.
5. Approve the completed document. For information on approving documents, see [Using Document Workflows](https://platform.veevavault.help/en/gr/50506/) on the Vault platform help site.
6. Initialize a [Vector Database refresh](#Initiali).

When creating compliance documents, ensure any language referencing user roles, countries, products, or brands uses the same natural language wording as the corresponding label in the Vault CRM data model. This enables the Large Language Model (LLM) to consistently apply the information, using the context available in Vault CRM.

[![Closed](../../../../../Skins/Default/Stylesheets/Images/transparent.gif)Providing PI Reference and Compliance Documents in Non-English Languages](#)

To support global teams, Agentic Text Monitoring can process PI reference and compliance documents in multiple languages. When providing documents in a non-English language:

* Upload the appropriate PI reference and compliance documents in a local language
* For compliance documents, select the appropriate country from the Country field for the document. For example, for compliance documents to be used in Spain, admins can upload the documents in the Spanish language and then select Spain as the document country. This allows the AI to retrieve and cross-reference the correct localized documents against the user's inputs.
* Ensure User Locales are set to the user's local language. While Agentic Text Monitoring can analyze text written in any language supported by the LLM, setting the User Locale to the local language ensures the user experience is consistent and relevant information displays in the user's language, including alerts, buttons, and system messages.

User inputs are checked in any language supported by the base Large Language Model (LLM). Agentic Text Monitoring’s responses are displayed in the language defined for the user in Vault CRM, as are Vault CRM actions, alerts, errors, and labels.

### Initializing the Vector Database as

[![Closed](../../../../../Skins/Default/Stylesheets/Images/transparent.gif)Admin Users](#)

After completing the configuration above, activating the agent, and uploading documents, initialize the vector database by running a full refresh.

To initialize the database:

1. Ensure configuration is complete, Agentic Text Monitoring is active, and the appropriate PI or Compliance documents are uploaded to Vault CRM.
2. Navigate to **Admin > Configuration > CRM AI Management > AI Configurations**. The AI Configurations page displays the Vector Database Sync section, which contains a table of refresh jobs from the last ten days.
3. Select **Full Refresh**.
4. Select Compliance Documents, PI Documents, or both, depending on the content loaded.
5. Select **Continue**.
6. Select **Continue** in the confirmation pop-up to start the refresh process.

During the refresh, vectors are created for approved compliance and PI documents. When the refresh completes, the status updates to Finished in the Vector Database Sync table and a message displays indicating the number of documents loaded.

### Refreshing the Vector Database as

[![Closed](../../../../../Skins/Default/Stylesheets/Images/transparent.gif)Admin Users](#)

Because automatic database updates are not supported for compliance or PI documents, the Vector Database must be manually refreshed whenever these documents are added or updated. Select only the necessary document types. Including additional types can result in extra token costs and avoidable downtime for the agents.

1. Navigate to **Admin > Configuration > CRM AI Management > AI Configurations**.
2. Select **Full Refresh**.
3. Select **Compliance Documents**, **PI Documents**, or both.
4. Select **Continue**.
5. Select **Continue** in the confirmation pop-up to start the refresh process.

For more information on managing the database on an ongoing basis, see [Managing the Vector Database](../../RefreshVectorDB.htm).

#### Considerations

Before refreshing the Vector Database, ensure end users are not actively using AI features in Vault CRM, as they may receive inaccurate responses during a refresh. Perform database refreshes prior to enabling AI for end users or during a designated maintenance window.

### Related Topics

[Agentic Text Monitoring Overview](TMOverview.htm)

[Capturing Call Text with Agentic Text Monitoring](TMCallText.htm)
