Classification Automatique
Automatically classifies data into predefined categories using a language model. Returns the category and a confidence score.
Parameters
| Parameter | Type | Required | Variable | Description |
|---|---|---|---|---|
input | dynamic value | No | Yes | Entities or texts to automatically classify. |
classificationScheme.type | choice (predefined, ontology_types, custom) | No | No | Classification scheme type: predefined list, ontology types, or custom. (Default: "predefined") |
classificationScheme.categories | array | Yes | No | List of available categories for classification (e.g. Tech, Finance, Health). |
classificationScheme.allowMultiple | boolean | No | No | Allow assigning multiple categories per item. (Default: false) |
classificationScheme.maxCategories | number | No | No | Maximum number of categories to assign per item (if multi-label enabled). (min 1) |
classificationScheme.customPrompt | text | No | Yes | Custom instructions to guide the classification. |
includeConfidence | boolean | No | No | Include confidence score in classification results. (Default: true) |
confidenceThreshold | number | No | No | Minimum confidence threshold (0 to 1) to assign a category. (Default: 0.7, min 0, max 1) |
entityTypeFilter | array | No | No | Filter entities by type before classification. |
targetAttribute | text | No | No | Target attribute name to store the classification result on the entity. |
model.provider | text | No | No | Language model provider (e.g. openai, anthropic). |
model.model | text | No | No | Model identifier to use (e.g. gpt-4o). |
parameters.temperature | number | No | No | Model creativity. Low value recommended for classification. (Default: 0.3, min 0, max 2) |
parameters.maxTokens | number | No | No | Maximum number of tokens in the response. (Default: 2048, min 1, max 128000) |
outputVariable | text | No | No | Output variable name containing the classification results. |
Parameters marked Variable = Yes accept the
{{blockName.field}}syntax.
Output
Output variable : classificationResult
{
"category": "...",
"confidence": 0
}
Example
Classify a support ticket.
Input :
{"text": "Je ne peux pas me connecter a mon compte"}
Output :
{"category": "authentification", "confidence": 0.91}
Tip
Define categories in the block configuration. {{classificationResult.category}} contains the selected category, {{classificationResult.confidence}} the score.