> For the complete documentation index, see [llms.txt](https://docs-tw.yoctol.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-tw.yoctol.ai/term/trigger.md).

# 觸發條件

### 說明

在 YOCTOL.AI 中 [節點](https://docs.yoctol.ai/term/node) 的 **`觸發條件`**（trigger）是使機器人回應特定節點的規則。

**一種觸發條件，只能接在單一節點。**\
**但一個節點，可以有多種觸發條件。**

\
若套用在多個節點上，可能導致機器人無法正常回覆。

### 範例

以飲料店機器人中「訂購資訊」節點為例，可應用的觸發條件包含以下：

1. 自然語意：選擇「意圖為：『訂購資訊』」
2. 關鍵字比對：選擇「包含任意詞彙：『下單』、『訂飲料』、『訂購』」
3. 正規表達式：撰寫「.\*(下單|訂飲料|訂購).\*$」等式子，撰寫方式可參考[正規表達式](https://docs.yoctol.ai/term/regex)。


---

# 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-tw.yoctol.ai/term/trigger.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.
