> For the complete documentation index, see [llms.txt](https://docs.lleverage.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lleverage.ai/build-and-improve/automate/advanced-workflow-building/ai/categorise.md).

# Categorise

Categorise classifies input into one of a defined set of categories and exposes a Workflow branch for each category.

### Key features

* Model-based classification
* Two to twenty categories
* Category-specific output branches
* Templates for common classification patterns
* Model and additional-context configuration

### Add Categorise

1. Select **Add Action**.
2. Open the **AI** category.
3. Select **Categorise**.
4. Connect the input and category branches.

### Configure the input

Set the Workflow value that should be classified.

Use one coherent input per classification decision. If several fields are required, combine or structure them before the Categorise action so the classification context is clear.

### Configure categories

You can start from a template or define categories manually.

For each category, set:

* **Title** — short label for the branch.
* **Description** — specific definition of what belongs in it.

Example:

**Bug report**\
A product defect, crash or behaviour that prevents the product from working as intended.

**Feature request**\
A request for capability that does not currently exist.

Descriptions should make categories distinguishable from one another.

### Branching

Each category has its own output branch.

When the action runs:

1. the model evaluates the input;
2. one category is selected;
3. execution continues through that category's branch.

When no category is selected, use the action's default path where available.

### Templates

Templates can pre-populate categories for patterns such as:

* order type;
* invoice type;
* support triage;
* email triage;
* chat intent.

Treat templates as starting configuration. Review the definitions for your actual process.

### Advanced configuration

Use advanced settings to select the model or provide additional context needed for classification.

Do not add context that should instead be maintained in an authoritative source or earlier Workflow step.

### Limits

| Setting              |          Limit |
| -------------------- | -------------: |
| Minimum categories   |              2 |
| Maximum categories   |             20 |
| Category title       |  50 characters |
| Category description | 500 characters |

### Tips

* Make categories mutually exclusive where possible.
* Describe inclusion criteria rather than using one-word labels.
* Include examples only when they clarify a boundary.
* Test ambiguous inputs deliberately.
* Review misclassified examples before changing category definitions.
* Use deterministic Branch conditions instead when the rule can be expressed exactly.


---

# 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.lleverage.ai/build-and-improve/automate/advanced-workflow-building/ai/categorise.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.
