Training Custom Classifier
Alfred provides its user with the ability to train custom classification models. These models are useful in scenarios where classification accuracy is critical to the success of the pipeline and there are not enough examples to ensure accuracy with the internal classifier.
Prerequisites
Accessing the Training Screen
From any screen within Alfred, click on the username located on the top right corner to display the user drop down menu.

In the dropdown menu, click on the Training button, this will open the Training Screen.

Training a Classification Model
Once the Training Screen has loaded, click on the New Training + button, this will open the training popup screen.


Uploading the Training Data
In order to train a model, the user most upload two distinct JSONL files that contain the examples that the model will train on and validate results. These JSONL files must follow this specific formatting and can be uploaded or dragged into the window.
{"Text": "This is the text for label 0.", "Label": "0"}
{"Text": "This is the text for label 1.", "Label": "1"}
{"Text": "This is the text for label 2.", "Label": "2"}
{"Text": "This is the text for label 2.", "Label": "2"}Text
Contains the text of the file that is going to be classified.
STRING
Label
Contains a numerical label that indicates which category the text belongs to.
STRING
Mapping the Keys and Labels
Once the JSONL files are uploaded, the user must map the Labels to a corresponding Tag. In order to do this, the user must first click on the Add Mapping + button. This will reveal a set of fields that the user must complete.
The field on the left indicates the Label from the JSONL that is being mapped. The field on the right indicates its corresponding Tag within Alfred. Once both fields are set, the user may add additional mappings by clicking the Add Mapping + or start the training by clicking the Create button.

Accesing the Classifier Model
Once the training is complete, the user can configure Alfred to use the model by navigating to the Machine Learning section of the Company's Cloud Setting screen and selecting the desired model.
Last updated
