For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Contacts area entry point

Step 2: Configure the Contact

  1. Find the contact you want to configure and click Edit

Contact edit entry point

2. The following screen appears after you click

Query Builder entry point

Click Query Builder to open the graphical interface.

Step 3: Select the Permissions to Grant

  1. Select the knowledge bases you want to make available. You can also select only some of the documents within a knowledge base

Select knowledge bases and documents

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

Tag filter settings

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.

To have an Agent apply the same tag conditions by default on all conversation platforms, you can set them on the Agent settings page instead. See Knowledge Base Tag Filtering. A contact's query metadata takes precedence over the Agent's default conditions.

Conversation Settings (Message)

You can also use the right-hand menu shown below to select the knowledge permissions you want to make available:

Internal conversation: select available knowledge permissions

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

Before sending each new message, you can still change the permissions on the right to manage knowledge access.

Available document list
Selected documents status

The Agent can currently reference three files: CV, SOP, and Survey.

Uncheck CV for the next message, then send the message again:

Example of unchecking a document

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

Citation library change: after removing CV

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

You can also build query metadata in JSON format. See Technical Manual: Getting Started—Using JSON Format

Last updated

Was this helpful?