Prompts

Prompts are when the bot puts questions to the user in order to populate fields and parameters in slots. This information is required to complete the action asked in the intent. Prompts are really useful when it's not obvious to the user exactly what information needs to be provided. As we've learned already, an utterance may have a number of slots that need to be filled, and a prompt is a way of asking the user for those values.

In our airline example, if you ask Can I book a flight?, the bot doesn't magically know all of your travel intentions—more information is needed. In this example, a prompt back to the user for this intent might be as follows:

  • Where would you like to fly to?
  • Which day would you like to fly on?

Your bot may also include a prompt to confirm that the information the user has provided was actually what they intended to provide. This serves to sum up all the details you have provided during the conversation to make sure you are okay with the action that is about to take place. The following is an example of a confirmation prompt:

  • Okay, so you want to book a flight from Wellington to Auckland on November 4th at 7:30 am?

When you respond with yes, that's when the language model hands over control to the application logic.

The application or business logic is also known as the fulfillment. This is the stage where the action from the intent is carried out. It's often a complex stage, so let's find out more about it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.199.56