To understand NLP detection, let us use the example of a Bank bot with the following details:
- The bot consists of 5 Dialog Tasks and a Default Dialog
- The intents have been trained with Synonyms, Patterns and ML utterances
- The bot consists of a knowledge graph defined with 86 FAQs distributed in 4 top-level terms
Scenario 1 – NLP Analysis with FM identifying a Definitive match
- The Fundamental meaning(FM) model identified the utterance as a Definitive match.
- The Machine Learning (ML) model also identified it as a Possible match.
- The score returned for task identified is 6 times more than other intent scores. Also, all the words in the intent name are present in the user utterance. Thus the FM model termed it a Definitive match.
- The ML model matches the Find ATM intent as a Probable match.
- The ML Model returns a Definitive match with other models returning no match
- The FM model could not identify this task as none of the words in the task name Transfer Funds matched the words in the user utterance.
- The user utterance is “How do I make a transfer money to a London account?”
- The user utterance contains all the terms required to match this Knowledge task path Transfer, Money, International.
- The term international is identified as a synonym of London that the user used in the utterance.
- As 100% path term matched the path was qualified. As part of confidence scoring, the terms in the user query are similar to that of the actual Knowledge task question. Thus, it returns a score of 100.
- As the score returned is above 100, the intent is marked as a Definitive match and selected.
- FM engine found it a Probable match as the key term Transfer is present in the user utterance
- ML engine found the utterance as a Probable match as the utterance did not fully match any trained utterance.
Scenario 4 – NLP Analysis with Multiple engines returning probable match and selecting a single match
- All the 3 engines returned possible match and no definitive match
- ML Model has 1 possible matches and FM Model has 2 possible matches, of which 1 is common. Knowledge Graph has 1 possible match. All possible matches identified are re-ranked in the Ranking and Resolver.
- The Ranking and Resolver component returned the highest score for the single match (Task name – “ When can I start making payments using BillPay plus? ”) from Knowledge graph engine. The scores for other probable match come out to be lower than 2 percentile of the top score and are thus ignored. The winner, in this case, is the ‘KG’ returned query and is presented to the user.
- Though most of the keywords in the user utterance map to the keywords in the KG query, still this is not a definitive match because
- The number of path term matched are not 100%
- The KG engine returned the score with 64.72% probability. Had we used the word ‘Billpay’ instead of ‘bill pay’ the score would have been 87.71%. (still not a 100% match)
- Now as the score is between the 60%-80% threshold the Query is presented as part of the ‘Did-you-mean’ dialog and not as a complete winner. If the score was above 80% the platform would have given out the response without re-confirming with the ‘Did-you-mean’ dialog.
Scenario 5 – NLP Analysis with Multiple engines returning probable match and resolver returning back multiple results
- All the engines detected probable matches
- KG returned with 2 possible paths
- Ranking and resolver found the 2 queries with a score less than 2% apart.
- Both the Knowledge tasks are selected and presented to the user as ‘Did-you-mean’
- Both the paths were selected as terms in both matched and the score for both the paths is more than 60%
Scenario 6 – NLP Analysis with No match
- None of the engines could identify any trained intent or Knowledge query
- In this scenario, the default intent will be triggered.