Confirmation

Overview

The goal of the conversational user interface is to reach agreement on what the user wants that is also deliverable by business as quickly as possible. So during collaborative conversation, bot might augment use choice based on business logic and data, so we need to keep user informed:

User

Need one way ticket pls

Bot

Let's find a one way ticket for you. Which date do you want to fly?

User

Dec 25th

Bot

Get, leaving on 2022-12-25. What time would you like to leave?

Or based on business logic, bot might ask the user to confirm the choice they made before consequential things really happen, and sometimes both:

Bot

You want a one way ticket for: From JFK To London, Leaving on 2022-12-25, Time 17:00:00. Is that correct?

User

Yes

Features

The features of confirmation are as follows for you:

  • Support two types of confirmation: Explicit and Implicit
  • Support conditional confirmations
  • Support multi-valued slot confirmation via per value confirmed
  • Provide corrections on default strategy and interruption strategy
  • Provide the way to customize the "yes/no" understanding of user utterances in specific contexts

How to use

confirmation

Confirmation is an optional annotation. There are two places that you can define confirmation: slot level and frame level, different places have different meanings:

  • Slot Level: bot will confirm on each slot which is defined.
  • Frame Level: bot will confirm after all slots on the frame have been done, just like bundle slots together for confirmation. User can accept and modify batch confirmations.

Conditions

With condition, bot can confirm with the user when the set of conditions are met. You can use kotlin Expression to express the timing of key pieces of information that should be implied or requested.

User

Get me two tickets for Adele on Jul 1st

Bot

Adele on Jul 1st, the Event Organizer is requiring all attendees to have been fully vaccinated (14 days past final vaccination show) AND to have received a negative COVID-19 test within 48 hours of the event. Please confirm you want to continue?

User

confirm

Bot

Please select your seats

From the example above, you can see that bot will confirm the COVID-19 info and request a yes or no answer when the artist is Adele, while others will not:

User

Get me two tickets for Coldplay on Aug 16th

Bot

Coldplay on Aug 16th, please select your seats

In this case, there are multiple conditions that need to be set here:

multiple conditions

  • One should like artist.identifier() == "adele" :

condition

  • Another can be simple, like artist != null:

condition

Bot will check the conditions according to the top-to-bottom order, and confirm when the condition is met:

  • If the first condition is true, bot will respond the confirmation to the user.
  • if the first condition is false, bot will move on to the next condition, and so on.

Know more about kotlin Expression.

Explicit

explicit

Explicit confirmation typically involves checking with the user that their input or request was understood correctly, it is very wise to confirm the critical details. Bot will not perform the action until it gets the reply from the user to confirm, usually yes/no or some synonym.

You can double-check with the user prior to performing an action that would be difficult to undo, for example, cancel an order:

User

Can I cancel an order?

Bot

Sure. Could you provide me with the order number?

User

123456

Bot

I found the order: [order details]
Should I go ahead and Cancel the order?

User

Yes.

Bot

I have cancelled the order for you.

But there are many ways to say yes or no by the user. To handle the synonym expressions of "yes/no", Affirmatives and Negatives provide the way for you to customize the "yes/no" understanding in specific contexts.

implicit

For example, In some scenarios, "Sorry I need to change" represents a new intention, but in certain scenarios, this means the user says no to the confirm. So you can add all of these cases in Affirmatives and Negatives.

Note

The common understanding of confirmation yes and no is already supported in system intent io.framely.core.confirmation.Yes and io.framely.core.confirmation.No, so no need to define it here. But if needed, you can also customize system intent behavior by adding expressions.

Implicit

implicit

Unlike explicit confirmation, implicit confirmation does not require a reply from the user. It just simply confirms the input has been received like an FYI notification, and an operation will take place without asking for user approval, although users might give one if they want to make a correction.

User

I need to change the shipping address.

Bot

Can I get your street address?

User

[address]

Bot

Get. I will set your street address to be [address] .
You will receive an email confirmation of this change in a few minutes. What else can I help you with?

Last Updated: