Search code examples
botframework

Remembering context and user engagement


How can I make the BOT "remember" a past conversation and "engage" with the user when he talks to the BOT after 'x' days?

I would like to make the chat-bot more "human like" so that it can "recollect" the past conversation that it had with the user & chit-chat with him once or twice. I think there a couple of tools that does this and I have been asked if it is feasible to do this with MSBOT framework.

For example)

Day 1:

User : "I have a dentist appointment.But can you create a ticket on my behalf for xyz issue?"

Bot : "Okay, your ticket is created!"

Day 'x':

User: Hello

Bot: "Hello User! How did your dentist appointment go?"

User: It was great

Bot: Okay. How may I help you today?

I am using Enterprise Bot Template which has the waterfall model that follows a specific workflow. How can I incorporate the above requirement into it?

The nearest that I can think of is to use event based or time based trigger using Azure functions to fetch say tickets that the user created and provide him status updates when he interacts with the BOT as a part of the greeting dialog.

But for the "chitchat" scenario to happen, it would take more than just that.

Kindly advise.


Solution

  • Multi-Intent Utterances with LUIS

    So it sounds like the solution you're asking for with regards to "Day 1" of your question is for LUIS to be able to detect multiple intents within a single utterance.

    • This is something that the LUIS team has been exploring, however we have not moved forward with anything concrete, and there are currently no multi-intent-specific items that have a hard date on our roadmap
    • So it is a functionality that the team is interested in developing, just no date set for any out-of-the-box features currently

    How to resolve this issue currently?

    • As of now, assuming you've built your LUIS model according to best practices, the only solution to work with these potential multi-intent utterances is, on the bot level, to break the user's utterances into chunks, then send multiple calls to the LUIS API.

    • With your business logic, you could specify to filter by a certain threshold, and have the bot only return intents that XYZ threshold you set


    Proactive Messages to Users

    With regards to the reminders feature, you should look into the proactive messages feature in the Bot Framework.

    Snippet from docs:

    Proactive messages can be useful in a variety of scenarios. For example, if the user has previously asked the bot to monitor the price of a product, the bot can alert the user if the price of the product has dropped by 20%. Or, if a bot requires some time to compile a response to the user's question, it may inform the user of the delay and allow the conversation to continue in the meantime. When the bot finishes compiling the response to the question, it will share that information with the user.

    As for the trigger, you perhaps you could choose a trigger similar to this Stack Overflow question post:


    Robust Bot Sample

    Lastly, you mentioned in your post that you are working off the Enterprise Bot. I would also recommend that you take a look at the Virtual Assistant bot, as it is the more up-to-date bot that the Enterprise bot was heading towards, built by the Bot Framework Solutions team. With the VA bot, you can leverage having a virutal assistant, creating skills, and also implementing analytics.

    enter image description here


    Plenty of resources to give you the tools to get started. If you need further assistance, post issues with your code for the community to help you with more specifics.