Moderation#

The "Moderation" screen is intended for managing rule sets and individual moderation rules used to check or process messages in Sherpa AI Server.

No.Interface ElementDescription
1."Rule Sets" blockUsed to manage moderation rule sets.
1.1."Create" buttonOpens the form for creating a new rule set.
1.2."Refresh" buttonRefreshes the list of rule sets.
1.3."Duplicate" buttonAllows you to create a copy of the selected rule set.
1.4."Delete Selected" buttonAllows you to delete the selected rule sets.
1.5."Export to CSV" buttonExports the list of rule sets to a CSV file.
1.6."Export to XLSX" buttonExports the list of rule sets to an XLSX file.
1.7."Active" columnShows whether the rule set is enabled.
1.8."Name" columnDisplays the name of the rule set.
1.9."Description" columnDisplays the description of the rule set, if provided.
1.10."Rule Application Mode" columnDisplays the rule set application mode.
1.11."Created" columnDisplays the date and time when the rule set was created.
1.12."Modified" columnDisplays the date and time of the last modification of the rule set.
1.13.edit button Allows you to open the selected rule set for editing.
1.14.delete button Allows you to delete a specific rule set.
2."Rules" blockLower area of the screen, used to manage individual moderation rules.
2.1."Create" buttonOpens the form for creating a new rule.
2.2."Refresh" buttonRefreshes the list of rules.
2.3."Delete Selected" buttonAllows you to delete the selected rules.
2.4."Export to CSV" buttonExports the list of rules to a CSV file.
2.5."Export to XLSX" buttonExports the list of rules to an XLSX file.
2.6."Active" columnShows whether the rule is enabled.
2.7."Name" columnDisplays the name of the rule.
2.8."Description" columnDisplays the description of the rule, if provided.
2.9."Trigger Type" columnDisplays the type of condition that triggers the rule.
2.10."Actions" columnDisplays the action performed when the rule is triggered.
2.11."Created" columnDisplays the date and time when the rule was created.
2.12."Modified" columnDisplays the date and time of the last modification of the rule.
2.13.edit button Allows you to open the selected rule for editing.
2.14.delete button Allows you to delete a specific rule.
2.15.rows per page selector Allows you to set how many records are displayed in the table on one page.
2.16.record counter Shows the range of records displayed on the current page and the total number of records in the table.
2.17.page navigation Allows you to move between table pages: to the first page, previous page, next page, or last page. It also shows the current page number and the total number of pages, for example Page 1 of 1.

Create Rule Set#

To create a new rule set, click the "Create" button in the "Rule Sets" section and fill out the form that appears.

  • Name * — the rule set name.
  • Description — the rule set description.
  • Rule Application Mode * — a dropdown list that defines the order of processing multiple triggered rules for a single object. Value options:
    • Apply only the first triggered rule: Processing stops after the first rule (priority according to the order in the list).
    • Apply all triggered rules: All rules that match the conditions are processed sequentially (cascading execution).

Create Rule#

To create a new rule, click the "Create" button in the "Rules" section and fill out the form that appears.

No.Interface ElementDescription
1."Name" field

Required field for entering the rule name.

If the field is not filled in, it is highlighted in red and the "OK" button remains disabled.

2."Description" fieldUsed to enter a short description of the moderation rule.
3."Trigger" blockContains the settings for the condition under which the rule should be triggered.
3.1."Trigger Type" field

Required dropdown field used to choose how the user message is checked.

The selected trigger type determines which condition will trigger the moderation rule and which additional fields will appear in the rule configuration form:

  • "Dictionary" — the rule is triggered if one of the words listed in the word list is found in the user message. Suitable for simple checks using predefined words or phrases.
  • "Regular Expression" — the rule is triggered if the user message matches the specified regular expression. Used for more flexible checks of text patterns, such as number formats, addresses, or stable text structures.
  • "Local Model" — the rule is triggered based on a check performed by a local model. This option is used when a simple word list or regular expression is not enough and a model-based content assessment is required.
  • "External Service" — the rule is triggered based on a check performed through an external service. Used when moderation requires a third-party system or an external API.
3.2."Word List" fieldUsed to enter the words whose presence will be checked in the user request.
3.3.word list hint

Explains that:

  • the user request is checked for the presence of the specified words,
  • only one word must be placed on each line of the list,
  • the check is case-insensitive,
  • the rule is triggered if any word from the list is found in the user message.
4."Actions" blockContains the actions the system will perform when the rule is triggered.
4.1."Action Type" field

Required dropdown field used to choose the action performed by the system when the moderation rule is triggered.

The selected action type determines what happens to the user message or system response after the specified trigger is detected:

  • "Block" — blocks message processing or further scenario execution when the rule is triggered. Used if the message should not be passed on or needs to be stopped.
  • "Masking" — replaces found text fragments with hidden or anonymized values. Suitable for processing personal data, secrets, tokens, document numbers, and other sensitive information.
  • "Rewrite" — changes the message text according to the specified rules before further processing. Used when the message needs to be automatically rephrased or cleaned up.
  • "Redirect" — redirects message processing to another scenario, route, or handler. Used when the request must be passed to another process after the rule is triggered.
  • "Notification" — creates a notification when the rule is triggered. Used when you need to record the event and notify the responsible user or system about it.
  • "Fixed Response" — returns a predefined response instead of standard message processing. Suitable for cases where certain requests need to be answered with template text.
4.2.delete action button Allows you to delete the added action from the rule.
4.3.button Allows you to add another action that will be performed when the rule is triggered.
5."Test Text" fieldUsed to enter text that can be used to test the rule before saving it.
6."Run Test" buttonStarts checking the rule against the entered test text.

If the button is disabled, the required data for testing has not been entered.
7."Cancel" buttonCloses the window without creating the rule and without saving the entered data.
8."OK" buttonCreates the rule with the specified parameters.

It is active only if all required fields are filled in.

Edit Rule Set#

To view and edit the properties of a specific rule set, select it from the list and click the button . After that, a form with the rule set settings will open, where you can make the necessary changes. There are no new fields in the previously created rule set.

Edit Rule#

To view and edit the properties of a specific rule, select it from the list and click the button . After that, a form with the rule settings will open, where you can make the necessary changes. There are no new fields in the previously created rule.