Knowledge Base Label Filtering
Set label filtering conditions once for an AI Assistant so it references only files with matching labels across all conversation platforms
Knowledge Base label filtering lets you configure a default set of label conditions for each AI Assistant. Once configured, the assistant references only files and FAQs that match the conditions when answering questions and ignores all other content. The same rules apply whether users ask questions through Web Chat, LINE, the API, or back-office conversations.
Previously, limiting an assistant to files with specific labels required passing query metadata with every API call or configuring contacts individually. Now you only need to configure it once on the assistant settings page.
Use Case
A retail chain's Knowledge Base contains public return and exchange policies, a membership points program, and store-opening and cashier SOPs intended only for employees. The Knowledge Base administrator adds the "Public for Customer Service" label to public documents and the "Internal Operations" label to internal documents. On the customer service assistant's settings page, the administrator then enables "Label Filtering," selects "Public for Customer Service," and saves the settings. From then on, the assistant cites only public documents when customers ask questions through the website's Web Chat or LINE. Even if a customer asks about store-opening procedures, the assistant cannot find the internal SOP and will not disclose internal information. No integration code changes are required.
Prerequisites
The assistant has at least one mounted Knowledge Base (configured under "Knowledge Base Settings" on the assistant settings page).
Labels have been created in the Knowledge Base and applied to files or FAQs. For instructions on creating and applying labels, see Document Management: Tags and Metadata.
Available labels come from the Knowledge Bases mounted by this assistant. If the assistant has multiple mounted Knowledge Bases, the same set of conditions applies to all of them.
Configure Label Filtering
In the left menu, click "AI Assistants," select the assistant you want to configure, and open "Settings."
Under "Knowledge and Data," click "Label Filtering." The scope appears in the upper-right corner, showing the Knowledge Bases currently mounted by this assistant.

Under "Condition Group 1," click labels to add them to the condition. You can add multiple labels and choose "Include All Labels" or "Include Any Label" to determine how the group is evaluated.
Scroll down to the "Affected Files" panel to confirm which files will be retrieved and which will be excluded. The panel calculates the result in real time based on the conditions currently shown, including unsaved changes.

Click "Save" in the lower-right corner. After saving, "Configured" appears next to "Label Filtering" in the left menu.
Label filtering shares the same "Save" button as the assistant's other settings. Remember to save before leaving the page, or the conditions will not take effect.
How to Read Conditions
The builder describes conditions in plain language instead of displaying AND/OR. This guide includes the corresponding logic in parentheses for comparison with the previous interface or API documentation. Conditions have two levels: "within a group" and "between groups."
Within a group (between labels in the same condition group)
Include All Labels (AND)
A file must have every label listed in the group
Within a group
Include Any Label (OR)
A file only needs one of the labels in the group
Between groups (between multiple condition groups)
Match Every Group (AND)
A file must satisfy every condition group
Between groups
Match Any Group (OR)
A file only needs to satisfy one condition group
For combinations such as "A or B," click "Add Condition Group" to add another group. The "For Multiple Groups" selector appears only when there are two or more groups.

At the bottom of the builder, a sentence describes the current conditions, such as: "The assistant will only reference files labeled 'Public for Customer Service' or 'Internal Operations.'" If you are unsure whether the conditions are correct, refer to this sentence and the "Affected Files" panel.
Scope and Priority
The assistant's label filtering acts as a "default" for all conversations handled through that assistant, including Web Chat, conversation platforms such as LINE, API integrations, and back-office conversations.
If query metadata has already been specified at another level for a conversation, that level takes precedence and the assistant default is not used. The priority from highest to lowest is:
Query metadata passed with an individual message (for example, in an API call or Web Chat embed)
Conversation-level query metadata
Contact query metadata
Assistant label filtering (configured on this page)
In other words, existing contact or API settings are unaffected. The assistant's default conditions apply only when none of the first three levels specifies query metadata. For configuration instructions at each level, see Knowledge Management Permissions: Query Metadata and Getting Started with the Query Builder.
Invalid Labels
If a label referenced by a condition has been renamed or deleted, or if its Knowledge Base has been unmounted from the assistant, reopening the settings page displays an invalid-label warning listing the affected labels. Click "Remove Invalid Labels" to remove them all at once, or select other labels and save.
Invalid labels never match any files during retrieval, and they do not broaden retrieval to include everything. If the assistant suddenly cannot answer using Knowledge Base content, first check whether label filtering contains invalid labels.
Clear Settings
Click "Clear All Conditions" in the upper-right corner of the builder and save. The assistant will return to referencing all files.
If the Knowledge Bases mounted by the assistant do not contain any labels, this page displays "The mounted Knowledge Bases do not have any labels." Add labels to files in the Knowledge Base first.

Last updated
Was this helpful?