Jina - Classify text action ​

The Classify text action classifies text in Jina.

TWO WAYS TO CLASSIFY

Provide the Model and Labels for zero-shot classification against a list of candidate labels, or provide a Classifier ID to use a trained classifier instead. The action fails unless you configure the Model and Labels fields, or Classifier ID.

Input ​

Input fieldDescription
ModelRequired for zero-shot classification, unless a Classifier ID is configured. Select a model, or enter a custom model ID. Don't configure this field when using a Classifier ID.
InputEnter one or more strings to classify.
LabelsThe Labels field is required for zero-shot classification unless Classifier ID is set. Enter the candidate labels. Don't configure this field when using a Classifier ID.
Classifier IDOptional. Enter a trained classifier's ID. Don't configure the Model and Labels fields when specifying a classifier ID.

Output ​

Output fieldDescription
DataA list of classification results.
Object (Data)The result type. Always classification.
Index (Data)The classified input's position in the Input array, starting at 0.
Prediction (Data)The predicted label.
Score (Data)The predicted label's confidence score, between 0 and 1.
Predictions (Data)A list of scores for every candidate label.
Label (Predictions)The candidate label.
Score (Predictions)The candidate label's confidence score, between 0 and 1.
UsageToken usage.
Total tokens (Usage)Token usage.

Last updated: