Einstein Platform Services

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.

{
  "probabilities": [
    {
      "label": "Sales Opportunity",
      "probability": 0.9987062
    },
    {
      "label": "Shipping Info",
      "probability": 0.0008089547
    },
    {
      "label": "Order Change",
      "probability": 0.00046194126
    },
    {
      "label": "Billing",
      "probability": 0.000021637188
    },
    {
      "label": "Password Help",
      "probability": 0.0000012197639
    }
  ],
  "object": "predictresponse"
}

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.

{
  "probabilities": [ ],
  "object": "predictresponse"
}

Updated 4 months ago

How to Handle Out-of-Domain Text


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

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.