Skip to main content

Classification Automatique

Automatically classifies data into predefined categories using a language model. Returns the category and a confidence score.

Parameters

ParameterTypeRequiredVariableDescription
inputdynamic valueNoYesEntities or texts to automatically classify.
classificationScheme.typechoice (predefined, ontology_types, custom)NoNoClassification scheme type: predefined list, ontology types, or custom. (Default: "predefined")
classificationScheme.categoriesarrayYesNoList of available categories for classification (e.g. Tech, Finance, Health).
classificationScheme.allowMultiplebooleanNoNoAllow assigning multiple categories per item. (Default: false)
classificationScheme.maxCategoriesnumberNoNoMaximum number of categories to assign per item (if multi-label enabled). (min 1)
classificationScheme.customPrompttextNoYesCustom instructions to guide the classification.
includeConfidencebooleanNoNoInclude confidence score in classification results. (Default: true)
confidenceThresholdnumberNoNoMinimum confidence threshold (0 to 1) to assign a category. (Default: 0.7, min 0, max 1)
entityTypeFilterarrayNoNoFilter entities by type before classification.
targetAttributetextNoNoTarget attribute name to store the classification result on the entity.
model.providertextNoNoLanguage model provider (e.g. openai, anthropic).
model.modeltextNoNoModel identifier to use (e.g. gpt-4o).
parameters.temperaturenumberNoNoModel creativity. Low value recommended for classification. (Default: 0.3, min 0, max 2)
parameters.maxTokensnumberNoNoMaximum number of tokens in the response. (Default: 2048, min 1, max 128000)
outputVariabletextNoNoOutput 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.