> 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/maiagent-user-guide/ja/build/agent/cross-conversation-search.md).

# 会話をまたぐ検索

同じ連絡先の最近の会話から関連する内容を Agent が検索できるようにします

会話を横断した検索を使うと、Agent は回答時に、同じ受信トレイにある同じ連絡先の最近の会話を検索できます。ユーザーが頻繁に新しい会話を開始する一方で、過去の対応記録を引き継ぐ必要がある場合に適しています。

{% hint style="info" %}
この機能はデフォルトでは無効です。有効にすると Agent の検索範囲が広がりますが、異なる連絡先や受信トレイの内容が混在することはありません。
{% endhint %}

## 会話を横断した検索を有効にする <a href="#enable-cross-conversation-search" id="enable-cross-conversation-search"></a>

{% stepper %}
{% step %}
左側のメニューで「<mark style="color:blue;">AI アシスタント</mark>」をクリックします。
{% endstep %}

{% step %}
設定する Agent を選択し、「<mark style="color:blue;">設定</mark>」を開きます。
{% endstep %}

{% step %}
「<mark style="color:blue;">詳細設定</mark>」を開きます。
{% endstep %}

{% step %}
会話メモリの設定で「<mark style="color:blue;">会話を横断した検索</mark>」を有効にします。
{% endstep %}

{% step %}
「<mark style="color:blue;">遡及日数</mark>」に 1〜365 日を入力します。デフォルトは 90 日です。

<figure><img src="https://2584873290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTvHx8hgwYGDTLD3A7xoW%2Fuploads%2Fgit-blob-0ab9e819423da3a4cd8304212b77e9296e4d6975%2Fcross-conversation-search-settings.png?alt=media" alt="会話メモリの設定で会話を横断した検索が有効になっており、その下の遡及日数フィールドは 90 に設定されています"><figcaption><p>会話を横断した検索を有効にすると、下に遡及日数フィールドが表示されます。デフォルトは 90 日です</p></figcaption></figure>
{% endstep %}

{% step %}
「<mark style="color:blue;">保存</mark>」をクリックします。
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
遡及日数が長いほど、検索できる履歴の範囲が広がります。対応業務の要件に合わせて設定し、組織のデータ利用規定とプライバシー規定を遵守してください。
{% endhint %}

## 会話メモリの設定にあるその他のオプション <a href="#other-memory-settings" id="other-memory-settings"></a>

「<mark style="color:blue;">会話を横断した検索</mark>」がある <mark style="color:blue;">会話メモリの設定</mark> セクションには、次のオプションもあります。

| オプション                                          | 画面の説明                                                                         | 調整するタイミング                                                                                                                                     |
| ---------------------------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| <mark style="color:blue;">ベクトルメモリ</mark>       | 有効にすると、アーカイブされた会話メッセージのベクトル化と事実の抽出を行い、意味検索に使用します。無効の場合は、現在の会話履歴ウィンドウのみを使用します。 | 会話が長く、Agent が以前のメッセージを見つける必要がある場合に有効にします。短い会話のみを処理し、ベクトル化のコストを節約したい場合は無効にします                                                                  |
| <mark style="color:blue;">Embedding モデル</mark> | 会話の内容をベクトルに変換するために使用します。会話メモリの検索精度と文脈の理解精度に影響します                              | ここで選択するのは「会話メモリ」用のモデルで、ナレッジベースの設定ページにある Embedding モデルとは別です。<mark style="color:blue;">デフォルト</mark> と表示されるモデルはプラットフォーム側で設定されており、通常は変更する必要がありません |
| <mark style="color:blue;">Reranker モデル</mark>  | 検索結果を並べ替え、検索精度を向上させます                                                         | 上記と同様に、会話メモリの再ランキングに影響します                                                                                                                     |
| <mark style="color:blue;">ツール結果の切り詰め</mark>    | 大きすぎるツールの戻り値を自動的に切り詰め、メモリの肥大化を防ぎます                                            | [詳細設定にあるその他のスイッチ](/maiagent-user-guide/ja/build/agent/custom-max-tokens.md#other-advanced-switches)を参照してください                                  |

事実や好みを長期保存する <mark style="color:blue;">永続メモリ</mark> は別のセクションです。[永続メモリ](/maiagent-user-guide/ja/build/agent/persistent-memory.md)を参照してください。

## 利用シーン <a href="#use-case" id="use-case"></a>

小麦テクノロジーのカスタマーサポートアシスタントは、購入後の問い合わせ案件を追跡しています。顧客が先週の会話で注文状況を伝え、今日は新しい会話を開始して進捗を尋ねました。管理者はこのアシスタントの会話を横断した検索を有効にし、遡及日数を 30 日に設定します。保存後、Agent は会話履歴ツールを使って同じ顧客の最近の会話から関連する内容を見つけ、その記録に基づいて回答できます。

## 機能の対象範囲 <a href="#scope" id="scope"></a>

会話を横断した検索の対象範囲は次のとおりです。

* 同じ連絡先
* 同じ受信トレイ
* 削除されていない通常のチャット会話
* 最後のメッセージが設定した日数以内にある会話

遡及範囲に該当する会話は、その期間内のメッセージだけでなく、会話全体のメッセージが対象になります。システムは最近のアクティビティがある会話を最大 200 件選択します。現在の会話は遡及日数の制限を受けず、常に検索範囲に含まれます。

機能を無効にすると、Agent は現在の会話のみを検索します。会話を横断した検索と「ベクトルメモリ」は独立した設定で、それぞれ個別に有効または無効にできます。


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/maiagent-user-guide/ja/build/agent/cross-conversation-search.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
