> 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/serve/text.md).

# 活用事例：テキストカスタマーサービス

ナレッジベースと FAQ で企業の社外向け AI テキストカスタマーサポート Agent を構築し、Web サイトや各種メッセージングアプリと連携して、必要に応じて有人対応に引き継ぎます

企業のカスタマーサポート業務では、大量かつ頻繁に寄せられる顧客からの問い合わせに人手で対応すると、返信が遅れやすいだけでなく、担当者の負担が過大になり、サービス全体の効率にも影響します。繰り返し発生する定型的な質問の対応に多くの時間を取られ、チームがより複雑な顧客ニーズや問題解決に注力しにくくなります。

MaiAgent を活用すれば、企業の社外向け AI テキストカスタマーサポートアシスタントを構築でき、サポートコストを効果的に削減しながら、サービス品質と顧客満足度を向上させることができます。

## 適用シーン <a href="#use-cases" id="use-cases"></a>

* **Web サイトとメッセージングアプリでのカスタマーサポート**：Agent を Web サイトに埋め込んだり、LINE、Facebook Messenger、WhatsApp など顧客が普段使っているメッセージングアプリと連携したりして、24 時間のリアルタイム応答を提供します。
* **法規・ポリシーの問い合わせ**：行政機関や規制の厳しい業界では、一般の方や社内担当者が大量の法規公告から素早く答えを見つけられるようにする必要があり、回答には出典を付ける必要があります。
* **製品仕様とレコメンド**：カタログ、仕様書、比較表などの資料は量が膨大で更新も頻繁であり、顧客からの質問も多岐にわたるため、人手で調べるには時間がかかります。
* **注文・アフターサービスの問い合わせ**：注文状況、保証範囲、修理の進捗など、外部システムのデータをリアルタイムに照会する必要があり、静的なドキュメントだけでは回答できません。

{% hint style="info" %}
同じナレッジベースを複数の Agent で同時に利用できます。一般的には、「社外の一般ユーザー向け」と「社内のサポート担当者向け」にそれぞれ Agent を作成し、ナレッジベースは共有しつつ、異なるロール指示を設定することで、回答の詳しさやトーンを変えます。
{% endhint %}

## 仕組み <a href="#how-it-works" id="how-it-works"></a>

| 段階                   | 内容                                                                                |
| -------------------- | --------------------------------------------------------------------------------- |
| **① 顧客が質問する**        | 顧客が Web サイトの Web Chat、LINE、Facebook Messenger など、連携済みのチャットプラットフォームで質問します          |
| **② Agent が対応を引き継ぐ** | ロール指示に基づいて、どのデータソースを使って回答するかを判断します                                                |
| **③ 答えを探す**          | ナレッジベースからセマンティック検索で関連する段落を検索し、FAQ とも照合します。リアルタイムのデータが必要な場合は、ツールを呼び出して外部システムを照会します |
| **④ 回答を生成する**        | 検索結果を統合して回答を生成し、設定に応じて引用元を付けます                                                    |
| **⑤ 回答できない場合**       | 有人対応への引き継ぎを実行し、会話をサポート担当者に引き渡します                                                  |

Agent は質問を受け取ると、まずナレッジベースからセマンティック検索で関連する段落を探し、言語モデルがそれらを統合して回答を生成します。設定に応じて[引用元](/maiagent-user-guide/ja/build/choose-channel/web-chat/citation-display.md)も付けるため、顧客は内容をさかのぼって確認できます。質問がナレッジの範囲を超える場合は、[有人対応への引き継ぎ通知](/maiagent-user-guide/ja/build/conversation-settings/human-handoff/handoff-notification.md)を設定して会話をサポート担当者に引き渡すことで、AI による誤った回答を防げます。

## 構築の流れ <a href="#setup-workflow" id="setup-workflow"></a>

### 1. Agent を作成する <a href="#step1-create-agent" id="step1-create-agent"></a>

<mark style="color:blue;">AI アシスタント</mark>ページで名前を入力し、RAG と言語モデルを選択して、回答モードを設定します。一般的なテキストカスタマーサポートであれば、「RAG Q\&A」を選択すれば十分です。詳しくは [Agent を作成する](/maiagent-user-guide/ja/build/agent/setup.md)をご覧ください。

### 2. ロール指示を作成する <a href="#step2-system-prompt" id="step2-system-prompt"></a>

ロール指示は、AI の役割、出力形式、回答の範囲を決めるもので、サポート品質を左右する重要な要素です。「ナレッジベースの範囲外の情報には回答しないこと」を明記し、回答できない場合の定型の返答文を用意することをおすすめします。書き方は[ロール指示設計ガイド](/maiagent-user-guide/ja/build/agent/system-prompt.md)を参考にしてください。

### 3. ナレッジベースと FAQ を作成する <a href="#step3-knowledge-base" id="step3-knowledge-base"></a>

カタログ、仕様書、お知らせなどのドキュメントをアップロードして[ナレッジベース](/maiagent-user-guide/ja/build/knowledge-base/km.md)を作成するか、[クローラー機能](/maiagent-user-guide/ja/build/knowledge-base/scrape-website.md)で Web サイトの内容を自動的に取得します。頻繁に寄せられ、答えが決まっている質問は、別途 [FAQ](/maiagent-user-guide/ja/build/knowledge-base/faq.md) を作成して、回答に一貫性を持たせます。公開前に[検索テスト](/maiagent-user-guide/ja/build/knowledge-base/test-search-result.md)で、検索結果が正しくヒットしているかを確認できます。

### 4. ツールを設定する（任意） <a href="#step4-configure-tools" id="step4-configure-tools"></a>

サポートで注文や在庫などのリアルタイムデータを照会する必要がある場合は、[Agent にツールを設定](/maiagent-user-guide/ja/build/tools/configure_tools.md)して、AI が社内 API を直接呼び出して最新の結果を取得できるようにします。

### 5. チャットプラットフォームと連携して公開する <a href="#step5-connect-channel" id="step5-connect-channel"></a>

顧客が利用しているチャットプラットフォームに合わせて[連携するプラットフォームを選択](/maiagent-user-guide/ja/build/choose-channel.md)します。Web Chat、LINE、Facebook Messenger、Telegram、Microsoft Teams、WhatsApp、Email、Slack を同時に連携できます。

### 6. モニタリングと改善 <a href="#step6-monitor" id="step6-monitor"></a>

公開後は AgentOps で[自動評価と Agent のモニタリング](/maiagent-user-guide/ja/build/agent-ops/evaluations.md)を行い、[AI カスタマーサポート品質管理](/maiagent-user-guide/ja/serve/ai-quality-guide.md)の推奨事項に沿って、ナレッジベースの拡充とロール指示の調整を継続します。

## 活用例 <a href="#examples" id="examples"></a>

* [法規検索アシスタント](/maiagent-user-guide/ja/serve/text/lawsearch.md)：行政機関の法規公告を例に、同じナレッジベースを使って、社内担当者向けと一般の方向けの 2 種類の回答方法を設計する方法を説明します。
* [製品検索アシスタント](/maiagent-user-guide/ja/serve/text/productsearch.md)：パソコンメーカーの製品カタログを例に、Agent の作成、カタログのアップロードから Web サイトへの埋め込みまでの一連の流れを紹介します。

以降の各節では、実際の事例を使って構築の過程を紹介します。ご自身の業務シーンにすばやく応用する際の参考にしてください。


---

# 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/serve/text.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.
