> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/ja-gitbook-documentation/ai-for-your-readers/gitbook-ai-assistant.md).

# AI アシスタント

AI Assistant は、ドキュメントだけでなくナレッジベース全体から引き出した、正確で文脈に合った回答を訪問者に提供します

<figure><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-bd69cc42bd688271bd63c9e8e3e8b2804ba6e5e2%2F25_03_31_gitbook_assistant%402x.png?alt=media" alt="AI Assistant"><figcaption><p>AIアシスタント</p></figcaption></figure>

AI アシスタントは、自然言語を使って、ドキュメントに関する迅速で正確な回答をユーザーに提供します。ユーザーごとにパーソナライズされており、ウェブサイトや製品に埋め込むことができ、公開済みドキュメントのサイドバーや検索ボックスに表示できます。

必要なとき、必要な場所で、すべてのユーザーが利用できる製品のエキスパートだと考えてください。

アシスタントはエージェント型検索を使用して、ユーザーの現在のページ、これまでに読んだページ、過去の会話に基づき、クエリの文脈を理解します。

AI Assistant は [AI クレジットを](https://gitbook.com/docs/documentation/ja-gitbook-documentation/akauntoto/plans/ai-credits.md)使用します。関連性のある回答に対してのみクレジットが消費されます。

以下のボックスでアシスタントに質問してみてください:

<p align="center"><button type="button" class="button primary" data-action="ask" data-icon="gitbook-assistant">質問してください...</button></p>

## AI アシスタントを設定 <a href="#how-do-i-use-gitbook-ai" id="how-do-i-use-gitbook-ai"></a>

AI Assistant を設定するには、サイトのサイドバーで **カスタマイズ** を開き、 **AI Assistant**をクリックします。ここでは、Assistant を有効にしたり、指示、ウェルカムメッセージ、質問の候補をカスタマイズしたりできます。

### カスタム指示を追加

カスタム指示はアシスタントの口調を調整し、製品固有の知識や用語を追加するため、回答が常にあなたの全体的なスタイルに一致します。

{% hint style="info" %}
カスタム指示はアシスタントの口調と知識を洗練します。組み込みのガードレールを上書きすることはできません。
{% endhint %}

### ウェルカムメッセージをカスタマイズ

ウェルカムメッセージは、アクティブな会話がない状態で訪問者がアシスタントを開いたときに最初に目にするものです。期待値を設定したり、特定のワークフローへユーザーを誘導したりするために使えます。

### 推奨質問を追加

推奨質問は、アクティブな会話がない状態でアシスタントが開かれたときに表示される事前作成済みのプロンプトです。ユーザーが何を質問できるかを理解するのに役立ち、役立つ回答やワークフローへ誘導するのにも役立ちます。

#### 推奨質問のベストプラクティス:

* 実際のユーザーの目的（セットアップ、トラブルシューティング、統合）から始める。
* ユーザーが使う言葉を使う（内部コードネームは避ける）。
* 具体的にする。「〜するには？」は「〜について教えて」よりも適しています。
* さまざまな意図をカバーする：クイックスタート、手順、トラブルシューティング、リファレンス。

{% hint style="info" %}
製品に Assistant を埋め込む場合は、埋め込み設定で質問の候補を動的に設定することもできます。詳しくは [埋め込みのカスタマイズ](https://gitbook.com/docs/documentation/ja-gitbook-documentation/publish/embedding/configuration/customizing-docs-embed.md#adding-suggestions).
{% endhint %}

### アシスタントの表示場所を選択 <a href="#choose-your-sites-search-experience" id="choose-your-sites-search-experience"></a>

「 **外観**」で **「配置」** を設定し、読者が Assistant にアクセスする場所を選択します。

* **サイドバー** （デフォルト）：AI Assistant Chat。チャットの全機能を利用できます。Ultimate サイトプランで利用可能です。
* **検索ボックス**：AI Assistant Ask。キーワード検索結果と並べて、インラインで回答を表示します。Essential および Ultimate サイトプランで利用可能です。

{% hint style="info" %}
Assistant の挨拶はサイドバー配置にのみ適用されるため、「 **配置** 」が **検索ボックス**.
{% endhint %}

{% hint style="warning" %}
「 **AI Assistant** 」をオフにして再びオンにすると、「 **配置** 」は **サイドバー**にリセットされます。サイトで検索ボックス配置を使用している場合は、Assistant を再度有効にした後、設定し直してください。
{% endhint %}

## 公開済みドキュメントで AI アシスタントを使用する <a href="#how-do-i-use-gitbook-ai-in-published-docs" id="how-do-i-use-gitbook-ai-in-published-docs"></a>

読者がアシスタントにアクセスする方法は、その配置によって異なります。

### サイドバー配置

訪問者は、3つの方法でAIアシスタントにアクセスできます：

* Mac では <kbd>⌘</kbd> + <kbd>I</kbd> 、PC では <kbd>Ctrl</kbd> + <kbd>I</kbd> を押します。
* 次の **AIアシスタント** <i class="fa-gitbook-assistant">:gitbook-assistant:</i> の横にあるボタンをクリックします **質問または検索…** バー
* 「 **質問または検索…** 」バーに質問を入力し、メニュー上部の「質問する…」を選択します。

### 検索ボックス配置

「 **配置** 」を **検索ボックス**に設定すると、ユーザーは「 **質問または検索…** ページ上部のバーに、キーワードの検索結果と並んで表示されます。

これを直接クリックするか、次のキーを押して開けます。 <kbd>⌘</kbd> + <kbd>K</kbd> Mac では <kbd>Ctrl</kbd> + <kbd>K</kbd> 、PC では

要約された回答に加えて、ユーザーは、Assistant が回答の作成に使用したソースを表示する展開可能なセクションと、フォローアップとしてクリックできる関連質問を確認できます。

Assistant は、ドキュメントサイトのコンテンツと、次の方法で追加したソースに基づいて回答します。 [接続](https://gitbook.com/docs/documentation/ja-gitbook-documentation/ai-for-your-readers/connections.md).

{% hint style="warning" %}
Assistant は、異なる [ドキュメントサイト](https://gitbook.com/docs/documentation/ja-gitbook-documentation/publish/publish-a-docs-site.md).

複数セクションの検索は、同じサイト内にある公開済みの [セクション](https://gitbook.com/docs/documentation/ja-gitbook-documentation/manage-your-site/site-structure/site-sections.md) を表示している場合にのみ利用できます。
{% endhint %}

## 公開済みドキュメントを検索する

アシスタントがオンかどうかに関係なく、キーワード検索はすべてのサイトで自動的に有効になります。

ユーザーはドキュメントサイト内でキーワードを検索し、サイト全体の特定のページやページセクションへすばやく移動できます。

## 製品に AI アシスタントを埋め込む

AIアシスタントを製品やウェブサイトに直接埋め込むことで、訪問者はアプリケーションを離れることなく、AIを活用したサポートをすぐに利用できます。アシスタントは、次の一部として埋め込むことができます。 [Docs Embed](https://gitbook.com/docs/documentation/ja-gitbook-documentation/publish/embedding.md)。これには、AIを活用したチャット用の「アシスタント」タブ、対象を絞った検索用の「検索」タブ、ドキュメントを閲覧するための「ドキュメント」タブが含まれます。

スタックに合った埋め込み方法を選択してください:

* [**スタンドアロンの script タグ**](https://gitbook.com/docs/documentation/ja-gitbook-documentation/publish/embedding/implementation/script.md) – `<script>` タグを使った簡単なセットアップ
* [**Node.js/NPM**](https://gitbook.com/docs/documentation/ja-gitbook-documentation/publish/embedding/implementation/nodejs.md) – サーバーサイドまたはビルド時の統合
* [**React コンポーネント**](https://gitbook.com/docs/documentation/ja-gitbook-documentation/publish/embedding/implementation/react.md) – すぐに使える React コンポーネント

### 追加のアシスタント埋め込みガイド:

* [認証が必要なドキュメントで埋め込み Assistant を使用する](https://gitbook.com/docs/documentation/ja-gitbook-documentation/publish/embedding/using-with-authenticated-docs.md) – ドキュメントへのサインインが必要な場合に必須
* [Assistant の埋め込みをカスタマイズする](https://gitbook.com/docs/documentation/ja-gitbook-documentation/publish/embedding/configuration/customizing-docs-embed.md) – ウェルカムメッセージ、アクション、提案
* [カスタム埋め込みツールを作成する](https://gitbook.com/docs/documentation/ja-gitbook-documentation/publish/embedding/configuration/creating-custom-tools.md) – Assistant を独自の API に接続
* [API リファレンス](https://gitbook.com/docs/documentation/ja-gitbook-documentation/publish/embedding/configuration/reference.md) – 利用可能なすべてのメソッドとイベント

## AI アシスタントの知識を拡張する

AI Assistant は、外部の情報を [接続](https://gitbook.com/docs/documentation/ja-gitbook-documentation/ai-for-your-readers/connections.md) や [MCP サーバー](https://gitbook.com/docs/documentation/ja-gitbook-documentation/ai-for-your-readers/mcp-servers-for-published-docs.md).

GitBook にレコードをサイトへ同期させたい場合は接続を使用し、AI アシスタントをカスタムツールに接続したい場合は MCP サーバーを使用できます。

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th>おすすめ</th></tr></thead><tbody><tr><td><strong>接続</strong></td><td><p>接続は、コンテンツ量の多いソースに最適です:</p><ul><li>GitHub の issue と discussion</li><li>Slack または Discord の会話</li><li>サポートコンテンツ</li><li>外部ドキュメント、ヘルプセンター、ウェブサイト</li></ul></td></tr><tr><td><strong>MCP サーバー</strong></td><td><p>MCP サーバーは、ライブツールやデータに最適です:</p><ul><li>現在のアカウントまたは製品の状態</li><li>頻繁に変更される内部システム</li><li>チケットの作成やバグ報告などのアクション</li><li>GitBook に同期したくないソース</li></ul></td></tr></tbody></table>

{% tabs %}
{% tab title="接続を追加" %}
{% stepper %}
{% step %}
**サイトの設定を開く**

サイトのダッシュボードを開き、 **設定** → **接続**.
{% endstep %}

{% step %}
**ソースを接続する**

ソースの種類を選択します。次に、承認するか、インポートする URL を入力します。
{% endstep %}

{% step %}
**レコードを AI アシスタントに公開する**

接続で **検索 / assistant で公開** をオンにします。

その後、GitBook はそれらのレコードを検索と AI アシスタントで使用できます。
{% endstep %}
{% endstepper %}
{% endtab %}

{% tab title="MCP サーバーを追加" %}
{% stepper %}
{% step %}
**サイトの設定を開く**

サイトのダッシュボードを開き、 **設定** → **AI と MCP**.
{% endstep %}

{% step %}
**新しいサーバーを追加**

MCP サーバーの表で、 **MCP サーバーを追加**.
{% endstep %}

{% step %}
**サーバーの詳細を入力**

サーバーに名前を付けます。URL を追加します。

次に、GitBook が各リクエストで送信する必要がある HTTP ヘッダーを設定します。
{% endstep %}
{% endstepper %}
{% endtab %}
{% endtabs %}


---

# 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://gitbook.com/docs/documentation/ja-gitbook-documentation/ai-for-your-readers/gitbook-ai-assistant.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.
