Get Started with the Query Builder
Query Builder: graphically create query metadata for contacts, conversation messages, or Web Chat preload parameters to limit the knowledge base scope an Agent can retrieve from.
Contact Query Metadata Setup
You can use the "Query Builder" in the MaiAgent service to create query metadata graphically. The following example shows how to create query metadata for a contact:
Step 1: Go to the Contacts Area in the MaiAgent Admin Console

Step 2: Configure the Contact
Find the contact you want to configure and click Edit

2. The following screen appears after you click

Click Query Builder to open the graphical interface.
Step 3: Select the Permissions to Grant
Select the knowledge bases you want to make available. You can also select only some of the documents within a knowledge base

2. To make documents available based on specific tags, click "Show Tag Filter" to open the tag settings area

Here you can add tags and choose how they are evaluated: within a single group of tags, choose "Contains all tags (AND)" or "Contains any tag (OR)"; across multiple groups of conditions, choose "Every group must match (AND)" or "Matching any one group is enough (OR)" (older screenshots show these as AND/OR buttons, which mean the same thing). These serve as the criteria for which documents in the opened knowledge bases are made available. The "Affected files" panel below the builder shows in real time which files can be retrieved.
Conversation Settings (Message)
You can also use the right-hand menu shown below to select the knowledge permissions you want to make available:

You can likewise use "Show Tag Filter" to set tag filter conditions.


The Agent can currently reference three files: CV, SOP, and Survey.
Uncheck CV for the next message, then send the message again:

The Agent can no longer use the CV file, and the citation library no longer shows CV citations:

You can adjust permissions before sending each message, which affects the content that can be cited in that turn's answer.
Web Chat Preload Settings
MaiAgent lets you preset query metadata before Web Chat is formally initialized. If you want to restrict conversation content before a contact exists (for example, when providing Web Chat service to customers who have not registered a contact account), you can supply query metadata when embedding. The system will then enable message-level knowledge base document filtering by default.
For Web Chat setup, see: Technical Manual: Getting Started—Using JSON Format
Last updated
Was this helpful?