Elizon Docs
Workflows

Classify

Sort a piece of text into one of your categories and route the run down that category's branch.

The Classify node (classify) asks a model which of your categories a piece of text belongs to, and continues the run down the matching branch. Each category is an output handle on the node; wire each one to what should happen for it.

Configuration

FieldTypeDefaultDescription
llm_config_idstring—The LLM provider connection to use.
model_idstring—The model on that connection.
inputPromptstring{{ trigger.body.text }}The text to classify, with {{ }} references. Empty forwards what reached the node.
categorieslist of { id, name, description }—At least one. name is what the model picks between and description tells it when to pick it. id is stable, so renaming a category keeps its branch wired.
allowMultipleClassesbooleanfalseLet the model pick several categories. Every matching branch then runs.
noMatchActiondiscard | other_branchdiscardWhen nothing matches: discard stops this branch of the run; other_branch continues down the node's Other handle.
systemPromptTemplatestring—Replace the platform's classification prompt. Empty uses the default.
enableAutoFixingbooleanfalseWhen the model's answer is not exactly one of your category names, match it case-insensitively, then as a substring, before treating it as no match. No second model call is made.

Output

FieldTypeDescription
inputTextstringThe text that was classified.
assignedCategoriesstring[]The ids of the categories picked. Empty when nothing matched.
discardedbooleantrue when nothing matched and noMatchAction is discard.
modelUsedstringThe model that answered.
tokenUsage.promptnumberPrompt tokens.
tokenUsage.completionnumberCompletion tokens.
latencyMsnumberHow long the call took.
autoFixAppliedbooleanWhether auto-fixing placed an answer the exact match could not.

Branches that were not picked show as skipped in the run trace, as does everything only they lead to.

Limits and errors

  • The node fails when no LLM configuration or model is selected, or the configuration belongs to another organization.
  • With allowMultipleClasses off, only the first category the model picks is used.
  • No match is not an error: the node completes and either discards the item or takes the Other branch. There is no confidence score.

Example

Route support email to billing or technical:

workflows/route-support.yaml
name: Route support
description: Sends each support request to the right queue.
graph:
  nodes:
    - id: request
      type: trigger_http
      position: { x: 0, y: 0 }
      data:
        method: POST
        fields:
          - { name: text, type: string, required: true }
    - id: route
      type: classify
      position: { x: 280, y: 0 }
      data:
        llm_slot: router-model
        model_id: gpt-4o-mini
        inputPrompt: '{{ trigger.body.text }}'
        categories:
          - { id: billing, name: Billing, description: Invoices, payments, refunds. }
          - { id: technical, name: Technical, description: Faults, errors, how-to questions. }
        allowMultipleClasses: false
        noMatchAction: other_branch
        enableAutoFixing: true
    - id: billing-queue
      type: variable
      position: { x: 560, y: -80 }
      data: { name: queue, type: string, initialValue: billing }
    - id: technical-queue
      type: variable
      position: { x: 560, y: 80 }
      data: { name: queue, type: string, initialValue: technical }
  edges:
    - { id: request-to-route, source: request, target: route }
    - { id: route-billing, source: route, target: billing-queue, sourceHandle: category-billing }
    - {
        id: route-technical,
        source: route,
        target: technical-queue,
        sourceHandle: category-technical,
      }

Each category's handle is category-<id>; the no-match handle is category-other.

In a Package

  • Travels: model_id, inputPrompt, categories, allowMultipleClasses, noMatchAction, systemPromptTemplate, enableAutoFixing
  • Converted: llm_config_id → llm_slot (an llm Slot id)
  • Never carried: none
elizon.yaml
slots:
  - id: router-model
    type: llm
    required: true