> 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/kenoai/gitbook-ai-assistant.md).

# AI アシスタント

AI アシスタントは、ドキュメントだけでなくナレッジベース全体から得た、正確で文脈に沿った回答をユーザーに提供します

<figure><img src="https://4217681718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FlzOUuOwM4Vffctmf3VHC%2F25_03_31_gitbook_assistant%402x.png?alt=media&amp;token=914e435f-6305-41d8-b05c-23884ceba4e7" alt="GitBook Assistant"><figcaption><p>GitBook Assistant</p></figcaption></figure>

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

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

Assistant はエージェント型検索を使用し、ユーザーの現在のページ、以前に読んだページ、過去の会話に基づいてクエリのコンテキストを理解します。

以下のボックスで Assistant に質問してみてください：

<p align="center"><button type="button" class="button primary" data-action="ask" data-icon="gitbook-assistant">質問を入力...</button></p>

## AI Assistant を設定する <a href="#how-do-i-use-gitbook-ai" id="how-do-i-use-gitbook-ai"></a>

AI Assistant を設定するには、 **カスタマイズ**、 **ツール** をサイトのサイドバーで開き、】【t\_577c0d39】. Here you can enable the Assistant and customize its instructions, welcome message, and suggested questions. **AIアシスタント**をクリックします。ここで Assistant を有効にし、指示、ウェルカムメッセージ、候補の質問をカスタマイズできます。

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

カスタム指示では Assistant の口調を調整し、製品固有の知識や用語を追加できます。これにより、回答を一貫して全体的なスタイルに合わせられます。

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

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

ウェルカムメッセージは、進行中の会話がない状態で訪問者が Assistant を開いたときに最初に表示されるものです。期待値を設定したり、ユーザーを特定のワークフローへ案内したりするために使用してください。

### 候補の質問を追加する

候補の質問は、進行中の会話がない状態で Assistant を開いたときに表示される、あらかじめ用意されたプロンプトです。ユーザーが質問できる内容を理解するのに役立ち、有用な回答やワークフローへユーザーを案内することにも役立ちます。

#### 候補の質問に関するベストプラクティス：

* 実際のユーザーの目標（セットアップ、トラブルシューティング、統合）から始めます。
* ユーザーが使う言葉を使用します（社内コードネームは避けます）。
* 具体的にします。「～について教えて」よりも「どうすれば～できますか？」の方が効果的です。
* クイックスタート、ハウツー、トラブルシューティング、リファレンスなど、さまざまな目的をカバーします。

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

### Assistant の表示場所を選択する <a href="#choose-your-sites-search-experience" id="choose-your-sites-search-experience"></a>

次の項目の下で **外観**で、 **配置** を設定して、読者が Assistant を利用する場所を選択します：

* **サイドバー** （デフォルト）— 完全なチャット体験。Ultimate サイトプランで利用可能
* **検索ボックス** — キーワード検索結果とともに表示されるインライン回答。Premium および Ultimate サイトプランで利用可能

{% hint style="info" %}
Assistant のあいさつはサイドバー配置にのみ適用されるため、 **配置** が次に設定されている間は非表示になります **検索ボックス**.
{% endhint %}

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

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

読者が Assistant を利用する方法は、その配置によって異なります。

### サイドバー配置

ユーザーは 3 つの方法で GitBook Assistant にアクセスできます：

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

### 検索ボックス配置

が **配置** に設定されている場合、 **検索ボックス**、ユーザーは **質問または検索…** バーで、キーワード結果とともに直接質問できます。

直接クリックするか、 <kbd>⌘</kbd> + <kbd>K</kbd> を Mac で、または <kbd>Ctrl</kbd> + <kbd>K</kbd> を PC で押すことで開けます。

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

Assistant は、ドキュメントサイトのコンテンツと、 [接続](/docs/documentation/ja-gitbook-documentation/kenoai/connections.md).

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

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

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

キーワード検索は、Assistant がオンかどうかにかかわらず、すべてのサイトで自動的に有効になります。

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

## AI Assistant を製品に埋め込む

GitBook Assistant を製品や Web サイトに直接埋め込むことで、ユーザーはアプリケーションを離れることなく AI を活用したヘルプにすぐアクセスできます。Assistant は、 [Docs Embed](/docs/documentation/ja-gitbook-documentation/suru-1/embedding.md)の一部として埋め込むことができます。これには、AI を活用したチャット用の Assistant タブ、範囲を絞った検索用の Search タブ、ドキュメントを閲覧するための Docs タブが含まれます。

使用しているスタックに適した埋め込み方法を選択してください：

* [**スタンドアロンの script タグ**](/docs/documentation/ja-gitbook-documentation/suru-1/embedding/implementation/script.md) –  `<script>` タグを使用したクイックセットアップ
* [**Node.js/NPM**](/docs/documentation/ja-gitbook-documentation/suru-1/embedding/implementation/nodejs.md) – サーバーサイドまたはビルド時の統合
* [**React コンポーネント**](/docs/documentation/ja-gitbook-documentation/suru-1/embedding/implementation/react.md) – ビルド済みの React コンポーネント

### Assistant の埋め込みに関する追加ガイド：

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

## AI Assistant の知識を拡張する

AI Assistant は、以下を通じて外部知識を利用できます： [接続](/docs/documentation/ja-gitbook-documentation/kenoai/connections.md) 、 [MCP サーバー](/docs/documentation/ja-gitbook-documentation/kenoai/mcp-servers-for-published-docs.md).

GitBook でレコードをサイトに同期する場合は接続を使用し、AI Assistant をカスタムツールに接続する場合は 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 とディスカッション</li><li>Slack または Discord の会話</li><li>サポートコンテンツ</li><li>外部ドキュメント、ヘルプセンター、Web サイト</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 に公開する**

をオンにします **検索 / Assistant に公開** （接続用）。

GitBook は、その後これらのレコードを検索と AI Assistant で使用できます。
{% 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 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://gitbook.com/docs/documentation/ja-gitbook-documentation/kenoai/gitbook-ai-assistant.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.
