Create Einstein Intent Models That Support Out-of-Domain Text
Einstein Intent lets you create a model that handles predictions
for unexpected, out-of-domain, text. Out-of-domain text is text that doesn’t fall into any of
the labels in the model.
Where: This change applies to Lightning Experience, Salesforce Classic, and all versions of the Salesforce app in Group, Professional, Enterprise, Performance, Unlimited, Developer, and Contact Manager editions.
How: When you train an intent dataset, pass the algorithm parameter with a value of multilingual-intent-ood. To see how the algorithm works, let’s say you have a case
routing model with five labels: Billing, Order Change, Password Help, Sales Opportunity, and
Shipping Info. The following text comes in for prediction: “What is the weather in Los
Angeles?” If the model was created using the standard algorithm, the response looks like this
JSON.
The
text sent for prediction clearly doesn’t fall into any of the labels. The model isn’t designed
to handle predictions that don’t match one of the labels, so the model returns the labels with
the best probability. If you create the model with the multilingual-intent-ood algorithm, and you send the same text for prediction, the
response returns an empty probabilities
array.
{ "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" }
{ "probabilities": [ ], "object": "predictresponse" }
These calls take the algorithm parameter.
- Train a dataset—POST /v2/language/train
- Retrain a dataset—POST /v2/language/retrain