Source: https://vaultcrmhelp.veeva.com/doc/Content/CRM_topics/VeevaAI/InsightQualityAgent/CustomRules.htm

## Custom Rules for Agentic Insight Quality

Business Admins can create custom agent rules to tailor Agentic Insight Quality’s feedback to their organization's specific strategic needs. These rules can be translated into any of Vault CRM’s supported languages. Business admins can also edit or delete existing custom rules.

Customers are responsible for testing and validating the responses for any custom rules that are configured.

**Who can use this feature?**

* Business Admins — Browser
* [Creating Custom Rules](#Creating)
* Admins — Browser
* [Translating Custom Rules](#Translat)
* A Veeva AI license is required

### Configuring Custom Rules for

[![Closed](../../../../Skins/Default/Stylesheets/Images/transparent.gif)Business Admins](#)

To configure this feature:

1. Ensure [Configuring Agentic Insight Quality](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 |
   | --- | --- | --- | --- | --- |
   | agent\_rule\_\_v | CRED | insight\_quality\_rule\_\_v | * display\_order\_\_v * guideline\_\_v * insight\_type\_\_v * instruction\_\_v * name\_\_v * status\_\_v * translated\_guideline\_\_v * translated\_rule\_name\_\_v | Edit |

### Creating Custom Rules as

[![Closed](../../../../Skins/Default/Stylesheets/Images/transparent.gif)Business Admins](#)

Business admins can create their own custom agent rules for use with Agentic Insight Quality. Up to ten active rules are supported, including both Veeva-provided rules and custom rules. If admins attempt to add a rule that would bring the number of active rules to more than ten, a message displays indicating they must first inactivate a rule.

Agentic Insight Quality checks insights against the following Veeva-provided rules by default:

* Identification
* Observation
* Rationale
* Business Relevance
* Observation Context
* Writing Style

Business admins can activate or deactivate any of these default rules. However, the Veeva-provided default rules cannot be edited or deleted.

Business admins only need to create the rules in English. By default, all rules are translated into the user's language, and responses from the AI in the quality tab are displayed in the language in which the insight was entered. The ten rule limit does not differentiate between language or country.

To create a custom rule for Agentic Insight Quality:

1. Navigate to **Business Admin > Objects > Agent Rules**.
2. Select **Create**.
3. Select the **Insight Quality** object type.
4. Enter a **Rule Name** (for example, Competitive Intelligence Check).
5. Enter detailed instructions for the LLM in the **Instruction** field. This defines how the agent should evaluate the text. For example: Flag insights that mention a competitor product but fail to mention the specific clinical trial associated with it.
6. Select Medical Insights in the **Insight Type** field.
7. Populate the **Guideline** field with the text to be displayed in Agentic Insight Quality UI, to help the end user understand the requirement.
8. Assign a number (for example, 7) in the **Display Order** field to specify where this rule displays in the user's Guidelines tab. Guidelines display in ascending order based on the Display Order field for each rule.
9. Set the **Status** to Active.
10. **Save** the record.

To delete a custom rule, navigate to Business Admin > Objects > Agent Rules and delete the record for the custom rule. Veeva-provided rules cannot be deleted, and only the Status and Display Order can be edited.

**Example:** A customer decides to use 4 of the 6 Veeva-provided rules, and one custom rule. The image below depicts the two Veeva-provided rules in Inactive status, and the custom rule with a Display Order set to 4.

![](../../../Resources/Images/VeevaAI/InsightQuality/CustomInsightQualityRulesExample.png)

### Translating Custom Rules as

[![Closed](../../../../Skins/Default/Stylesheets/Images/transparent.gif)Admins](#)

To provide a localized experience, admins can designate Vault Messages that are updated by the automated Vault CRM translation process. After creating a custom rule, follow the process below to ensure users see translated values for the Rule Name and Guideline.

Before creating individual translations, admins must designate a message group in the Message Catalog for custom rules:

1. Navigate to **Admin > Configuration > Message Catalog**.
2. Verify whether the message group **vaultcrm\_custom\_messages\_\_c** already exists.
3. Select **Create** if it does not exist.
4. Enter vaultcrm\_custom\_messages\_\_c in the **Name** field.
5. Select **Save**.

To create the specific entries for your Rule Name and Guideline:

1. Navigate to **Admin > Configuration > Message Catalog > vaultcrm\_custom\_messages\_\_c**.
2. Select **Create**.
3. Enter a **Name** for the message, for example competitor\_check\_name\_\_c.
4. Enter a **Default Value** in your primary language (usually English).
5. Select **Save**.
6. Navigate to **Business Admin > Objects > Agentic Insight Quality Rule**.
7. Select the appropriate record.
8. Populate the Translated Rule (translated\_rule\_\_v) and Translated Guideline (translated\_guideline\_\_v) fields with the appropriate messages, using the following syntax: message\_name\_\_c;;vaultcrm\_custom\_messages\_\_c.

   For example:

   Translated Rule Name: competitor\_check\_name\_\_c;;vaultcrm\_custom\_messages\_\_c

   Translated Guideline: competitor\_check\_guideline\_\_c;;vaultcrm\_custom\_messages\_\_c
9. Select **Save**.

The Vault Message to Veeva Message Copy job process runs on a scheduled basis to update the Rule and Guideline text with translated values. For more information, see [Managing Vault Messages and Veeva Messages](../../Getting_Started/SettingUp/Veeva_Messages.htm) and [Using the Message Catalog](https://platform.veevavault.help/en/gr/58076/).

### Related Topics

[Agentic Insight Quality Overview](InsightQualityAgentOverview.htm)

[Agentic Insight Quality for Medical Insights](InsightQualityAgentMedicalInsights.htm)

[Flightpath: Agentic Insight Quality](https://vaultcrmflightpath.veeva.com/doc/Content/VeevaAI/InsightQualityAgent/1.Intro.htm)
