> 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/ja/authorization-integration/zhi-shi-guan-li-quan-xian-query-metadata-cha-xun-yuan-zi-liao-zong-lan/graphical-interface.md).

# 構築を始める—「クエリビルダー」を使う

Query Builder は Query Metadata のグラフィカルな設定方法です。JSON の代わりにチェックボックスで設定でき、管理画面での手動管理に適しています。2つの入口は[概要ページ](/tech/ja/authorization-integration/zhi-shi-guan-li-quan-xian-query-metadata-cha-xun-yuan-zi-liao-zong-lan.md#levels)の2つのレベルに対応しています：

* **コンタクト編集** → そのユーザーのすべての会話のナレッジ範囲を設定します（コンタクトレベル）
* **内部Q\&A** → 各メッセージの送信前にナレッジ範囲を選択します（メッセージレベル）

{% hint style="info" %}
ネストされたラベル条件が必要な場合、または API／埋め込みコードで設定する場合は、[JSON 形式](/tech/ja/authorization-integration/zhi-shi-guan-li-quan-xian-query-metadata-cha-xun-yuan-zi-liao-zong-lan/json-interfaces.md)をご利用ください。どちらの方法で生成された設定も同等です。
{% endhint %}

## コンタクト（Contact）レベルの設定 <a href="#contact-level" id="contact-level"></a>

### ステップ 1：管理画面のコンタクトエリアに移動します <a href="#step-1-contacts" id="step-1-contacts"></a>

<figure><img src="/files/pAM0h9TGPm84qpL6UDZX" alt=""><figcaption><p>コンタクトエリアの入口</p></figcaption></figure>

### ステップ 2：コンタクトを編集し、Query Builder を開きます <a href="#step-2-edit" id="step-2-edit"></a>

設定したいコンタクトを見つけ、<mark style="color:blue;">編集</mark>をクリックします：

<figure><img src="/files/Z9Hoe63ypweeCemKWgZf" alt=""><figcaption><p>コンタクト編集の入口</p></figcaption></figure>

編集画面で<mark style="color:blue;">Query Builder</mark>をクリックしてグラフィカルインターフェースに入ります：

<figure><img src="/files/ApnzAZ2dBvEm8fUpxdFU" alt=""><figcaption><p>Query Builder の入口</p></figcaption></figure>

### ステップ 3：開放する範囲にチェックを入れます <a href="#step-3-select" id="step-3-select"></a>

開放するナレッジベースにチェックを入れます。ナレッジベースを展開すると、一部のファイルのみを選択することもできます：

<figure><img src="/files/0pfKqxmYzSGT06PUFm00" alt=""><figcaption><p>ナレッジベースとファイルの選択</p></figcaption></figure>

ラベルでフィルタリングする場合は、<mark style="color:blue;">ラベルフィルターを表示</mark>をクリックしてラベル条件の設定を展開します：

<figure><img src="/files/G824GGUIJHUqzx9ypHRe" alt=""><figcaption><p>ラベルフィルターの設定</p></figcaption></figure>

ラベル条件は `OR`（いずれかのラベルに一致）または `AND`（すべてのラベルに同時に一致する必要あり）で組み合わせ、チェック済みのナレッジベースの範囲内でさらにファイルをフィルタリングします。これは [JSON 形式の `label_relations`](/tech/ja/authorization-integration/zhi-shi-guan-li-quan-xian-query-metadata-cha-xun-yuan-zi-liao-zong-lan/json-interfaces.md#id-1labelrelations-luo-ji) と同じ意味です。

## 内部Q\&A：メッセージごとの設定 <a href="#message-level" id="message-level"></a>

メンバーが内部Q\&Aを使用する際、インターフェース右側のメニューからそのメッセージで参照するナレッジ範囲（メッセージレベルの Query Metadata）を選択できます：

<figure><img src="/files/XbU5j162DgBQ6lbIrcFB" alt=""><figcaption><p>内部Q&#x26;A：利用可能なナレッジ権限の選択</p></figcaption></figure>

同様に<mark style="color:blue;">ラベルフィルターを表示</mark>でラベル条件を設定できます。

{% hint style="info" %}
メッセージを送信するたびに調整でき、**その回の回答**で引用できるコンテンツにのみ影響します。メッセージレベルの設定はコンタクトレベルよりも優先されます（[解決順序](/tech/ja/authorization-integration/zhi-shi-guan-li-quan-xian-query-metadata-cha-xun-yuan-zi-liao-zong-lan.md#resolution-order)を参照）。
{% endhint %}

### 効果のデモ <a href="#demo" id="demo"></a>

CV、SOP、アンケート調査の3つのファイルにチェックを入れると、AI はこの3つを引用できます：

<figure><img src="/files/QC1wvCbEPd0c902ozacF" alt=""><figcaption><p>利用可能なファイル一覧</p></figcaption></figure>

<figure><img src="/files/lKove1PLIn2izHyaavEs" alt=""><figcaption><p>選択済みファイルの状態</p></figcaption></figure>

次のメッセージで CV のチェックを外してから送信します：

<figure><img src="/files/pvtTja977J9JwcuVlaLr" alt=""><figcaption><p>ファイルのチェックを外す例</p></figcaption></figure>

AI は CV ファイルを使用できなくなり、引用リストにも CV が表示されなくなります：

<figure><img src="/files/VZjsjtTdeKkdN9kz9l8Q" alt=""><figcaption><p>引用ソースの変化：CV 削除後</p></figcaption></figure>


---

# 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/ja/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.
