---
title: Classify Text
description: Sort text into your own labels on-device — no training needed
---

Sort text into labels you make up, such as `billing, bug report, other`, with a model that runs in your browser. No training needed.

## What it does

Classify Text scores the **Text** against every label in **Labels** with a zero-shot model such as *DeBERTa zero-shot*, and returns the best label plus a score for each one. If even the best label scores below **Confidence threshold**, `label` is `null`, so you can send "none of the above" to its own branch.

By default the labels compete for one answer, so their scores add up to about 1. Turn on **Allow several labels** to score each label on its own, so several can be high at once. There is no cost per run and no API key.

## When to use it

* Route incoming messages or tickets by topic or intent.
* Tag notes or scraped content with categories you invent on the spot.
* Get the [Text Classifier](/nodes/builtin/ai/aiagents/textclassifiernode/) result for free, privately and offline, without connecting a model.

For fixed sentiment or toxicity labels, [Analyze Text](/nodes/builtin/ai/localai/analyze-text/) is simpler.

## Inputs and settings

* **Labels**: separate labels with commas or new lines. Duplicates are ignored, whatever their case. An expression can also return a list, for example `{{ $input.categories }}`.
* Clear, descriptive labels work best: `refund request` beats `money`.

## Outputs

Each output item has these fields:

```json title="Shape of an output item"
{
  "label": "…",
  "score": 0,
  "labels": []
}
```

`score` is the best label's score, reported even when `label` is `null`. `labels` lists every label as `{ label, score }`, best first, which is useful with **Allow several labels**.

## Dependencies and credentials

None. This node needs no connection and has no slots for other nodes.

The **Model** picker lists your installed zero-shot models first, then ones that download on first use. Manage them on the [Local AI](/app/local-models/) page.

## Example workflow

Sort the text you select into a category:

1. [Context Menu](/nodes/builtin/trigger/contextmenu/) with **Menu Contexts** set to **Selection**.
2. Classify Text with **Text** `{{ $input.selectionText }}`, **Labels** `invoice, meeting request, newsletter, other` and **Model** *DeBERTa zero-shot*.
3. [Switch](/nodes/builtin/flow/switch/) with one rule per label on `{{ $input.label }}`. Items with a `null` label go to the **Anything else** fallback branch for manual review.

## Common issues

* **"Choose a zero-shot model to classify with."** **Model** is empty. Pick one.
* **"Provide some text to classify."** **Text** is empty after expressions run.
* **"Add at least one label (comma-separated)."** **Labels** is empty, or the expression returned nothing.
* **`label` is often null.** Lower **Confidence threshold**, or make the labels more distinct.
* **Several labels look right.** Turn on **Allow several labels** and read the scores in `labels`.

## Related nodes

* [Text Classifier](/nodes/builtin/ai/aiagents/textclassifiernode/): the AI agent version; connect a [Local Classifier](/nodes/builtin/ai/aidependencies/llm/localclassifier/) to run it on-device.
* [Analyze Text](/nodes/builtin/ai/localai/analyze-text/): fixed sentiment and toxicity labels.
* [Switch](/nodes/builtin/flow/switch/): route items by label.
* [Summarize](/nodes/builtin/ai/localai/summarize/): condense long text first.