copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2019-08-06 |
assistant, omnichannel, virtual agent, virtual assistant, chatbot, conversation, watson assistant, watson conversation |
assistant |
{:shortdesc: .shortdesc} {:new_window: target="_blank"} {:deprecated: .deprecated} {:important: .important} {:note: .note} {:deprecated: .deprecated} {:important: .important} {:note: .note} {:tip: .tip} {:pre: .pre} {:codeblock: .codeblock} {:screen: .screen} {:javascript: .ph data-hd-programlang='javascript'} {:java: .ph data-hd-programlang='java'} {:python: .ph data-hd-programlang='python'} {:swift: .ph data-hd-programlang='swift'} {:hide-dashboard: .hide-dashboard} {:download: .download} {:gif: data-image-type='gif'}
{: #getting-started}
In this short tutorial, we introduce {{site.data.keyword.conversationfull}} and walk you through the process of creating your first assistant. {: shortdesc}
{: #getting-started-prerequisites} {: hide-dashboard}
You need a service instance to start. {: hide-dashboard}
-
{: hide-dashboard} Go to the {{site.data.keyword.conversationshort}} page in the {{site.data.keyword.cloud}} catalog.
The service instance will be created in the default resource group if you do not choose a different one, and it cannot be changed later. This group is sufficient for the purposes of trying out the product.
If you're creating an instance for more robust use, then learn more about resource groups {: new_window}.
-
{: hide-dashboard} Sign up for a free {{site.data.keyword.cloud_notm}} account or log in.
-
{: hide-dashboard} Click Create.
{: #getting-started-launch-tool}
After you create a {{site.data.keyword.conversationshort}} service instance, you land on the Manage page of the {{site.data.keyword.conversationshort}} dashboard. {: hide-dashboard}
- Click Launch {{site.data.keyword.conversationshort}}. If you're prompted to log in, provide your {{site.data.keyword.cloud_notm}} credentials.
{{site.data.keyword.Bluemix_dedicated_notm}}: Select your service instance from the Dashboard to launch the product.
If you are a brand new user, an assistant named My first assistant is created for you automatically. Skip the next step.
If available in your location, a tour begins that you can step through to learn about the product. Follow the tour; it overlaps with these tutorial steps, so you can resume this tutorial after the tour ends. {: tip}
An assistant is a cognitive bot to which you add a skill that enables it to interact with your customers in useful ways.
If an assistant is not created automatically, your first step is to create an assistant.
{: #getting-started-create-assistant}
{: #getting-started-add-skill}
A dialog skill is a container for the artifacts that define the flow of a conversation that your assistant can have with your customers.
-
If the assistant was created for you, click the My first assistant tile to open the assistant.
-
Click Add dialog skill.
-
Give your skill the name
Conversational skill tutorial
. -
Optional. If the dialog you plan to build will use a language other than English, then choose the appropriate language from the list.
-
Click Create dialog skill.
-
Click to open the skill you just created.
You land on the Intents page.
{: #getting-started-add-catalog}
Add training data that was built by IBM to your skill by adding intents from a content catalog. In particular, you will give your assistant access to the General content catalog so your dialog can greet users, and end conversations with them.
-
Click the Content Catalog tab.
-
Find General in the list, and then click Add to skill.
-
Open the Intents tab to review the intents and associated example utterances that were added to your training data. You can recognize them because each intent name begins with the prefix
#General_
. You will add the#General_Greetings
and#General_Ending
intents to your dialog in the next step.
You successfully started to build your training data by adding prebuilt content from {{site.data.keyword.IBM_notm}}.
{: #getting-started-build-dialog}
A dialog defines the flow of your conversation in the form of a logic tree. It matches intents (what users say) to responses (what the bot says back). Each node of the tree has a condition that triggers it, based on user input.
We'll create a simple dialog that handles greeting and ending intents, each with a single node.
-
Click the Dialog tab.
-
Click Create dialog. You see two nodes:
- Welcome: Contains a greeting that is displayed to your users when they first engage with the assistant.
- Anything else: Contains phrases that are used to reply to users when their input is not recognized.
-
Click the Welcome node to open it in the edit view.
-
Replace the default response with the text,
Welcome to the Watson Assistant tutorial!
.
You created a dialog node that is triggered by the welcome
condition. (welcome
is a special condition that functions like an intent, but does not begin with a #
.) It is triggered when a new conversation starts. Your node specifies that when a new conversation starts, the system should respond with the welcome message that you add to the response section of this first node.
You can test your dialog at any time to verify the dialog. Let's test it now.
Now let's add nodes between the Welcome
node and the Anything else
node that handle our intents.
- Click the More icon on the Welcome node, and then select Add node below.
- In the If assistant recognizes field of this node, start to type
#General_Greetings
. Then, select the#General_Greetings
option. - Add the response text,
Good day to you!
- Click to close the edit view.
- Click the More icon on this node, and then select Add node below to create a peer node. In the peer node, specify
#General_Ending
in the If assistant recognizes field, andOK. See you later.
as the response text.
You built a simple dialog to recognize and respond to both greeting and ending inputs. Let's see how well it works.
- Click the icon to open the "Try it out" pane. There's that reassuring welcome message.
- At the bottom of the pane, type
Hello
and press Enter. The output indicates that the#General_Greetings
intent was recognized, and the appropriate response (Good day to you.
) is displayed. - Try the following input:
bye
howdy
see ya
good morning
sayonara
{{site.data.keyword.watson}} can recognize your intents even when your input doesn't exactly match the examples that you included. The dialog uses intents to identify the purpose of the user's input regardless of the precise wording used, and then responds in the way you specify.
That's it. You created a simple conversation with two intents and a dialog to recognize them.
{: #getting-started-integrate-assistant}
Now that you have an assistant that can participate in a simple conversational exchange, test it.
-
Click the Assistants tab, find the My first assistant assistant, and open it.
-
Do one of the following things to test your assistant with a preview link integration.
The preview link integration builds your assistant into a chat widget that is hosted by an IBM-branded web page. You can open the web page and chat with your assistant to test it out.
-
If the assistant was created for you, you must add a preview link integration. From the Integrations area, click Add integration, and then click Preview Link. Click Create.
-
If you created the assistant yourself, then click the preview link integration tile to open it.
When you create an assistant yourself, a preview link integration is created for you automatically.
-
-
Click the URL that is displayed on the page.
The test web page opens in a new tab.
-
Type
hello
into the text field, and watch your assistant respond.You can share the URL with others who might want to try out your assistant.
-
After testing, close the web page. Click the X to close the preview link integration page.
{: #getting-started-next-steps}
This tutorial is built around a simple example. For a real application, you need to define some more interesting intents, some entities, and a more complex dialog that uses them both. When you have a polished version of the assistant, you can integrate it with channels that your customers use, such as Slack. As traffic increases between the assistant and your customers, you can use the tools that are provided in the Analytics tab to analyze real conversations, and identify areas for improvement.
- Complete follow-on tutorials that build more advanced dialogs:
- Add standard nodes with the Building a complex dialog tutorial.
- Learn about slots with the Adding a node with slots tutorial.
- Check out more sample apps to get ideas.