# (4) 訓練及測試

### 本篇教您的重點

* 如何執行訓練狀態？
* 如何測試訓練結果？

### 重要概念

* **目的**\
  訓練完成後，測試機器人「聽懂」哪些內容。
* **訓練概念**\
  每次更新訓練的內容（意圖、訓練句、抽換詞類），都必須按下**訓練**，機器人才會學習新內容。
* **測試概念**\
  訓練完成後，詢問和已建意圖相關的句子，測試機器人學會了哪些內容。

### 訓練步驟

1. 確認上方訓練狀態為 **⚠️**
2. 按下 **`訓練`**
3. 按下 **`開始訓練`**
4. 等候出現「自然語意訓練完成」訊息，或是上方訓練按鈕出現 **綠色** **✔️**

![](/files/-LbRo9jxnPAUPr4KM-UH)

### 測試步驟

1. 點選右上角 **`測試`**
2. 輸入您想測試的句子
3. 按下 **`確認`**
4. 核對測試結果

![](/files/-LbRqCh-s32AcNdaPclp)

### 測試結果

* 信心指數：機器人猜測正確意圖的信心指數，最高為 1.000
* 超出意圖範圍：機器人聽不懂，代表此句子超過機器人可理解的範圍。可能原因包含

  &#x20;1\) 機器人尚未學會，找不到答案&#x20;

  &#x20;2\) 您輸入的句子確實和現有意圖無關，故機器人正確判斷為超出意圖範圍。

若對測試準確度不滿意，可回到 [(3)建立意圖及撰寫訓練句](https://docs.yoctol.ai/guide/add_intent_utterance) ，修改訓練內容。

### 您可能還想知道

* [如何寫出有效的訓練句？](https://medium.com/yoctol-ai/%E5%A6%82%E4%BD%95%E5%AF%AB%E8%A8%93%E7%B7%B4%E5%8F%A5-da68c2a6fa37)


---

# 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-tw.yoctol.ai/guide/training_predict.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.
