How to Handle Out-of-Domain Text

Einstein Intent lets you create a model that handles predictions for unexpected text.

The difference between the intent and multilingual-intent algorithms as opposed to the multilingual-intent-ood algorithm is how a model created with each algorithm handles predictions for text that doesn’t fall into one of the labels in the model.

For example, you have a case routing dataset with five labels.

  • Billing
  • Order Change
  • Password Help
  • Sales Opportunity
  • Shipping Info

You create a model using the intent or multilingual-intent algorithm, and you send the text “what is the weather in los angeles?” for prediction.

Even though the intent of this text doesn’t match any of the intent labels in the model, the prediction response returns a high probability for one of the labels in the dataset. In this case, the model returns a high probability for Sales Opportunity.

It would be great if the model could identify that the text doesn't fall into any of the labels. Now you can create a model that does.

Say that you use the same data to create a model but now you use the multilingual-intent-ood algorithm when you train the dataset and create the model. Then you send the text “what is the weather in los angeles?” for prediction.

The intent of the text doesn’t match any of the existing labels, so the prediction response returns an empty array, and looks like this JSON.