How to call an intent on Default Conversation

Hi,

Is it possible to call a specific intent as a response to a default answer?
What I mean is the following:

If the user input is “thanks” I want to display the message “You’re welcome” and then trigger a specific intent.

Thank you

Hi @erges.kokoshi,
Please check if the below configuration could help:
Add “Thanks” as the ML utterances for the dialog which you’d expect to be invoked when user input is “Thanks”.
Now configure the first msg in the dialog to show the response “You’re welcome”.

Please refer to the below screenshots for more details:


image

Hi @Subrahmanyam,

Thank you for your response. We already have a dialog task that covers some responses to the user.
We wanted to use the default response when the user replies with “thanks” or “thank you” and also at that point trigger the dialog taks using javascript. Is there a way to do this? Can an intent be triggered using the context object?

Thank you

I also have another question.

I tried to add a new response for “user says thanks” default response and enabling it for the channel and task I want like the following:

image

I also added “thank you” and “thanks” as an utterance inside the task I want to get triggered.

When I type “thanks” the desired task is triggered but the “You’re welcome” message is not displayed qs follows:

image

When I start the conversation and type “thank you” before typing “thanks” I get the following:

image

My question is: Where is the BOT getting the response for “thank you” from because if I type in “thanks” and after that “thank you” then I get the desired response as follows:

Desired behavior:

Current behavior (the first time “thank you” is typed is different from the second time) :

Hi @erges.kokoshi,

We are able to replicate the scenario, we will update you asap.

Regards,
Yoga Ramya.

Hi @erges.kokoshi,

We have discussed this with our team.
This is an issue from our end and would be addressed in the further release.

As of now, we request you to add “~emothanks” in the intent pattern and test the scenario.

We have implemented the same at our end and it’s working as expected.

Let us know if you need any further clarification on the above.

Regards,
Yoga Ramya.

Hi @yogaramya.mendu,

Thank you for your help. Adding this pattern to the User Intent has resolved the problem.
Is this the only way I can implement as a solution?
Our first implementation was something as the following:

On the standard responses available under User says thanks
→ add another response enabling it for the desired channel ( for example Web/Mobile Client )


→ on the Advanced Code tab write the following
print(“You’re welcome”);
make a call to the intent I want to trigger after displaying the message.
I tried using “context.” but the only thing I am allowed is to call “context.session”
image
My question is: Is there any way we can directly trigger the intent from this point?

Thank you again

Hi @erges.kokoshi,

We appreciate your analysis.
However, currently there is no provision to call an intent/trigger a dialog task from Advanced mode of the Standard response.

Hence, we have provided you with the above alternative.

Regards,
Yoga Ramya.

I generally recommend against adding explicit training for “thanks” (and “hello”) because that then elevates what could be small talk to a primary intent and that will have all kinds of ambiguity issues.

Consider the utterances:

  1. thanks for that but what I really meant is …
  2. hi there, I want to …

In both of these cases the first words are just throwaway that people say to have a soft start to their speech. Ordinarily the Kore platform will ignore them if the rest of the utterance contains a “real” intent because they are just small talk. But if you add training for an explicit intent then the platform cannot make that determination and will think that both intents are equally viable options.

Hi @yogaramya.mendu,

This scenario doesn’t seem working in the case the words “thank you” and “thanks” are part of a full sentence like shown in the following:

image

This is indicating that the BOT is still being able to identify the words “thank you” and “thanks” as a user intent when it is not. The following is how it is configured:

Is there any workaround this?

Thank you

Hi @erges.kokoshi,

We are able to replicate this.
We have checked with our engineering team .
Currently, there is no workaround to overcome this issue.

As mentioned earlier, this will be fixed at the platform level and we will update you with the ETA once we hear from the engineering team.

Regards,
Yoga Ramya.

Hi @erges.kokoshi,

The issue with respect to the “Thank you” Intent has been resolved and it is available on production environment. Kindly check the scenario and let us know.

Regards,
Yoga Ramya.

Hi @yogaramya.mendu,

I tried the same scenario and the response is the same as the one previously reported.

image

The BOT is still able to consider the “thank you” or “thanks” even the intent is not detected and is replying with the standard response.

Thank you.

Hi @erges.kokoshi,

We have analyzed the scenario.

Please find our analysis below:

Case 1- We have a “Thank you” task that has to be triggered whenever the user says thank you.

For this requirement, we have requested you to add a pattern “~emothanks” for the intent pattern in Training so that it would recognize this task for the small talk “Thank you” or “Thanks”.

This is working even at your end.

Case 2- When the user says “thanks but I would need more information” or “how can I send a thank you note”

Even in this case, if “~emothanks” is added as a pattern, the bot is responding with the thank you task message or if “~emothanks” is not added, the bot is replying with the thank you standard response message.

As mentioned by @andy.heydon,

If you have an intent which matches to “how can I send a thank you note”, then the bot would pick up that intent against the “Thank you” response.
From a user utterance, small talk is recognized only when there is no real intent matching with the utterance.

Please find the screenshot below, where we have a “note” task that matches with the “how can I send a thank you note” utterance:

We request you add patterns/ ML utterances for respective tasks to train the bot for handling small talk.

Regards,
Yoga Ramya.

Hi @yogaramya.mendu,

Thank you so much for your analysis but the “issue” seems to be still there.

Correct me if I am wrong but shouldn’t the BOT ( based on the, i guess, fundamental meaning model ) be able to distinguish when to reply with “You’re welcome”?

In both cases indicated I would assume that the BOT should ignore “thank you” and “thanks” because they have no actual meaning inside the sentence.

Even if I add a “note” intent and then configure it with patterns/ML I am still going to get the same result if for some reason the BOT is not able to identify the intent.

Thank you,

Hi @erges.kokoshi,

We had a discussion with our engineering team.

We will check the feasibility to address this issue on the platform and will keep you posted.

Regards,
Yoga Ramya.