Botframework-composer: Consumer bot is processing the request before Skills every time

Created on 14 Aug 2020  路  8Comments  路  Source: microsoft/BotFramework-Composer

Describe the bug

What I have understood from the docs and the Skills bot sample from the Samples repo is when the Skill is called from Consumer bot, it then redirects all the incoming activities to the Skill until Consumer receives endOfConversation activity from Skill.

If this understanding is correct then I think I am having an issue. I have created a Skill using Composer 馃挴and my Consumer bot is another Composer bot.

Now, I have got a General Bank Bot that calls a Skill Balance Bot. As soon as my CheckBalance gets recognized by the Consumer Bot, it calls the Skill Balance Bot. Then Balance Bot asks me a question i.e. my account number and as I provide the account number, it recognizes another intent from the Consumer Bot again (I think this shouldn't be the case) and then it processes my Skill's request.

Version

1.0.2

Browser

  • [ ] Electron distribution
  • [ ] Chrome
  • [ ] Safari
  • [ ] Firefox
  • [x] Edge

OS

  • [ ] macOS
  • [x] Windows
  • [ ] Ubuntu

To Reproduce

Steps to reproduce the behavior:

image

Expected behavior

I should straight away go to Skills.

Bot Services R10-RC Bug customer-replied-to customer-reported skill

Most helpful comment

@cwhitten I've submitted a PR for this in botbuilder-dotnet, could we ask SDK team to triage and include this in R10 patch release?

All 8 comments

Thank you for the report, @arafattehsin

I think I can clear up some confusion here. Skills do not get connected to a user directly. A skill still has to communicate through the consumer as it interacts with the user. It is a skill _dialog_ that handles the automatic routing of messages to the skill, which means the consumer still needs to make sure it continues the dialog on each turn in order for that to work. It also means that the consumer is free to perform any additional processing on those turns that it wants to.

When it comes to preventing your consumer from performing additional processing while your skill dialog is active, I would need some more information from you about why this is happening in the first place. I can't tell from your screenshot which dialogs and triggers are doing what and how they're configured, so it would help if you could share a minimal example of how to reproduce your issue.

Have you read this document? https://docs.microsoft.com/en-us/composer/how-to-connect-to-a-skill

Hi @v-kydela Thank you for such a detailed message. I totally get your point on your first paragraph and I 100% agree to that.

I also read the whole document (and think it needs some improvement which I will be submitting as a PR around connecting with Skill), I'm still facing the similar problem as you mentioned in your second paragraph.

Now to help you understand that; let me explain you in detail and I hope then you'd be able to reproduce your issue. Both of my bots (Skill and Consumer bots) are built using Bot Framework Composer 1.0.2 _(Skill with Electron, Consumer with hosted)_

Skill Bot

Skill bot only has one intent as a trigger which is unknown intent (as shown below)

image

The manifest of this skill is this;

{
  "$schema": "https://schemas.botframework.com/schemas/skills/skill-manifest-2.1.preview-1.json",
  "$id": "HelpDesk",
  "name": "HelpDesk",
  "version": "1.0",
  "publisherName": "Arafat Tehsin",
  "description": "HelpDesk bot to help you with anything except for food!",
  "privacyUrl": "https://www.arafattehsin.com/blog",
  "copyright": "https://www.arafattehsin.com/blog",
  "iconUrl": "https://www.arafattehsin.com/wp-content/uploads/2018/09/logo.png",
  "tags": [
    "helpdesk",
    "assistant"
  ],
  "endpoints": [
    {
      "name": "default",
      "protocol": "BotFrameworkV3",
      "description": "Default endpoint for the skill",
      "endpointUrl": "<url>/api/messages",
      "msAppId": "<appId>"
    }
  ]
}

Consumer Bot

In addition to the out of the box Greeting conversation update activity, it is using LUIS with two intent triggers;

  1. Check Balance
  2. Transfer Funds

image

image

When the Check Balance intent is triggered; it calls the Skill bot.

image

As you can see in first screenshot about the Skill bot, it asks a question about account number. So it does.

However, upon providing my answer _(which is account number in this case)_ it again triggers the Transfer Funds dialog (which I believe should not be called) instead of directly going to the Skill dialog.

_Once the action which is defined under Transfer Funds is completed, then Skill action gets completed. Below screenshot is for the reference;_ As I expect or think, this should not happen as Skill dialog is expecting an input and Consumer should directly send this to Skill dialog and the response should be display to the user.

image

I believe I have tried well to explain you in detail. Please let me know if there's something I am doing really wrong or I have not understood it properly.

Thanks

@arafattehsin - I have reproduced the issue. It looks like @scheyal is right that Composer doesn't handle multi-turn skills well. Perhaps skill dialogs should have an "allow interruptions" property like inputs do. I'll unassign myself so the team can treat this as a bug.

@luhan2017 & @hibrenda can you connect with the STCA Skills team on this? I'd imagine this would be breaking a few of their scenarios. We should take this in R10 if the R10 packages don't fix this.

@arafattehsin , I totally understand your pain. The current behavior is by-design for the Adaptive Dialog.

Why it is called Adaptive, it means, for every turn in the dialog, you have a chance to consult to the recognizer, is there any other dialog want to take this input, if yes, please go ahead, and if no, the current dialog will consume this.
Let me give you an example:
If you have a dialog with two skills, one is email and the other is calendar, and here is your conversation:

User: please help me send an email.
Bot: [BeginEmailSkill] sure, what is your email title.
User: oh, wait, I want to create a meeting request.
Bot: [Here, do you want to switch to the calendar skill or use that sentence as an email title?]

Based on the above sample, I think it makes sense to do the Prebubble before continue the current skill dialog.
But yes, there are some scenarios like you described above, which is frustrated with the auto prebubble.

As @v-kydela suggest, similar as the inputs, we can add "AllowInterruption" property in the skill dialog. which is a switch to turn on/off to do the prebubble. Could you please confirm whether this can fulfill your requirement? if yes, we can submit a PR on the sdk side, and include it in R10 patch release.

The side effect of setting AllowInterruption=false is, you will stick in the skill until it ends, other intents will not be triggered when you are in the skill.

Hi @luhan2017 - Appreciate your detailed response. I'd LOVE to have AllowInterruption property as it will handle this situation. Not disagreeing with the example you gave but there's still a BIG need of continued conversation. It would really be awesome if we can have it as a R10 patch. Thanks a lot.

@cwhitten I've submitted a PR for this in botbuilder-dotnet, could we ask SDK team to triage and include this in R10 patch release?

Was this page helpful?
0 / 5 - 0 ratings