# 開始建構—使用「查詢構建器」

## 聯絡人(Contact) Query Metadata 設定

您可以使用 MaiAgent 服務中的「查詢構建器」以圖形化方式建立 QueryMetadata，以建立聯絡人 Query Metadata 為例：

### 步驟 1：進入 MaiAgent 後台服務中的聯絡人區域

<figure><img src="/files/5oAwxEszg1DMxHOApNm0" alt=""><figcaption><p>聯絡人區域入口</p></figcaption></figure>

### 步驟 2：對想要設定的聯絡人進行設定

1. 找到需設定的聯絡人，並點下編輯

<figure><img src="/files/MKH7FR2qgKGlBrqrThKn" alt=""><figcaption><p>聯絡人編輯入口</p></figcaption></figure>

2\. 點按後會出現以下畫面

<figure><img src="/files/klxkMizPoqFYqAb0UEVh" alt=""><figcaption><p>查詢構建器入口</p></figcaption></figure>

直接點按查詢構建器進入圖形化介面

### 步驟 3：勾選想要開放的權限

1. 勾選想要開放的知識庫，也可選擇部分勾選該知識庫下的文件

<figure><img src="/files/ypbv0mfxNrS5nsTbKUiJ" alt=""><figcaption><p>選擇知識庫與文件</p></figcaption></figure>

2\. 若想針對特定標籤開放文件，可點按「顯示標籤過濾」開啟標籤設定空間

<figure><img src="/files/UjUockJsckxOeQnL6nCi" alt=""><figcaption><p>標籤過濾設定</p></figcaption></figure>

您可以在此選擇想要建立的判斷條件，選擇 `"OR"` (符合任一條件)、`"AND"`(符合所有條件) 作為已開放知識庫中的文件開放標準

## 對話設定(Message)

您也可以使用下圖的右側選單選擇欲開放的知識權限：

<figure><img src="/files/Kgy6P7Duny7DnERbft8p" alt=""><figcaption><p>內部對話：選擇可用知識權限</p></figcaption></figure>

同樣可使用「顯示標籤過濾」進行標籤過濾條件設定

{% hint style="info" %}
每次傳送不同訊息前，仍可以改動右側權限進行知識管理
{% endhint %}

<figure><img src="/files/lpAXacCbOMQAtSR1fMpG" alt=""><figcaption><p>可用文件清單</p></figcaption></figure>

<figure><img src="/files/zlLRMW5oLx8DJoYTrLaR" alt=""><figcaption><p>已選取文件狀態</p></figcaption></figure>

目前能夠參考 CV、SOP、問卷調查共三個檔案

在下一則訊息取消 CV 的勾選後，再次傳送訊息：

<figure><img src="/files/AiD3b41d6r1d2jiGEv9b" alt=""><figcaption><p>取消勾選文件示例</p></figcaption></figure>

Agent 便無法使用 CV 檔案，引用庫亦不顯示 CV 引用：

<figure><img src="/files/z9nOhwqMsR3ElaLDAtOw" alt=""><figcaption><p>引用庫變化：移除 CV 後</p></figcaption></figure>

每次發送訊息前皆可調整權限，影響該輪回答所能引用的內容。


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
