Search rules let you define which knowledge sources an advanced AI agent should use in different situations when creating AI-generated answers to questions from your users. These types of AI-generated answers are known as generative replies.
You must be a client admin to configure search rules.
This article contains the following topics:
- About search rules
- Creating a search rule
- Adding a search rule to a dialogue
- Editing the default search rule
Related articles:
About search rules
In AI agents - Advanced, a default search rule is already configured for you. This default rule is configured so that the AI agent searches all articles from all imported knowledge sources when sending a generative reply to a user.
However, you can create additional search rules to customize which knowledge sources are searched in specific scenarios. For example, you can create search rules based on user language or other session parameters to customize the experience for different user segments.
After you create a search rule, you add it to a Generative replies block within a dialogue. When a user reaches this block within a conversation flow, the AI agent searches only the knowledge sources configured in your rule when forming a generative reply. Without a search rule applied, all imported knowledge sources are searched.
It’s good practice to use search rules in combination with conditional blocks. That way, you can ensure that the AI agent provides the most relevant and accurate answers to your user’s queries based on parameters in the conversation session.
Creating a search rule
Creating a search rule is the first step in determining which knowledge sources your AI agent should use in a specific situation.
To create a search rule
- In the top-right corner, use the AI agent drop-down field to select the AI agent you want to create a search rule for.
- In the left sidebar, click either of the following:
- Settings > Generative replies > Search rules for a zero-training AI agent.
- Content > Knowledge > Search rules for an agentic AI agent.
- Click Create rule.
- In Rule name, enter a descriptive name.
This name appears only on the Search rules page to help you recognize and maintain your rules.
- (Optional) In Description, add a description for the rule to help you remember what it’s for.
- In Search knowledge source, select a knowledge source that you’ve previously imported.
- Expand the Advanced settings section to add conditions for the selected knowledge source:
- In Match condition below, select All or Any to determine how the rule’s conditions should be evaluated.
- In Select a parameter, select url, locale, or labels.
- In the Equals field, leave Equals selected or else select from one of the other available operators: Does not equal, Contains, Includes any, Includes all, Includes none
Note: If you're creating a search rule based on labels, you must use Includes any, Includes all, or Includes none.
- In Add value, enter the actual URL, locale, or label (based on the parameter you selected above) that you want the rule to evaluate.
- (Optional) Click the plus icon (+) and repeat steps 7.1–7.4 to add and configure another condition.
- (Optional) Click the plus icon (+) below the conditions for your first knowledge source and repeat steps 6–7 to add and configure another knowledge source for this search rule.
- Click Save.
- Add your search rule to a dialogue following the steps below.
Adding a search rule to a dialogue
Adding your search rule to a dialogue is the second step in determining which knowledge sources your AI agent should use in a specific situation.
Search rules must be added to a Generative replies block within a dialogue.
To add a search rule to a dialogue
- Open the dialogue builder for the dialogue you want to add a search rule to.
- Select the Generative replies block where you want the search rule to apply.
- Toggle off Use default search rule.
- In Select rule, select the search rule you created.
- Click Publish.
Editing the default search rule
A default search rule exists for your AI agent already. This rule is configured to use all imported knowledge sources.
You can’t delete the default rule, but you can edit it if you want to configure a different default behavior. For example, you can edit it to use one specific knowledge source as the default.
Because the default search rule controls the AI agent’s default search behavior, it doesn’t have to be added to a dialogue.
To edit the default search rule
- In the top-right corner, use the AI agent drop-down field to select the AI agent you want to create a search rule for.
- In the left sidebar, click either of the following:
- Settings > Generative replies > Search rules for a zero-training AI agent.
- Content > Knowledge > Search rules for an agentic AI agent.
- To the right of the Default (Default) search rule, click the options menu (
) and select View.
- In the Edit rule pane, configure the default search rule as desired.
For help, see Creating a search rule.
0 comments
Please sign in to leave a comment.