> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/chinese/guan-li-yu-she-zhi/settings/document-processing/decision-trees/priority-policy.md).

# 优先级策略

选择此选项后，可以为每条规则设置优先级。所选数字越小，优先级越高（即优先级 1 最高）。系统会按优先级顺序评估规则，并应用匹配的最高优先级规则。

**示例：**

<table><thead><tr><th width="137">规则</th><th width="110">优先级</th><th width="268">条件</th><th>返回组</th></tr></thead><tbody><tr><td>1</td><td>5</td><td>总金额 &#x3C;= 1000</td><td>GROUP_1</td></tr><tr><td>2</td><td>4</td><td>总金额 &#x3C;= 2000</td><td>GROUP_2</td></tr><tr><td>3</td><td>3</td><td>总金额 &#x3C;= 3000</td><td>GROUP_3</td></tr><tr><td>4</td><td>2</td><td>总金额 &#x3C;= 4000</td><td>GROUP_4</td></tr><tr><td>5</td><td>1</td><td>总金额 &#x3C;= 5000</td><td>GROUP_5</td></tr></tbody></table>

如果总金额为 **1500**，系统将评估以下规则：

* **规则 1**：总金额 <= 1000（不匹配）
* **规则 2**：总金额 <= 2000（匹配）
* **规则 3**：总金额 <= 3000（匹配）
* **规则 4**：总金额 <= 4000（匹配）
* **规则 5**：总金额 <= 5000（匹配）

由于优先级按 **5、4、3、2、1** 的顺序应用，匹配的最高优先级规则是 **规则 5**（**GROUP\_5**）。决策树将返回 **GROUP\_5**，因为 **规则 5** 的优先级最高（优先级 1）。


---

# 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.docbits.com/chinese/guan-li-yu-she-zhi/settings/document-processing/decision-trees/priority-policy.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.
