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

# 文字客服

以知識庫與 FAQ 打造企業對外的 AI 文字客服助理，串接官網與各通訊軟體，並在必要時轉接真人客服

在企業客服工作中，面對大量且頻繁的客戶查詢，人工回覆不僅容易延遲，還會造成客服人員負擔過重，影響整體服務效率。許多重複性問題反覆出現，耗費大量時間處理，導致團隊難以將精力集中於更複雜的客戶需求與問題解決。

現在，您可以運用 MaiAgent 打造企業對外的 AI 文字客服助理，有效降低客服成本，提升服務品質與客戶滿意度！

## 適用情境 <a href="#use-cases" id="use-cases"></a>

* **官網與通訊軟體客服**：將 AI 助理嵌入官網，或串接 LINE、Facebook Messenger、WhatsApp 等客戶慣用的通訊軟體，提供 24 小時即時回覆。
* **法規與政策查詢**：公部門或高度受規範的產業，需要讓民眾與內部人員從大量法規公告中快速找到答案，且回覆必須附上出處。
* **產品規格與推薦**：型錄、規格表、比較表等資料量龐大且更新頻繁，客戶問題多元，人工查找耗時。
* **訂單與售後查詢**：需要即時查詢訂單狀態、保固範圍、維修進度等外部系統資料，單靠靜態文件無法回答。

{% hint style="info" %}
同一份知識庫可同時供多個 AI 助理使用。常見做法是針對「對外民眾」與「內部客服人員」各建一個 AI 助理，共用知識庫但給予不同的角色指令，讓兩者的回覆詳略與語氣不同。
{% endhint %}

## 運作方式 <a href="#how-it-works" id="how-it-works"></a>

| 環節            | 內容                                               |
| ------------- | ------------------------------------------------ |
| **① 客戶提問**    | 客戶在官網 Web Chat、LINE、Facebook Messenger 等已串接的通路發問 |
| **② AI 助理接手** | 依角色指令判斷該用哪些資料來源回答                                |
| **③ 尋找答案**    | 從知識庫語意檢索相關段落、比對 FAQ 常見問題；需要即時資料時呼叫工具查詢外部系統       |
| **④ 生成回覆**    | 整合檢索結果生成回覆，並依設定附上引用來源                            |
| **⑤ 無法回答時**   | 觸發轉真人客服，把對話交接給客服人員                               |

AI 助理收到問題後，會先從知識庫中以語意檢索找出相關段落，再由語言模型整合成回覆，並依設定附上[引用來源](/conversations/web-chat/citation-display.md)讓客戶可回溯查證。若問題超出知識範圍，可設定[轉真人客服通知](/conversations/human-handoff/handoff-notification.md)，將對話交接給客服人員，避免 AI 亂答。

## 建置流程 <a href="#setup-workflow" id="setup-workflow"></a>

### 1. 建立 AI 助理 <a href="#step1-create-agent" id="step1-create-agent"></a>

於 <mark style="color:blue;">AI 助理</mark> 頁面填寫名稱，選擇 RAG 與語言模型，並設定回答模式。一般文字客服選擇「一般模式」即可滿足需求。詳見[建立 AI 助理](/build/setup.md)。

### 2. 撰寫角色指令 <a href="#step2-system-prompt" id="step2-system-prompt"></a>

角色指令決定 AI 的身分、輸出格式與回答邊界，是客服品質的關鍵。建議明確寫出「不在知識庫範圍內的資訊請勿回答」，並提供無法回答時的標準回覆話術。寫法可參考[角色指令設計指南](/build/system-prompt.md)。

### 3. 建立知識庫與 FAQ <a href="#step3-knowledge-base" id="step3-knowledge-base"></a>

上傳型錄、規格表、公告等文件建立[知識庫](/km/km.md)，或以[爬蟲功能](/km/scrape-website.md)自動擷取官網內容。針對高頻且答案固定的問題，另外建立 [FAQ 常見問題](/km/faq.md)以確保回覆一致。上線前可用[搜尋測試](/km/test-search-result.md)確認檢索結果是否命中。

### 4. 配置工具（選配） <a href="#step4-configure-tools" id="step4-configure-tools"></a>

若客服需要查詢訂單、庫存等即時資料，可[為 AI 助理配置工具](/tools/configure_tools.md)，讓 AI 直接呼叫企業內部 API 取得最新結果。

### 5. 串接對話平台上線 <a href="#step5-connect-channel" id="step5-connect-channel"></a>

依客戶所在通路[選擇串接平台](/conversations/choose-channel.md)，可同時串接 Web Chat、LINE、Facebook Messenger、Telegram、Microsoft Teams、WhatsApp、Email 與 Slack。

### 6. 監控與優化 <a href="#step6-monitor" id="step6-monitor"></a>

上線後於 AgentOps 進行[自動評估與 AI 助理監控](/agent-ops/evaluations.md)，並依 [AI 客服品質管理](/build/ai-quality-guide.md)的建議持續補充知識庫與調整角色指令。

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

* [法規查詢助理](/application/text/lawsearch.md)：以公部門法規公告為例，說明如何用同一個知識庫，為內部人員與一般民眾設計兩種不同的回覆方式。
* [產品查詢助理](/application/text/productsearch.md)：以電腦廠牌產品型錄為例，示範從建立助理、上傳型錄到嵌入官網的完整流程。

接下來各小節將以實際案例示範建置過程，協助您快速套用至自身的業務情境。


---

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