Sort into a category
Step
classifyaideprecatedReplaced by an AI agent step. Tell the agent the categories, and give it the fields category, confidence and reason.
At a glance
| Property | Value |
|---|---|
| Step name | classify |
| Resource | ClusterStep (lumen.ai/v1alpha1) |
| Palette group, category | ai, ai |
| Credits | 1.5 credits each time it succeeds |
| Side effects | no |
| Installation must provide | nothing |
Inputs
| Property | Value |
|---|---|
| Needs | nothing |
| Produces | fields |
| Works on | item one document at a time |
Needs and Produces are data types (file, text, fields, email). The editor offers a step only where what it needs is already on the path. See Documents and data.
Outputs
A later node references an output as {nodeId.field} in text, or nodeId.field in a condition.
| Output | Type |
|---|---|
category | string |
confidence | number |
reason | string |
Settings
Set under config: on the flow node. Text settings may contain {nodeId.field} placeholders.
| Setting | Type | Default | Description |
|---|---|---|---|
categoriesrequired | list of object | - | CategoriesminItems 2; maxItems 30 |
categories[].namerequired | string | - | NameminLength 1; maxLength 60 |
categories[].description | string | - | Description says what belongs here, to the model.maxLength 300 |
allowOther | boolean | true | AllowOther lets the answer be "other" when nothing fits. On unless set to false; off, the document is put in the closest category. |
files | object | - | Files is how the step reads the document's files and how much of them. |
files.mode | string | "attach" | Mode is attach (the model reads each file whole when it can, its text otherwise), text (only the text read out of each file) or none (no file at all). Unset is attach. ifNoText attaches them only when the document has no text, and sends none otherwise.one of attach, text, none, ifNoText |
files.maxFiles | integer | 10 | MaxFiles is the most files one document may bring; the rest are skipped. Unset is 10.minimum 1; maximum 100 |
files.maxPages | integer | 100 | MaxPages is the most PDF pages across all files together; a PDF that crosses it is read up to the pages left. Unset is 100.minimum 1; maximum 1000 |
files.maxBytes | integer | 20971520 | MaxBytes is the most bytes, all files together. Unset is 20 MB.minimum 1; maximum 104857600 |
The full JSON Schema of these settings: classify.schema.json.
Use it in a flow
A node that runs classify goes under spec.nodes of a Flow. Give it any id, and list the next node ids in next.
flow.yaml (spec.nodes)
- id: classify
stepRef: {name: classify}
Was this page helpful?