Before you Begin

In this one-hour tutorial you will use three pre-defined skills to create your own personal digital assistant (DA) on the Oracle Digital Assistant platform (ODA). You will also get hands-on experience tuning your digital assistant’s conversational capabilities and interaction style.

Background

The purpose of this lab is to give you hands-on experience adding skills to a DA, configuring routing and smart dialogs, and testing a DA to ensure that it’s performing as expected.

In addition, you will learn strategies for dealing with various types of user inputs, including explicit and implicit invocation of skills, requests for help, and handling non-sequitur utterances.

What Do You Need?

Clone, Train and Publish Skills

Import and Clone Skills

We’ll start by importing the three skills that were provided in the zip file referenced above (Your_Initials_Finance_For_DA_Starter, Your_Initials_Pizza_For_DA_Starter and Your_Initials_Retail_For_DA_Starter).

And since you may not be the only one using your ODA instance, we’ll create a unique clone of each for your use.

Complete the following steps:

  1. Download the file containing each of the skill zip files and unzip it.

    You should see three zip files, one for each skill that you'll be importing.

  2. With the Oracle Digital Assistant UI open in your browser, click main menu icon to open the side menu.
  3. Click Development and select Skills.
  4. Click Import Skill in the upper right and select the zip file for one of the three skills.

    If you receive an error message similar to the one in the image below, it means that someone has already imported the skills and you can skip to the next step.

    Screenshot of an error message that reads 'Imported OK, but note: For the just imported file, bot with the specified name already exists.

  5. Return to the Skills landing page by clicking Skills in the left navigation.
  6. Import the other two skills by repeating the previous two steps.
  7. Within the tile for the Your_Initials_Retail_For_DA_Starter, click Options menu icon and select Clone.
  8. In the Display Name field, enter <YourInitials>_Retail. (For example: AB_Retail.)
  9. Click Clone.
  10. Repeat the cloning process for the YourInitials_Finance_Skill and YourInitials_Pizza_Skill.

Train Your Skills

The next step in the process is to train each of your cloned skills. (Cloned skills are not automatically trained.)

  1. Open one of the three skills and click Train bot icon in the upper right corner.
  2. Select the Trainer Ht model and click Submit.

    Screenshot of the Train dialog, which includes radio buttons for Trainer Ht and Trainer Tm. Trainer Ht is selected.

  3. Repeat this process for the other two cloned skills.

Note: We're using Trainer Ht here, because the training takes less time than it does for Trainer Tm. However, you should use Trainer Tm for production skills and digital assistants.

Publish Your Skills

Finally, before skills can be added to a digital assistant, they must be published. Publishing skills freezes them in their current state. No changes can be made to a version of a skill once it has been published.

  1. Return to the Skills landing page by clicking Skills in the left navigation.
  2. Select one of the skills that you just trained, click Options menu icon in its tile and select Publish.
  3. Screenshot of the options menu for a skill, containing the menu items Edit, Version, Clone, Publish, and others.

  4. In the Publish Skill dialog, click Publish.
  5. Repeat steps 2 and 3 for the other two skills.

Create Your Digital Assistant and Add Skills

Now we'll create a digital assistant and then add our skills to it.

Create a Digital Assistant

  1. In the left navigation, click Development and select Digital Assistants.
  2. Click + New Digital Assistant

    Screenshot of the + New Digital Assistant tile, which includes the '+ New Digital Assistant' button.

  3. In the Create Digital Assistant dialog, for Name and Display Name, enter <YourInitials>_DA_Pizza_Finance_Retail.

    For example: AB_DA_Pizza_Finance_Retail

  4. In the Description field, enter Demo digital assistant for illustrating routing behavior.
  5. Click Create.

Review the Base Digital Assistant Features

You’ve now created a digital assistant. Though it doesn't have any skills added to it yet, the DA does have some capabilities. Let’s see what some of those capabilities are.

  1. Find the tester icon (the Digital Assistant Tester icon) on the top of the page and click it.
  2. In the tester's Utterance field, type hi, press Enter, and note the DA's greeting.

    Screenshot of the Testing dialog. 'Hi' has been entered, and the digital assistant has responded with a message beginning with 'You do not have any skill bots registered yet.'.

  3. In the right pane, select the Routing tab.

    Here you see information about how the digital assistant's response to the user input was determined.

    Screenshot of the Routing tab in the right side of the dialog. It contains sections with the labels 'Routing', 'Rules', and 'Intent Calls for sentence 'hi''.

Add Your Published Skills to Your Digital Assistant

Before your DA can do anything useful (like help with ordering a pizza or checking a bank balance), we must add the individual skills that have been specifically developed to accomplish these tasks (the skills that you cloned, trained and published earlier).

  1. If the tester is still open, close it.
  2. In your DA, click Add Skill (Add Skill icon).

    Screenshot of the digital assistant's skill catalog. The page includes the text 'You don't have any skills added yet' along with an Add Skill button.

  3. Find the tiles for each of the three skills and select the checkbox for each.

    Screenshot the digital assistant's skill catalog. The heading of the page says 'Register or Unregister Skills by Clicking Checkbox'. The page includes tiles of three skills, each of which has its checkbox selected.

  4. Tip: You can use the Filter field to help find your skills.

  5. Close the Skill Catalog. (The Close button is on the upper right side of the page.)
  6. Retrain the DA by clicking Train bot icon and clicking Submit.

    Now that you have added skills to your DA and trained it, it is now smarter. If you try out your DA at this point, you’ll find that it knows which skills it has and can help a new user discover them.

  7. Click the Digital Assistant Tester icon, click Reset, type help in the Utterance field, and press Enter.

    Screenshot of the tester showing a response with a menu for Pizza Skill (with three menu items). On the right side of the menu is a Next icon.

    You can see a carousel that lists each of the available skills.

  8. Click the Next icon to cycle through the different skills.

Explicit Routing, Implicit Routing and Configuring Skills

In general, there are two different ways to begin a conversation with a DA:

  • Explicitly include the name of the skill to which you are referring.
  • Start a conversation with an utterance that implies a certain desire, and let the DA determine which skill is best suited to handle the input.

Explicit invocation tends to be quicker and require fewer conversational "turns", since the user is telling the DA what skill they want to access. On the other hand, explicit invocation also requires some prior knowledge of what the DA can do.

Explicit Routing Example

  1. Make sure that the invocation name is set for your copy of the retail skill.
    1. In the left navigation of the DA, select the Skills icon, select the entry for the retail skill, and scroll down to the Interaction Model section of the page.
    2. In the Invocation field, enter Retail Skill.
  2. Click the Digital Assistant Tester icon, click Reset, type ask retail skill what's my balance in the Utterance field, and press Enter.

    Screenshot showing the tester and its Routing tab. In the conversation is the input 'ask retail skill what's my balance' followed by a response of 'What is your gift card number?' In the Routing tab, the Rules section contains the rule 'Explict invocation takes precedence over other flows in digital assistant context'

  3. In the right side of the tester, select the Routing tab and scroll down to the Rules section.

    Notice in the Rules section that there is a statement about how explicit invocation takes precedence over other potential skill matches (even though those skills had very high confidence scores).

Implicit Routing Example

  • In the tester, click Reset, type what's my balance in the Utterance field, and press Enter.

    Screenshot showing the tester and its Routing tab. In the conversation is the input 'what's my balance' followed by the response 'Do you want to go to:' followed by options for 'GiftCardBalances in RetailSkill', 'Balances in Fin Skill', and 'None of the above'. In the Routing tab, there is a rule for 'Consider flows from all models'.

    Notice how the Rules section in the Routing tab has changed. Because there was no explicit direction for which skill should handle the utterance, the DA considered all possible candidate skills.

    In this case there are multiple skills that might be able to respond (i.e., have high enough confidence levels), so the DA automatically presented another smart dialog for the user to clarify their intentions.

Set Invocation Name and Create Invocation Samples

You may have noticed that the name of the Finance skill is a bit vague. To remedy that and some other things, we need to add some additional configuration options that were not part of the pre-built skill that you imported. We will update the:

  • Invocation, which is the name or phrase which a user can input to explicitly access the skill.
  • Example Utterances, which are the clickable items that show up in the smart dialogs and trigger specific flows within the skills.
  1. Close the Tester.
  2. In the left navigation of your DA, select the Skills icon.
  3. Select the <Your_Initials>_Finance_Skill.
  4. Scroll down to the Interaction Model section.
  5. Change the Invocation value to CashBank.
  6. In the Example Utterances field, edit the phrases to replace Fin Skill with CashBank:
    • ask CashBank to check my balance
    • go to CashBank
    • send money using CashBank

    Tip: You can open the inline editor for a phrase by mousing over it and then clicking the Edit icon.

  7. Click the Digital Assistant Tester icon, click Reset, type Ask cashbank to check my balance in the Utterance field, and press Enter.

    Screenshot of the tester showing input of 'Ask cashbank to check my balance', followed by a response of 'For which account do you want your balance?' and a menu of account types.

    Note how the DA took you directly to the skill that you’ve now named CashBank.

You’ve now created a complete digital assistant that is capable of recognizing explicit calls to skills and disambiguating calls to skills when it’s not sure how to resolve an input.

Tuning Confidence Thresholds and Smart Dialogs

Oftentimes we’ll want conversational behavior for our DA to vary by use case. For example, whether the DA confirms its understanding before proceeding will depend on the task at hand.

The Importance of Context

The context of a conversation makes a significant difference in conversational routing. The first utterance with a digital assistant is treated as being in the context of the DA (as opposed to being in the context of a specific skill for later utterances).

  1. First, make sure that the invocation name is set for your copy of the pizza skill.
    1. In the left navigation of the DA, select the Skills icon, select the entry for the pizza skill, and scroll down to the Interaction Model section of the page.
    2. In the Invocation field, enter Pizza Skill.
  2. In the tester, click Reset, type can you cancel my pizza order in the Utterance field, and press Enter.

    Your results should look like the image below:

    Screenshot of the tester showing input of 'can you cancel my pizza order', followed by a response of 'Do you want to go to' and menu items for CancelPizza in Pizza Skill, CancelOrder in Retail Skill, and None of the above.

    Note how the DA asks which skill to cancel.

Now let’s take a look at how the DA treats the exact same utterance when it is in the context of the pizza skill.

  1. Click the Digital Assistant Tester icon, click Reset, type go to Pizza skill in the Utterance field, and press Enter.
  2. Now type in the phrase can you cancel my pizza order.

    Your results should look like this:

    Screenshot of the tester showing input of 'go to pizza skill', followed by a response of 'Welcome to Pizza Skill', followed by a menu, followed by input of 'can you cancel my pizza order', followed by a response of 'Your order is cancelled' In the Routing tab, there is a rule for 'Pinning to context. Will only look for match in current context.' In the Intent Calls section, there Candidate Skills matches for Pizza Skill and Retail Skill.

    This time the CancelPizza candidate flow (intent) was invoked by the routing engine, even though the Retail Skill was also above the confidence threshold value (as shown in the Candidate Skills section on the Routing tab). This is because extra weight is given to results within the current skill as indicated by the rule that is cited in the Rules section of the Routing tab:

    Pinning to context. Will only look for match in current context.

Set Confidence Thresholds to Change Routing Behavior

    Now let’s change the threshold setting for candidate skills to see what effect this has on the conversation.

    1. Close the tester.
    2. Click the Settings icon and select the Configurations tab.

      Screenshot of the Settings page for a digital assistant. The Configurations tab is selected.

    3. Within the Routing Parameters section of the page, locate the Candidate Skills Confidence Threshold property and change its value to 0.9.
    4. Click the Digital Assistant Tester icon, click Reset, type Can you cancel my pizza order in the Utterance field, and press Enter.

      This time you should see very different results:

      Screenshot of the tester showing input of 'can you cancel my pizza order', followed by a response of 'Your order is canceled'. In the Routing Tab, Pizza Skill is the only Candidate Skill that matches with a score over 90%.

      Notice now how the DA went immediately to the order cancellation in the pizza skill. This is because Pizza Skill is the only skill among the skills evaluated in the Candidate Skills section of the Routing tab that had a confidence score exceeding 90%.

    5. Important: Change the Candidate Skills Confidence Threshold to 0.7.

      Now that you can see the impact that this setting has, it's best to return its value to a more realistic level.

Implementing and Configuring Help

A key element of good conversational design relates to the discoverability of your DA’s capabilities. Allowing a user to quickly and easily determine what the DA can do is critical for a good user experience. This includes being able to ask about the DA's capabilities using natural language (e.g. "what can you do for me?").

DA-Level Help vs Skill-Level Help

As previously noted, the conversational context of a help request matters. For example, the DA will provide different responses depending on whether you are in the context of a particular skill or in the context of the DA.

Let’s examine the difference between asking for help when engaged with the DA vs. when within a skill.

  1. Click the Digital Assistant Tester icon, click Reset, type help in the Utterance field, and press Enter.

    Screenshot of the tester showing input of 'help' followed by a response of 'Welcome! Here are some of the things you can do', followed by a menu for CashBank. On the right side of the menu is a Next icon.

    Because this is the first utterance of the conversation, you’re interacting with the digital assistant. The DA is showing you help for all of its skills.

  2. Now enter I want to send money.
  3. Now enter help.

    Your results should look like this:

    Screenshot of the tester showing input of 'I want to send money', followed by a response of 'From which account do you want to send money?', followed by input of 'help' followed by a response of 'You are at CashBank. Here are some of the things you can do', followed by a menu for CashBank. In the Routing tab, there is a rule for 'Current skill bot help, as we are in the context of a skill and only the skill's help intent matched.'

    This time the same input ("help") led to a different outcome (skill-specific help). This is because we are now engaged with the CashBank skill.

Non Sequiturs and Conversational Confirmation

In a conversation with a DA, a non sequitur is input that doesn’t make sense within the current flow.

Oracle Digital Assistant has built-in features to simplify the handling of non sequiturs.

Conversational Memory and Non Sequiturs

  1. Click the Digital Assistant Tester icon, click Reset, type I want to order pizza in the Utterance field, and press Enter.
  2. Now enter how much money do I have in checking?

    Screenshot of the tester showing end of the pizza offering, followed by input of 'how much money do I have in checking', followed by a response of 'Do you want to switch to Balances in CashBank now?'.

    You can see that the DA asked to confirm that you want to switch from the pizza ordering process.

  3. Select Yes to confirm that you want to see your balance.

    The DA automatically switches to the CashBank skill and answers the balance inquiry.

    The DA also remembers that you were in the process of ordering a pizza! So, after displaying your balance, it asks you if you want to go back to OrderPizza.

    Screenshot of the tester showing the response 'Do you want to switch to Balances in Fin Skill now?', followed by input of 'Yes', followed by 'The balance in your checking account(903423-123) is $2334.56', 'Do you want to resume OrderPizza in Pizza Skill now', and menu items for 'Yes' and 'No'.

  4. Close the tester.

Configuring Confirmation Prompts

The default behavior of Oracle Digital Assistant is to ask for explicit confirmation before exiting a flow.

However, the conversational designer may prefer to allow a user to switch flows without confirmation.

  1. Click the Settings icon and select the Configurations tab.
  2. Within the Conversation Parameters section of the page, scroll down to the Interrupt Prompt Confidence Threshold property and set its value to 0.80.
  3. Click the Digital Assistant Tester icon, click Reset, type I want to order a pizza in the Utterance field, and press Enter.
  4. Now enter how much money do I have in checking.

    Your interaction should look like this:

    Screenshot of the tester showing the bottom part of an offering for pizza, followed by input of 'how much money do I have in checking', followed by a response of 'Switching to Balances in CashBank now', 'The balance in your checking account(903423-123) is $2334.56', and 'Do you want to resume OrderPizza in Pizza Skill now' followed by menu items for 'Yes' and 'No'.

    Note that this time, the DA did not ask you to confirm if you wanted to switch to the CashBank skill. It just did it.

You have now seen some examples of the ODA platform’s capabilities such as non sequitur interactions and conversational configuration. This should start to give you a sense of options available for conversational designers to tune DA interactions.

Exit Strategies

By now you’re familiar with ODA’s use of smart dialogs and the customization options behind them. Similar to non sequitur handling, ODA offers various configuration options for exiting flows and exiting the DA itself.

Exit Confirmation

  1. In the tester, click Reset, type ask CashBank to check my balance in the Utterance field, and press Enter.

    You will be presented with a card that contains account options.

  2. Now enter exit.

    Note how your DA understands that you want to exit, and it asks you to confirm.

    Screenshot of the tester showing input of 'ask Cashbank to check my balance', followed by a response of 'For which account do you want your balance?' and a menu of account types, followed by input of 'exit', followed by a response of 'Do you want to exit Balances in CashBank Now' and menu items for 'Yes', 'No, try again', and 'No, continue based on my previous response'.

Let’s configure the DA to not request confirmation of an exit request if it’s confident that the user really wants to exit.

  1. Close the tester.
  2. Click the Settings icon and select the Configurations tab.
  3. Scroll down until you find the Exit Prompt Confidence Threshold property.
  4. Change the property's value to 0.8.
  5. Click the Digital Assistant Tester icon, click Reset, type ask CashBank to check my balance in the Utterance field, and press Enter.
  6. Enter exit.

    Screenshot of the tester showing input of 'ask Cashbank to check my balance', followed by a response of 'For which account do you want your balance?' and a menu of account types, followed by input of 'exit', followed by a response of 'Exited Balances in CashBank'.

    Notice that there isn't a prompt to confirm that you want to exit. It simply exits and provides a message that it has done so.

Learn More