Search rules let you define whichknowledge sources(or parts of knowledge sources) an AI agent should use in different situations when creating AI-generated answers to questions from your customers.

What's my plan?
All Suites Team, Growth, Professional, Enterprise, or Enterprise Plus
Support Team, Professional, or Enterprise

Summary: ◀▼

Configure AI agent search rules to control which knowledge sources and content are used for generated answers. Filter sources by article, locale, label, or segment, and apply rules in procedures or dialogues to tailor answers to conversation context. You can also edit the default rule to change which sources the agent searches when no specific rule applies.

Search rules let you define which knowledge sources (or parts of knowledge sources) an AI agent should use in different situations when creating AI-generated answers to questions from your customers.

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 procedure
  • Adding a search rule to a dialogue
  • Editing the default search rule

Related articles:

  • Connecting knowledge sources to power generative replies in AI agents

About search rules

In the AI agents workspace, 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 an AI-generated answer to a customer.

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 article titles, locales, labels, and segments to customize the conversational experience.

When you create a search rule, you can specify which segments should trigger it. You can also add the rule to a procedure or dialogue later. During a conversation with a customer, the search rule is applied when either of the following is true:

  • A conversation’s session data matches the segment specified in the search rule.
  • The conversation reaches the point in a procedure or dialogue where the search rule was added.

In either of these scenarios, the AI agent searches only the knowledge sources configured in your rule when forming its AI-generated reply.

Without a specific search rule applied, the default search rule is applied, which searches all knowledge sources unless you've configured it differently.

Creating a search rule

Search rule control which knowledge sources your AI agent should use to create an AI-generated answer in a specific situation.

To create a search rule

  1. In the AI agents workspace, select the AI agent you want to work with.
  2. Click Build in the sidebar, then select Audiences > Search rules.
  3. Click Create search rule.

    The Create search rule window opens.

  4. In Name, enter a descriptive name for your search rule.

    This name appears only on the Search rules page to help you recognize and maintain your rules.

  5. In Description, add a description for the rule to help you remember what it’s for and to allow the AI to understand the purpose of the rule.
  6. In Knowledge source, select a knowledge source that you’ve previously imported.
  7. (Optional) If you want this rule to search only a subset of the selected knowledge source:
    1. Select Set filter criteria.
    2. Leave Match ALL conditions selected, or else select Match ANY conditions to determine how the rule’s conditions should be evaluated.
      Note: It's important to make sure your conditions make logical sense together. If you select Match ALL conditions but your conditions conflict, no results will be returned.
    3. In Select a parameter, select Article, Locale, or Labels.

      If your Zendesk account was created before March 10, 2026, the Article parameter doesn’t exist and you see a URL parameter instead.

      Note: Search rules based on labels don't work for Confluence knowledge sources.
    4. In Equals, select one of the available operators: Equals, Does not equal, Contains, Includes any, Includes all, or Includes none
      Note: If you’re creating a search rule based on an article, use Equals or Does not equal. If you're creating a rule based on a single label, use Contains. If you're creating a rule based on multiple labels, use Includes any, Includes all, or Includes none.
    5. In Add value, enter the actual language and title, locale, or article label (based on the parameter you selected above) that you want the rule to evaluate.

      If you see the URL parameter, enter the actual URL as the value.

    6. (Optional) Click Add condition and repeat the previous three steps to add a new condition to filter the search rule.

  8. (Optional) Click Add knowledge source and repeat steps 7–8 to add and configure another knowledge source for this search rule.
  9. Under Application criteria, in When to apply, select one of the following options:
    • Only when referenced in procedures or dialogues: The search rule applies only when it’s been specifically referenced in a procedure or dialogue.
    • When ALL segments match or when referenced: The search rule applies when it matches all of the segments you select in the next step, or when it’s been specifically referenced in a procedure or dialogue.
    • When ANY segment matches or when referenced: The search rule applies when it matches any of the segments you select in the next step, or when it’s been specifically referenced in a procedure or dialogue.
  10. If you selected When ALL or When ANY above, click Apply to segments and select which segments should trigger the search rule.

    If a conversation’s session data matches one of the selected segments, the search rule is applied to any AI agent response that uses generative replies or agentic AI.

  11. Click Save.
  12. (Optional) Add your search rule to a procedure or dialogue following the steps below.

Adding a search rule to a procedure

Note: This section applies only to AI agents with agentic AI.

You can add your search rule to a procedure to determine which knowledge sources your AI agent should use when providing an AI-generated answer.

To add a search rule to a procedure

  1. Open the procedure you want to add a search rule to.
  2. In the free-text box, enter text describing when your search rule should be applied.
  3. Specify the search rule by entering a forward slash (/) and selecting Share knowledge answer with search rule.

  4. Select the search rule you want to apply.
  5. Click Update procedure.

Adding a search rule to a dialogue

You can add a search rule to a dialogue to determine which knowledge sources your AI agent should use when providing a generative reply.

Search rules must be added to a Generative replies block within a dialogue.

Tip: 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 customer’s queries based on parameters in the conversation session.

To add a search rule to a dialogue

  1. Open the dialogue builder for the dialogue you want to add a search rule to.
  2. Select the Generative replies block where you want the search rule to apply.
  3. Toggle Use default search rule off.
  4. In Select rule, select the search rule you created.

  5. 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 match any segments or be added to a procedure or dialogue.

To edit the default search rule

  1. In the AI agents workspace, select the AI agent you want to work with.
  2. Click Build in the sidebar, then select Audiences > Search rules.
  3. To the right of the Default (Default) search rule, click the options menu () and select View.

  4. In the Edit rule pane, configure the default search rule as desired.

    For help, see Creating a search rule.

Article Q&A

Click to view

How do I create a search rule for an AI agent?

You must be a client admin. In the AI agents workspace, select the agent, go to Build > Audiences > Search rules, and click Create search rule. Name and describe the rule, select an imported knowledge source, choose when it applies (by segment, procedure/dialogue reference, or both), then save it. You can optionally add filters or additional knowledge sources.

How can I limit a search rule to specific articles or content?

When creating the rule, select Set filter criteria and choose Article, Locale, or Labels, then set conditions and values. Use Match ALL or Match ANY to control how conditions are evaluated; conflicting conditions under Match ALL return no results. For article criteria, use Equals or Does not equal; for one label, use Contains; for multiple labels, use Includes any, Includes all, or Includes none. Label-based rules don’t work with Confluence sources. Accounts created before March 10, 2026, use a URL parameter instead of Article.

How do I apply a search rule in a procedure, dialogue, or based on conversation segments?

A rule can apply when session data matches its selected segments, or when a procedure or dialogue reaches the point where the rule is referenced. For a procedure (agentic AI only), enter / in its free-text box, select Share knowledge answer with search rule, choose the rule, and update the procedure. For a dialogue, select a Generative replies block, turn off Use default search rule, choose the rule, and publish.

Can I change which knowledge sources my AI agent searches by default?

Yes. The default rule searches all imported knowledge sources unless you change it. In Build > Audiences > Search rules, open the options menu next to Default (Default), select View, and configure the rule in the Edit rule pane. You can’t delete the default rule, and it doesn’t need segment criteria or a procedure/dialogue reference.

Powered by Zendesk