Create fluid conversations with QnA Maker multi-turn feature

Matt Wade
AtBot
Published in
7 min readJul 3, 2019

--

Until recently, QnA Maker was doing a great job of answering knowledgeable questions for users accessing a chatbot. But there was a glaring difference between a QnA Maker knowledge base (KB) and a real human: the ability to clarify, ask for more information or do anything more than a one-off question-response type of conversation.

But that all changed with the recent introduction of QnA Maker multi-turn conversations. With multi-turn, the experience with your QnA KB is much more fluid and significantly more natural. Let’s see how.

The ability to easily and simply clarify vague requests like this is a game-changer.

Prompt me

Multi-turn relies on follow-up prompts that are sent with an A (answer) when asked a Q (question). These prompts aren’t just helpful; they can pull the user along a set path of your design. That path can be whatever you think is logical or it can go in a direction that, over time, most users have shown to go.

That means the user has to think less about what to do next, gets more information naturally, and has a more positive experience because the bot is guaranteed to do something useful and productive with its prompt because you designed it to be so.¹

The general look and feel of the follow-up prompt pane.

Contoso Restaurant Bot

To visualize what I mean with multi-turn conversations, let’s take an example chatbot meant to be used on a restaurant’s website. The Contoso Restaurant Group has multiple restaurant locations, separate menus for different times of the day, and location-specific operating hours.

Without multi-turn, users would be stuck with having to explicitly ask, “Where is the lunch menu for the Miami location?” or “I need directions to the New York restaurant.” And if you didn’t phrase it correctly — or specifically — you likely wouldn’t get the response that you want.

Without multi-turn, you couldn’t clarify the user’s request. You’d be stuck with a very long response answering the question for all possible permutations.

The Q above clarifies which location you prefer using its follow-up prompts. Adding a prompt is easy: click the + Add follow-up prompt under any A and you’ll be provided a pane to make the connection to an existing A or to create a new one on the spot. I generally recommend creating the pairs ahead of time so you have everything organized as you connect them.

The follow-up prompt for clicking “Denver” actually connects to another Q that also has prompts.

This is what the question above looks like in the KB behind the scenes.

But there are further clarifications along this line of questioning. If the user selects Miami, another prompt will ask whether the user wants to know weekday hours or weekend hours. Because, hey, they’re different!

Then, once the user chooses one of these prompts, they receive a ‘final’ answer.

Have a look at the Qs associated with those pairs, though. Had the user said, “When is the Miami restaurant open on Mondays,” they would have gotten straight to the answer of “11 am to 10 pm each weekday,” thanks to the inclusion of details in the questioning (yellow highlight).

Adding to that, I’ve built it so each direct answer also prompts the user with other common questions (pink highlight) to help pull them along a preferred conversational course.

You can see both examples working correctly in the screenshot below.

You can still get to a direct answer if you provide enough detail in your question. And the prompts can bring you along further.

A web of knowledge

This should make it apparent that the interconnections between Qs can get complex. Done correctly, you will likely end up with a web of As connected by follow-up prompts, with some As being dead ends, where follow-up prompts don’t really make sense. They represent ‘final’ answers.

And it’s worthy complexity. A well-working, cleverly thought-out KB can make the bot experience significantly more positive, meaning fewer emails, phone calls, and other questions that restaurant employees would otherwise have to answer. Instead, they can spend more time with the people in front of them, providing excellent customer service to actual — not just potential — customers.

For this example, I ran with three major questions that people may ask a restaurant. Restaurant locations, menus, and operating hours. Each A points back to another, related Q with a prompt, to entice the user to take more action and assist with more knowledge sharing.

The build-out process

Given four locations, three menus, and three operating hour listings, that actually represents a lot of permutations. When planning this out, I found it helps to write things down on paper first.

Don’t dive directly into your KB because you may realize the setup doesn’t work the way you intend and if it's an existing KB that already has a lot of content, you could be causing more work for yourself if you make a mistake and need to revert with no easy ‘undo’ option.

Lots of written words and arrows were required before I even thought about touching my KB.

Context is critical to a good experience, so QnA Maker has included features to ensure the chain of questions a user follows through your web understands their needs and what they’re asking. In the main toolbar of your KB, you’ll see a new option: View options > Show context.

Enable context view to see the various possible chains of questioning.

This view shows you where each pair lies in the various chains of questioning it resides in. For the operating hours in Miami example above, this is what the KB shows with Show context on.

Each item on the hierarchy on the left side is a separate question daisy-chained together into a contextual conversation. Let’s bring it all together in a chat window and watch how the bot follows the chain based on prompt choices I make.

I added a useful call to action when a user says “thanks” to entice them to reserve a table (and spend money).

Based on the initial question, I’m able to create a Miami-specific experience through the follow-up prompts, which makes for a much better experience than asking the user to clarify which location they mean each time they ask a new question.

Connecting your KB to your bot

And of course we built support for multi-turn QnA Maker KBs right into AtBot Premium. In fact, we made it super simple: you don’t have to do anything in the AtBot Admin Portal to enable multi-turn.

Let me repeat that: you don’t have to do anything to enable multi-turn in your AtBots. That’s not how it works with any other client experience (standard Azure bot framework bots, for example). You’ll have to read through a bunch of technical documentation and deal with gobs of code to get these buttons to display as intended in your non-AtBot bots.

Wrap up

We think multi-turn is a major upgrade to the QnA Maker experience and will make KBs and chatbot experiences everywhere significantly more natural, successful, and robust. But what do you think? How could multi-turn improve your KBs?

Also, if you haven’t already checked it out, you want to learn all the new things that come with QnA Maker’s active learning. Active learning takes user feedback to the next level and makes phrasing suggestions for your QnA pairs, ensuring ongoing continuous improvement within your KB!

I get a lot deeper in the example in this brief intro video on QnA Maker multi-turn, so take a few minutes to watch this and put it to good use with your bots.

There’s also a great a demonstration from the QnA Maker product team during the 2019 Microsoft Build conference below. Make sure to watch that too.

AtBot brings AI within reach

AtBot is the premiere bot-as-a-service solution for the Microsoft cloud. Built completely within Azure, AtBot is your out-of-the-box, easy-to-configure bot for Teams, SharePoint, or the web. Teach AtBot tasks using Power Automate, make him your corporate source of knowledge with QnA Maker, help him understand almost anything your colleagues could ask thanks to LUIS, and manage his features with the AtBot Admin Portal. Get going with AtBot Free or start your free trial of AtBot Premium today.

Notes

¹ To expand on this, one downside to chatbots without prompts is users left to their own devices, asking anything that they’d like; many times, the phrasing or entire concept isn’t trained within QnA Maker, so the user ends up receiving no help, and may decide the entire experience was a failure. These new prompts bring the user on a journey that’s pre-written for them, following a flow the bot author dictates or one that most users have shown to prefer. All while still allowing the user to openly ask any question they’d like.

--

--

Matt Wade
AtBot
Writer for

Microsoft MVP • Office 365 & Microsoft Teams specialist • NY→USVI→DC→NY