Guides
Breadcrumbs

Model contextualization

Overview

Contextualization allows you to enhance the functionality of your model by defining context groups and context rules. You can create entities within specific xPacks, assign static or dynamic values based on conditions (such as order or regex), and classify entities for easier filtering.

Managing contexts

You can organize your automation strategies by creating specific contexts. Use the Global context for system defaults or create new contexts to manage rules for specific areas.

Create a context

To create a new context:

  1. Navigate to the Contextualization tab.

    nluc_1_1.png
  2. Select Create Context.

    nluc_2.png
  3. In the Create Context dialog box, configure the following settings:

    • Context Name: Enter a unique name for the context group.

    • miniApp Name: Type the name of the miniApp and press Enter.

    • miniApp Type: Type the miniApp type and press Enter.

    • Tag: Add any relevant tags to categorize the context.

    • Level: Enter the hierarchy level. The valid values are normal, error, or unrecovered.

    • Prompt: Enter the associated prompt text.

      image-20260114-165228.png


To create a valid context, you must fill in at least one of the available fields (miniApp Name, miniApp Type, Tag, Level, or Prompt).

  1. Select Create.

Editing a context

To modify an existing context:

  1. Hover over the context card you want to modify.

  2. Select the Edit icon (pencil).

nluc_3.png
  1. Update the fields in the Edit Context dialog box.

  2. Select Save.

You cannot edit a context that is currently in use (referenced by a rule). If the context has a CONTEXT IN USE badge, the Edit icon will be disabled. You must delete the associated rules first.

image (12) 1.png

Deleting a context

To remove a context:

  1. Hover over the context card you want to remove.

  2. Select the Delete icon (trash can).

  3. In the confirmation dialog box, select Delete.

You cannot delete a context that is currently in use. If the context has a CONTEXT IN USE badge, the Delete icon will be disabled.

Managing context rules

Context rules allow you to define advanced logic for dynamic entities and contextual understanding. You can specify matching patterns and the resulting actions, such as marking entities or setting feature values.

Accessing context rules

You can manage rules within a specific context or view a comprehensive list of all rules configured in the model.

To view rules for a specific context:

  1. Navigate to the Contextualization tab.

  2. Locate the specific context card (for example, Global or a custom context like ContextExample).

  3. Select View Rules on the card to open the rules list for that context.

nluc_6.png

To view all context rules:

  1. Navigate to the Contextualization tab.

  2. Select View all Rules located in the upper-right corner.

    nluc_7.png
  3. A list displays all rules from every context group. You can use the search bar to find specific rules or select a rule to edit it.

    image (11) 1.png


Creating a context rule

To add a new rule:

  1. Select View Rules on a specific context card, or select Create Rule to add a rule to the Global context.

nluc_4.png
  1. In the Context Rule Creation page, configure the following mandatory fields:

    • Context rule name: Enter a descriptive name for the rule.

    • Description (optional): Enter a brief description of the rule's purpose.

    • Context: Select the context group from the drop-down list (for example, Global).

  2. Expand the Formatting Rules section to view guidance on how to build a context rule. This section provides syntax examples for entities, feature assignments, and values.

    nluc_8.png
  3. Define the logic for the rule in the fields below:

    1. Matching Patterns: Define the pattern to look for (for example, @Entity="Value" or regex).

    2. Action: Select the operation to perform when the pattern is matched (for example, marking an entity, unmarking it, or setting a feature value).

nluc_5_2.png

Example: In the rule shown above:

  • Matching Patterns: @State="lost" This condition checks if the State entity has the value "lost".

  • Action: @PrivateLostIndicator >> @PrivateEntity="lost" If the condition is met, the system marks the PrivateLostIndicator entity and sets the value of the PrivateEntity to "lost".

  1. Select Save Context Rule.

Viewing and editing rules

Once created, rules appear in the Context Rules list.

image-20260119-154523.png
  • To modify a rule, select View & Edit Rule.

  • To delete a rule, select the Delete icon (trash can).