> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/tech/en/authorization-integration/zhi-shi-guan-li-quan-xian-query-metadata-cha-xun-yuan-zi-liao-zong-lan/graphical-interface.md).

# Getting Started—Using "Query Builder"

The Query Builder is a graphical way to configure Query Metadata: use checkboxes instead of JSON, ideal for manual management in the dashboard. Two entry points correspond to the two levels on the [overview page](/tech/en/authorization-integration/zhi-shi-guan-li-quan-xian-query-metadata-cha-xun-yuan-zi-liao-zong-lan.md#levels):

* **Contact Editing** → Set the knowledge scope for all conversations of a given user (contact level)
* **Internal Q\&A** → Select the knowledge scope before sending each message (message level)

{% hint style="info" %}
For nested label conditions, or when configuring via API/embed code, use the [JSON format](/tech/en/authorization-integration/zhi-shi-guan-li-quan-xian-query-metadata-cha-xun-yuan-zi-liao-zong-lan/json-interfaces.md) instead. Both methods produce equivalent configurations.
{% endhint %}

## Contact-Level Settings <a href="#contact-level" id="contact-level"></a>

### Step 1: Go to the Contacts Section in the Dashboard <a href="#step-1-contacts" id="step-1-contacts"></a>

### Step 2: Edit a Contact and Open the Query Builder <a href="#step-2-edit" id="step-2-edit"></a>

Find the contact you want to configure and click <mark style="color:blue;">Edit</mark>:

On the edit screen, click <mark style="color:blue;">Query Builder</mark> to open the graphical interface:

### Step 3: Select the Scope to Grant Access <a href="#step-3-select" id="step-3-select"></a>

Check the knowledge bases to grant access to; expand a knowledge base to select only specific documents within it:

To filter by labels, click <mark style="color:blue;">Show Label Filter</mark> to expand the label condition settings:

Label conditions combine with `OR` (match any label) or `AND` (must match all labels), filtering documents within the selected knowledge base scope — semantically identical to [`label_relations` in the JSON format](/tech/en/authorization-integration/zhi-shi-guan-li-quan-xian-query-metadata-cha-xun-yuan-zi-liao-zong-lan/json-interfaces.md#id-1labelrelations-luo-ji).

## Internal Q\&A: Per-Message Settings <a href="#message-level" id="message-level"></a>

When members use Internal Q\&A, they can select the knowledge scope for each message from the right-side panel (i.e., message-level Query Metadata):

You can also use <mark style="color:blue;">Show Label Filter</mark> to set label conditions.

{% hint style="info" %}
You can adjust the settings before each message is sent. This only affects the content that **the current response** can reference — message-level settings take priority over contact-level settings (see [Resolution Order](/tech/en/authorization-integration/zhi-shi-guan-li-quan-xian-query-metadata-cha-xun-yuan-zi-liao-zong-lan.md#resolution-order)).
{% endhint %}

### Demo <a href="#demo" id="demo"></a>

When CV, SOP, and Questionnaire Survey are checked, the AI can reference all three:

Uncheck CV before sending the next message:

The AI can no longer use the CV file, and CV no longer appears in the reference list:


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.maiagent.ai/tech/en/authorization-integration/zhi-shi-guan-li-quan-xian-query-metadata-cha-xun-yuan-zi-liao-zong-lan/graphical-interface.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
