Configuring search rules for knowledge sources for AI agents

<body>
<p id="docs-hc-snippet" style="display: none;">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.</p>
<div class="article-banners">
<div id="docs-wmp-link">
<a href="https://support.zendesk.com/hc/en-us/articles/5411234991258-plan" rel="noopener" target="_blank">What's my plan?</a>
</div>
<div class="article-banner" id="suite_all">
<table>
<tbody>
<tr>
<td>
<strong>All Suites</strong>
</td>
<td>Team, Growth, Professional, Enterprise, or Enterprise Plus</td>
</tr>
</tbody>
</table>
</div>
<div class="article-banner" id="support_all">
<table>
<tbody>
<tr>
<td>
<strong>Support</strong>
</td>
<td>Team, Professional, or Enterprise</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="body">

<p class="p">Search rules let you define which <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357749301658" target="_blank">knowledge sources</a> (or parts of knowledge sources) an AI
agent should use in different situations when creating AI-generated answers to questions
from your customers.</p>
<p class="p">You must be a <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408832171034#topic_thq_lnf_dgc" target="_blank">client admin</a> to configure search rules. </p>
<p class="p">This article contains the following topics: </p>
<ul class="ul" id="knowledge_search_rules__ul_yrd_wmy_cfc">
<li class="li"><a class="xref" href="#topic_kzl_wmy_cfc">About search rules</a></li>
<li class="li"><a class="xref" href="#topic_ar3_pxw_cfc">Creating a search rule</a></li>
<li class="li"><a class="xref" href="#topic_rvx_cx3_vfc">Adding a search rule to a procedure</a></li>
<li class="li"><a class="xref" href="#topic_pf1_xmy_cfc">Adding a search rule to a dialogue</a></li>
<li class="li"><a class="xref" href="#topic_qrq_xmy_cfc">Editing the default search rule</a></li>
</ul>
<p class="p">Related articles:</p>
<ul class="ul" id="knowledge_search_rules__ul_f4w_pxw_cfc">
<li class="li"><a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357749301658" target="_blank">Connecting knowledge sources to power generative
replies in AI agents</a></li>
</ul>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_kzl_wmy_cfc">
<h2 class="title topictitle2" id="ariaid-title2">About search rules</h2>
<div class="body">
<p class="p">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. </p>
<p class="p">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 <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9413046533530" target="_blank">segments</a> to customize the conversational experience.</p>
<p class="p">When you create a search rule, you can specify which <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9413046533530" target="_blank">segments</a> should trigger it. You can also add the rule to
a <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8979864563610" target="_blank">procedure</a> or <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357749494810" target="_blank">dialogue</a> later. During a conversation with a customer,
the search rule is applied when either of the following is true: </p>
<ul class="ul" id="topic_kzl_wmy_cfc__ul_q1q_qcs_mhc">
<li class="li">A conversation’s session data matches the segment specified in the search
rule.</li>
<li class="li">The conversation reaches the point in a procedure or dialogue where the search
rule was added.</li>
</ul>
<p class="p">In either of these scenarios, the AI agent searches only the knowledge sources
configured in your rule when forming its AI-generated reply.</p>
<p class="p">Without a specific search rule applied, the default search rule is applied, which
searches all knowledge sources unless you've <a class="xref" href="#topic_qrq_xmy_cfc">configured it differently</a>.</p>
</div>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested1" id="topic_ar3_pxw_cfc">
<h2 class="title topictitle2" id="ariaid-title3">Creating a search rule</h2>
<div class="body">
<p class="p">Search rule control which knowledge sources your AI agent should use to create an
AI-generated answer in a specific situation. </p>
<p class="p"><strong class="ph b">To create a search rule</strong></p>
<div class="p">
<ol class="ol" id="topic_ar3_pxw_cfc__ol_lbh_fz3_vfc">
<li class="li"><span class="ph">In the AI agents workspace, <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357756913178#topic_t25_qvj_tdc" target="_blank">select the AI agent</a> you want to work
with.</span></li>
<li class="li"><span class="ph">Click <img class="image" id="topic_ar3_pxw_cfc__d9e176" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/ai_agents_content_icon.png">
<strong class="ph b">Content</strong> in the sidebar, then select <strong class="ph b">Search rules</strong>.</span></li>
<li class="li">Click <strong class="ph b">Create search rule</strong>.<p class="p">The Create search rule window
opens.</p>
<p class="p"><img class="image" id="topic_ar3_pxw_cfc__image_cxb_d1j_vfc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/aiaa_create_search_rule_updated_Jun25.png" width="600"></p>
</li>
<li class="li">In <strong class="ph b">Name</strong>, enter a descriptive name for your search rule.<p class="p">This name
appears only on the Search rules page to help you recognize and maintain
your rules. </p>
</li>
<li class="li">In <strong class="ph b">Description</strong>, 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.</li>
<li class="li">In <strong class="ph b">Knowledge source</strong>, select a <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357749301658" target="_blank">knowledge source that you’ve previously
imported</a>.</li>
<li class="li">(Optional) If you want this rule to search only a subset of the selected
knowledge source: <ol class="ol" id="topic_ar3_pxw_cfc__ol_a3x_31j_vfc" type="a">
<li class="li">Select <strong class="ph b">Set filter criteria</strong>. </li>
<li class="li">Leave <strong class="ph b">Match ALL conditions</strong> selected, or else select <strong class="ph b">Match
ANY conditions</strong> to determine how the rule’s conditions should
be evaluated.<div class="p">
<div class="note" id="topic_ar3_pxw_cfc__note_i54_mbj_vfc">
<span class="notetitle">Note:</span> It's important to make sure your
conditions make logical sense together. If you select
<strong class="ph b">Match ALL conditions</strong> but your conditions
conflict, no results will be returned. </div>
</div>
</li>
<li class="li">In <strong class="ph b">Select a parameter</strong>, select <strong class="ph b">Article</strong>, <strong class="ph b">Locale</strong>,
or <strong class="ph b">Labels</strong>.<p class="p">If your Zendesk account was created before March
10, 2026, the Article parameter doesn’t exist and you see a URL
parameter instead.</p>
<div class="p">
<div class="note" id="topic_ar3_pxw_cfc__note_ddq_xmp_qhc">
<span class="notetitle">Note:</span> Search rules based on labels don't
work for Confluence knowledge sources.</div>
</div>
</li>
<li class="li">In <strong class="ph b">Equals</strong>, select one of the available operators:
<strong class="ph b">Equals</strong>, <strong class="ph b">Does not equal</strong>, <strong class="ph b">Contains</strong>,
<strong class="ph b">Includes any</strong>, <strong class="ph b">Includes all</strong>, or <strong class="ph b">Includes
none</strong><div class="note" id="topic_ar3_pxw_cfc__note_ppl_41j_vfc">
<span class="notetitle">Note:</span> 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.</div>
</li>
<li class="li">In <strong class="ph b">Add value</strong>, enter the actual language and title, locale, or
article label (based on the parameter you selected above) that you
want the rule to evaluate.<p class="p">If you see the URL parameter, enter the
actual URL as the value.</p>
</li>
<li class="li">(Optional) Click <strong class="ph b">Add condition</strong> and repeat the previous three
steps to add a new condition to filter the search rule.<p class="p"><img class="image" id="topic_ar3_pxw_cfc__image_p2v_x1j_vfc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/aiaa_search_rules_set_filter.png" width="600"></p>
</li>
</ol>
</li>
<li class="li">(Optional) Click <strong class="ph b">Add knowledge source</strong> and repeat steps 7–8 to add and
configure another knowledge source for this search rule.</li>
<li class="li">Under Application criteria, in <strong class="ph b">When to apply</strong>, select one of the
following options: <ul class="ul" id="topic_ar3_pxw_cfc__ol_dcs_2bj_vfc">
<li class="li">
<strong class="ph b">Only when referenced in procedures or dialogues</strong>: The search
rule applies only when it’s been specifically referenced in a <a class="xref" href="#topic_rvx_cx3_vfc">procedure</a> or
<a class="xref" href="#topic_pf1_xmy_cfc">dialogue</a>. </li>
<li class="li">
<strong class="ph b">When ALL segments match or when referenced</strong>: The search rule
applies when it matches <em class="ph i">all</em> of the segments you select in the
next step, or when it’s been specifically referenced in a procedure
or dialogue.</li>
<li class="li">
<strong class="ph b">When ANY segment matches or when referenced</strong>: The search rule
applies when it matches <em class="ph i">any</em> of the segments you select in the
next step, or when it’s been specifically referenced in a procedure
or dialogue. </li>
</ul>
</li>
<li class="li">If you selected When ALL or When ANY above, click Apply to segments and
select which <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9413046533530" target="_blank">segments</a> should trigger the search
rule.<p class="p">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.</p>
</li>
<li class="li">Click <strong class="ph b">Save</strong>.</li>
<li class="li">(Optional) Add your search rule to a procedure or dialogue following the
steps below.</li>
</ol>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested1" id="topic_rvx_cx3_vfc">
<h2 class="title topictitle2" id="ariaid-title4">Adding a search rule to a procedure</h2>
<div class="body">
<div class="p">
<div class="note" id="topic_rvx_cx3_vfc__note_l35_rds_mhc">
<span class="notetitle">Note:</span> This section applies only to <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8966284087066" target="_blank">AI agents with agentic AI</a>.</div>
</div>
<p class="p">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. </p>
<p class="p"><strong class="ph b">To add a search rule to a procedure</strong></p>
<ol class="ol" id="topic_rvx_cx3_vfc__ol_abh_qbj_vfc">
<li class="li">
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8979864563610#topic_qcm_tcc_tgc" target="_blank">Open the procedure</a> you want to add a
search rule to. </li>
<li class="li">In the free-text box, enter text describing when your search rule should be
applied. </li>
<li class="li">Specify the search rule by entering a forward slash (/) and selecting <strong class="ph b">Share
knowledge answer with search rule</strong>.<p class="p"><img class="image" id="topic_rvx_cx3_vfc__image_c4c_vbj_vfc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/aiaa_add_search_rule_procedure.png" width="350"></p>
</li>
<li class="li">Select the search rule you want to apply. </li>
<li class="li">Click <strong class="ph b">Update procedure</strong>.</li>
</ol>
</div>
</div>
<div aria-labelledby="ariaid-title5" class="topic nested1" id="topic_pf1_xmy_cfc">
<h2 class="title topictitle2" id="ariaid-title5">Adding a search rule to a dialogue</h2>
<div class="body">
<p class="p">You can add a search rule to a dialogue to determine which knowledge sources your AI
agent should use when providing a generative reply. </p>
<p class="p">Search rules must be added to a <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357749315098" target="_blank">Generative replies block</a> within a dialogue.</p>
<div class="p">
<div class="note tip" id="topic_pf1_xmy_cfc__note_z1v_ccj_vfc">
<span class="tiptitle">Tip:</span> It’s good practice to use search rules in
combination with <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357733406234" target="_blank">conditional blocks</a>. 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. </div>
</div>
<p class="p"><strong class="ph b">To add a search rule to a dialogue</strong></p>
<ol class="ol" id="topic_pf1_xmy_cfc__ol_llr_m4y_cfc">
<li class="li">
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9066753203738#topic_nvb_tzl_52c" target="_blank">Open the dialogue builder</a> for the
dialogue you want to add a search rule to. </li>
<li class="li">Select the Generative replies block where you want the search rule to apply. </li>
<li class="li">Toggle <strong class="ph b">Use default search rule</strong> off. </li>
<li class="li">In <strong class="ph b">Select rule</strong>, select the search rule you created.<p class="p"><img class="image" id="topic_pf1_xmy_cfc__image_lzp_4qy_cfc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/aiaa_search_rules_ugpt_block.png" width="450"></p>
</li>
<li class="li">Click <strong class="ph b">Publish</strong>.</li>
</ol>
</div>
</div>
<div aria-labelledby="ariaid-title6" class="topic nested1" id="topic_qrq_xmy_cfc">
<h2 class="title topictitle2" id="ariaid-title6">Editing the default search rule</h2>
<div class="body">
<p class="p">A default search rule exists for your AI agent already. This rule is configured to
use all imported knowledge sources. </p>
<p class="p">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. </p>
<p class="p">Because the default search rule controls the AI agent’s <em class="ph i">default</em> search
behavior, it doesn’t have to match any segments or be added to a procedure or
dialogue. </p>
<p class="p"><strong class="ph b">To edit the default search rule</strong></p>
<ol class="ol" id="topic_qrq_xmy_cfc__ol_y5h_t4y_cfc">
<li class="li"><span class="ph">In the AI agents workspace, <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357756913178#topic_t25_qvj_tdc" target="_blank">select the AI agent</a> you want to work
with.</span></li>
<li class="li"><span class="ph">Click <img class="image" id="topic_qrq_xmy_cfc__d9e176" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/ai_agents_content_icon.png">
<strong class="ph b">Content</strong> in the sidebar, then select <strong class="ph b">Search rules</strong>.</span></li>
<li class="li">To the right of the <strong class="ph b">Default (Default)</strong> search rule, click the options menu
(<img class="image" id="topic_qrq_xmy_cfc__image_gn1_cpy_cfc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/options-menu-icon-small.png">) and select <strong class="ph b">View</strong>.<p class="p"><img class="image" id="topic_qrq_xmy_cfc__image_jp2_3ry_cfc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/aiaa_search_rules_default.png" width="600"></p>
</li>
<li class="li">In the Edit rule pane, configure the default search rule as desired.<p class="p">For help,
see <a class="xref" href="#topic_ar3_pxw_cfc">Creating a search rule</a>.</p>
</li>
</ol>
</div>
</div>
<script id="docs-schema-markup" type="application/ld+json">{
"@context": "https://schema.org",
"@type": "TechArticle",
"@id": "https://support.zendesk.com/hc/en-us/articles/9185497386394",
"url": "https://support.zendesk.com/hc/en-us/articles/9185497386394",
"headline": "Configuring search rules for knowledge sources for AI agents",
"description": "You can configure search rules to specify which knowledge sources an AI agent uses to generate answers in different scenarios, including creating, editing, and applying these rules to procedures or dialogues.",
"articleSection": "Using generative replies with advanced AI agents",
"datePublished": "2025-04-25T13:41:31+00:00",
"dateModified": "2026-05-12T13:13:58.543420+00:00",
"inLanguage": "en-US",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://support.zendesk.com/hc/en-us/articles/9185497386394"
},
"author": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"publisher": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"isPartOf": {
"@type": "WebSite",
"name": "Zendesk Help",
"@id": "https://support.zendesk.com/hc/"
},
"about": {
"@type": "SoftwareApplication",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
}
}</script>
</body>