4
votes

Using the awesome resources provided by Microsoft. Following the documentation at https://docs.microsoft.com/en-us/composer/

  1. Create Folder somewhere
  2. Perform https://docs.microsoft.com/en-us/composer/setup-yarn in that folder
  3. Perform https://docs.microsoft.com/en-us/composer/tutorial/tutorial-create-bot
  4. Test in Emulator: Pressed Restart Conversation - New User ID: Works fine, responds with: Hi! I’m a friendly bot that can help with the weather. Try saying WEATHER or FORECAST.
  5. Perform https://docs.microsoft.com/en-us/composer/tutorial/tutorial-add-dialog
  6. Test in Emulator: Presents ”Let’s check the weather” som response på user input “weather”. Works fine.
  7. Then create new Trigger with Dialog event and Dialog started and continue with: https://docs.microsoft.com/en-us/composer/how-to-add-qna-to-bot, enter the following in the settings

enter image description here

  • Please note that in order to use the Settings values, an extra “=”
    has to proceed the id, e.g. “=settings.qna.knowledgebaseid”.
  • Please also not that in order to make this work in Europe, with our
    “,” instead of “.” as decimal marker, the Threshold has to be set to “float(‘0.3’)” in order to be evaluated as a float.

    1. Make sure that the settings are accurate according to your QnA Base. Please note that at this point the LUIS fiels are left mostly empty, except for the values prefilled as described in https://docs.microsoft.com/en-us/composer/how-to-add-qna-to-bot
    2. No LUIS added at this point.
    3. Restart bot
    4. Click Test in Emulator
    5. Press Restart Conversation - New User ID

Now there are three problems:

A. There is no longer any greeting phrase.

B. The first response from QnA maker results in a “The given key ‘stepIndex’ was not present in the dictionary.”. Then after this the QnA maker part works, but issue A and C are still present.

C. The weather regex does only trigger once if it is the first entry only, then at the second attempt or after entering something else, it fails to trigger.

Expected behavior:

  1. When Press Restart Conversation - New User ID, the bot should greet the user.
  2. When the weather regex is the best choice it should trigger
  3. The text “The given key ‘stepIndex’ was not present in the dictionary” should not be presented as the first response, instead the right reply should be presented based on the intent provided.
1

1 Answers

0
votes

I`m a bit late to the game on this but I hit the exact same issue in composer and found the same problem. The suggested approach to use unknown intent in MS Docs does not work well. its really just a tutorial to get you up and running as quickly as possible, with no real thought beyond that - and as you point out, it easily gets stuck in an internal loop that prevents other intents from firing.

Assuming you are using Luis.ai, a "QnA intent recognised" should be added & a "duplicate intent recognised". this will make sure that automatic cross-training is implemented such that QNAmaker will know about Luis Questions and vice versa and they will not only understand their own questions but know to exclude the questions in the other approach. This will make for better training. However, depending on how similar questions are in both, they may both return matches of varying confidence anyway - this is what the "duplicate intent recognised" is for. It catches both before they execute their intents and implements checks for confidence against each and re-raises the event that wins out. Thus ensuring only one of the two is recognised and executed.