Skip to main content

Task type: intent classification

Classifiers are almost always fittable services. To launch a classifier, you need to load the intent directory into it and perform fitting.

System name: text-classification

List of services

The text-classification task type is used to determine the category of the statement contained in the text. The main practical application of this type of task is the intent classification phase in classic chatbots.

Data types for inference

Predict request

  • Specification
  • Python type: mlp_sdk.types.Text (the mlp-python-sdk module)
  • Java type: com.mlp.api.datatypes.nlp.Text (the mlp-datatypes module)

Request example:

{
"text": "Turn on the music"
}

Predict config

The text-classification task type does not prescribe the structure of the predict-config. But almost all classifiers have many parameters that can be set in the predict-config. See the documentation for the specific classifier in the catalogue.

Predict response

  • Specification
  • Java type: com.mlp.api.datatypes.nlp.IntentClassificationResult (the mlp-datatypes module)

Response example:

{
"hypothesis": [
{
"value": "/volume_increase",
"score": 0.8
}
]
}

Training

Task type does not prescribe a strict contract for data types for training. See the description of supported dataset types on the service page in the catalogue.

The most common types of datasets:

  • json/caila-intents
  • json/texts-and-labels