# 知識管理權限：查詢元資料

## 功能說明 <a href="#feature-description" id="feature-description"></a>

AI 對話系統導入時，因使用者權限、使用需求不同通常需對 「 知識庫 / AI 助理 / 對話平台 」 的可用範圍進行細緻控管。

在 MaiAgent 中，可以利用附加在不同對話 / 身分層級的查詢元資料，決定「這個人 / 這段對話能參考哪些內容」。

### 查詢元資料是什麼？ <a href="#what-is-query-metadata" id="what-is-query-metadata"></a>

查詢元資料是一組限定查詢範圍的動態條件，能夠指定使用者在某對話平台下能查詢的 「 知識庫、FAQ、符合標籤條件的文件 」 等資料內容。

它不是替代角色或聯絡人，而是讓這些身分 「 有條件地發揮作用 」 ，實現對話層級的最小權限控制。

> **角色 / 聯絡人 / 對話 是容器，查詢元資料是實際控制可視範圍的條件限制設定**

{% hint style="info" %}
透過以下文章介紹了解更多：

* [**聯絡人**](/org/contact.md)
* [**角色權限管理**](/org/role-permission.md)
  {% endhint %}

## 權限層級概念 <a href="#permission-level-concept" id="permission-level-concept"></a>

服務建構前，Agent 會透過不同層級的查詢元資料確認此時可以參考的所有知識庫，權限層級參考順序如下：

```
AI 助理 > 對話平台 > 使用者 ( 對話 / 聯絡人 / 角色 ) > 查詢元資料 > 查詢權限
```

您可以在每個層級使用圖形化介面或 JSON 格式指定權限

> 可參考以下文件操作：
>
> 1. [開始建構—使用「查詢建構器」](/org/query-builder.md)
> 2. 技術人員手冊：[JSON 介面設定指南(聯絡人、Web chat 嵌入設定)](https://docs.maiagent.ai/tech/authorization-integration/json-interfaces)

<figure><img src="/files/uLf72qJesF2PKn9MZZAH" alt=""><figcaption></figcaption></figure>

* 聯絡人 / 角色是身份容器
* 對話所對應的是進行內部對話時，可透過篩選來控制對話所使用到的知識庫
* 查詢元資料是對話時真正執行的 「 篩選條件集合 」

### 文件篩選條件判斷層級 <a href="#document-filter-condition-levels" id="document-filter-condition-levels"></a>

<figure><img src="/files/0Mql9e4klTbH3Oi2ddzN" alt=""><figcaption></figcaption></figure>

透過層層傳遞，查詢元資料成為 AI 回應邏輯的實際決策依據

## 實際應用情境 <a href="#practical-use-cases" id="practical-use-cases"></a>

<figure><img src="/files/UzeU0lV8E1WPLBE8Ix2k" alt=""><figcaption></figcaption></figure>

***

## 小結：企業使用查詢元資料的價值 <a href="#summary-enterprise-value" id="summary-enterprise-value"></a>

🎯 **多維身分交叉控管**（角色+地區+產品線）

🎯 **即時查詢控制**：無需複製助理，只要改條件即可因應場景切換

🎯 **大型知識庫靈活管理**：標籤與知識庫可隨場景拆分與授權

> **建議將查詢元資料納入產品架構核心，讓企業能以最少設定達成最多授權彈性，**\
> **確保知識安全，同時提升對話體驗與維運效率。**


---

# 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/org/querymetadata.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.
