I’m trying to figure out how to keep asking, “Is there anything else I can help you with?” when any dialog task finishes.
The bot is intended solely as a voice assistant through SmartAssist. I’m not sure if this needs to be set up in SmartAssist, Bot Builder, or a combination of the two.
Background
SmartAssist calls a main dialog task I created that helps the user look up a claim.
The caller is prompted for a claim number. If they don’t have it, they’re prompted for a social security number.
The bot calls a web service to look up the claim by whichever info the user provided.
Once the claim has been retrieved, it’s stored in BotUserSession.
The main dialog task ends.
At this point, the caller can ask any number of questions. Who’s the adjuster? What’s the billing status? Was the claim approved?
Right now, each of these questions has its own dialog task because the main task would get unwieldy with that many intent nodes.
Sample from Kore
I saw a sample from Kore that loops with an “Anything else?” question like this. At the bottom of the flow, it has a message node with an if condition on the user’s utterance. If the user says something like, “That’s it, I’m done,” the flow ends. Otherwise, the user’s question is extracted through an utterance associated with the main dialog task intent and stored in an entity. The main task runs again, branching on the entity’s value to determine which info to convey.
The problem is that that method depends on using a single dialog task (which is exactly what the Kore sample does). That’s fine for a small number of intents, but it gets unwieldy with how many questions we’re answering. I also don’t like that someone would have to edit the dialog task every time a new question is added rather than creating a new dialog task. It seems liable to invite editing mistakes, especially considering how complex that dialog task is quickly becoming. Plus it’s harder to grok with all the questions branching in one big dialog task.
Does this make sense? Is there a way to accomplish this with multiple dialog tasks?
In your dialog have an entity that asks the question, “Anything else?”.
That entity is not going to extract anything from the user’s next utterance, it is just a way to pause the flow.
Therefore it should be of a type that will never match anything. Personally I like to use the Custom type and in the regex value type the name of a concept that doesn’t exist.
In the entities instance properties, make it an optional entity so that it will only prompt once and if there is no value it moves on. Under the advanced controls section modify the interruption behavior for this node to allow interruptions and then to switch to new task without any notification to user and discard current task.
This all means the user will be prompted for something. The entity won’t actually match any value, but whatever the user does say goes through primary identification and a new task is started and ending the current dialog. If there is no primary intent match then the default dialog is run instead.
Right now, this only works if the user takes the “happy path” of answering with their intent.
“Yes, could you tell me…” The intent is matched and the new task fires.
“No, that’s it.” The bot should say thanks/goodbye.
“Yes.” The bot should ask the user what it can help with.
I tried replacing the entity node with a confirmation node that allows interruptions. That kind of handled yes/no except that anything but a plain no is treated as small talk:
User: No, that’s it [labeled small talk in the debugger].
Bot: OK.
Bot: Is there anything else I can help you with?
Eric,
I can’t reproduce your scenario yet, so can you supply more details please.
At a confirmation node:
Yes takes the affirmative connection
No, that's it takes the negative connection
Note, responding with smalltalk is only done as a fallback, when all other identification for entity and intent have failed to match anything. So if you receive a smalltalk response then it means the expected definitions/training is incomplete. Which is of course puzzling the case you have described because the internal handling of no at a confirmation is essentially the same as the smalltalk pattern.
Eric, my confirmation has those exact same interruption options.
So I am a little puzzled as to why the different behavior. So can I confirm the version of the Kore platform you are using. Is this an English bot? Is there anything else you might consider odd or unusual with the bot definition?
The implication here is that the NL engine (for the confirmation node) is not recognizing “no”, which is rather odd.
So one thing to do that might shed some light is to enter the following “cheat” command into the talk to bot panel: cheat conceptlist no, that'll do it
Should get some output like this (I’m truncating the full output)
I had forgotten to remove the “anything else?” entity that we originally talked about. I added the dialog task with the confirmation node after it instead of replacing it by mistake.
I thought the small talk was happening inside the “anything else?” dialog task. It turns out it was never getting past the entity.
Time for some fresh air, I think. Maybe a fresh brain.