# 自動評估與 AI 助理監控

## 自動評估 <a href="#auto-evaluation" id="auto-evaluation"></a>

自動評估功能讓您能夠使用預先建立的測試資料集，自動化測試 AI 助理的回應品質。系統會將測試問題發送給 AI 助理，比對實際回應與預期回應，產生詳細的評估報告。

### 進入自動評估 <a href="#access-auto-evaluation" id="access-auto-evaluation"></a>

進入左側功能欄的「<mark style="color:blue;">AgentOps</mark>」，點選「<mark style="color:blue;">自動化測試</mark>」。

<figure><img src="/files/BIIBNfLCHJZ68w0UJsFi" alt="自動化測試列表"><figcaption><p>自動化測試列表，顯示各次測試的成功率與平均回應秒數</p></figcaption></figure>

頁面顯示所有評估記錄，包含評測名稱、測試集、AI 助理、成功率、平均秒數與建立時間。

### 建立並執行測試 <a href="#create-and-run-test" id="create-and-run-test"></a>

1. 確認已建立測試資料集（參考 [測試資料集管理](/agent-ops/test-datasets.md)）
2. 點擊「<mark style="color:blue;">建立測試</mark>」按鈕
3. 填寫評估名稱、描述，選擇測試資料集與 AI 助理
4. 點擊「<mark style="color:blue;">開始評估</mark>」，系統會自動執行所有測試案例

{% hint style="info" %}
評估執行時間取決於測試案例數量，通常 50 個測試案例約需 2-3 分鐘。
{% endhint %}

### 查看評估結果 <a href="#view-evaluation-results" id="view-evaluation-results"></a>

點擊評估記錄即可查看詳細報告：

<figure><img src="/files/zF4b6tNqcqK4cbvKVynP" alt="評估詳情"><figcaption><p>測試詳情頁面：成功率、AI 洞察摘要、指標統計與改進建議</p></figcaption></figure>

詳細報告包含：

* **成功率**：通過測試的案例百分比
* **AI 洞察**：系統自動分析的評估摘要與改進建議
* **指標統計**：品質性評分、回答相關性等指標
* **測試案例明細**：每個問題的預期回應、實際回應、評分與狀態

**成功率參考基準：**

| AI 助理類型 | 建議成功率 |
| ------- | ----- |
| 產品查詢助理  | ≥ 95% |
| 客服支援助理  | ≥ 90% |
| 通用對話助理  | ≥ 80% |

{% hint style="info" %}
更多關於洞察報告的說明，請參考：[評估洞察報告](https://github.com/Playma-Co-Ltd/maiagent-user-guide-gitbook/blob/main/zh-tw/track/evaluation-insights.md)
{% endhint %}

### 管理評估記錄 <a href="#manage-evaluation-records" id="manage-evaluation-records"></a>

* **搜尋與篩選**：依測試集、AI 助理或關鍵字篩選記錄
* **重新執行**：修改知識庫或 AI 設定後，重新測試驗證改善效果
* **匯出**：將評估結果匯出為 Excel 格式

***

## AI 助理監控 <a href="#ai-agent-monitoring" id="ai-agent-monitoring"></a>

AI 助理監控提供即時的對話運作數據，讓您深入了解每一次對話的處理細節、效能指標與品質評分。

### 進入 AI 助理監控 <a href="#access-ai-agent-monitoring" id="access-ai-agent-monitoring"></a>

進入左側功能欄的「<mark style="color:blue;">AgentOps</mark>」，點選「<mark style="color:blue;">AI 助理監控</mark>」。

<figure><img src="/files/h1FKHpU9FXZh0JnC2EiW" alt="AI 助理監控"><figcaption><p>AI 助理監控介面，顯示每則對話的詳細技術指標</p></figcaption></figure>

### 監控欄位說明 <a href="#monitoring-field-descriptions" id="monitoring-field-descriptions"></a>

| 欄位         | 說明                |
| ---------- | ----------------- |
| 用戶輸入訊息     | 使用者發送給 AI 的問題     |
| 輸出訊息       | AI 助理的回應內容        |
| AI 助理      | 處理此對話的 AI 助理名稱    |
| 使用者反饋      | 讚 👍 或倒讚 👎       |
| 誠實性評分      | 回應是否忠實於知識庫內容      |
| 回答相關性評分    | 回應與問題的相關程度        |
| 回應時間       | AI 產生回應的完整時間      |
| LLM 處理推理時間 | LLM 推理與回覆生成所花費的時間 |
| 總字數        | 對話中消耗的總字數（含問題與回答） |
| LLM        | 使用的語言模型名稱         |
| 用戶         | 發起對話的使用者          |

### 搜尋與篩選 <a href="#search-and-filter" id="search-and-filter"></a>

* **關鍵字搜尋**：搜尋輸入/輸出訊息或使用者名稱
* **LLM 篩選**：選擇特定語言模型，比較不同模型的效能
* **AI 助理篩選**：選擇特定助理，追蹤其運作狀況
* **時間範圍**：選擇近 7 天、30 天、90 天或自訂日期
* **匯出**：將監控數據匯出為 Excel 或 CSV 格式

### 監控最佳實踐 <a href="#monitoring-best-practices" id="monitoring-best-practices"></a>

**每日檢視**：查看最近 24 小時的對話，識別異常的回應時間或錯誤

**識別效能瓶頸**：

* 回覆時間 > 10 秒：檢查知識庫檢索效率或考慮更快的 LLM
* Token 用量過高：評估是否可縮短 System Prompt 或對話歷史

**品質問題追蹤**：

1. 使用關鍵字搜尋找到問題對話
2. 分析根本原因（知識庫不足 / AI 理解錯誤 / 模型限制）
3. 將問題案例加入測試資料集，執行自動評估驗證修復

***

## 常見問題 <a href="#faq" id="faq"></a>

### Q：自動評估與 AI 助理監控有什麼不同？ <a href="#faq-evaluation-vs-monitoring" id="faq-evaluation-vs-monitoring"></a>

|      | 自動評估      | AI 助理監控    |
| ---- | --------- | ---------- |
| 用途   | 定期品質測試    | 即時運作監控     |
| 資料來源 | 預設的測試資料集  | 實際用戶對話     |
| 主要指標 | 成功率、回應時間  | 效能、成本、品質評分 |
| 適合對象 | 品質驗證、回歸測試 | 日常監控、問題排查  |

### Q：多久執行一次評估？ <a href="#faq-how-often-to-evaluate" id="faq-how-often-to-evaluate"></a>

建議：核心功能每週一次、完整測試每月一次、重大更新後立即執行。

### Q：評估會影響實際用戶嗎？ <a href="#faq-evaluation-impact-on-users" id="faq-evaluation-impact-on-users"></a>

不會。自動評估使用獨立環境，不會干擾實際用戶的對話。

### Q：監控數據保留多久？ <a href="#faq-monitoring-data-retention" id="faq-monitoring-data-retention"></a>

預設保留 90 天。可定期匯出重要數據進行長期保存。


---

# Agent Instructions: 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:

```
GET https://docs.maiagent.ai/agent-ops/evaluations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
