copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2019-08-06 |
import workspace, import JSON, export JSON |
assistant |
{:shortdesc: .shortdesc} {:new_window: target="_blank"} {: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'}
{: #skill-dialog-add}
The natural-language processing for the {{site.data.keyword.conversationshort}} service is defined in a dialog skill, which is a container for all of the artifacts that define a conversation flow. {: shortdesc}
You can add one dialog skill to an assistant. See Skill limits for information about limits per plan.
{: #skill-dialog-add-task}
You can create a skill from scratch, use a sample skill that is provided by IBM, or import a skill from a JSON file.
To add a skill, complete the following steps:
-
Click the Skills tab, and then click Create skill.
-
Click the Dialog skill tile, and then click Next.
-
Take one of the following actions:
-
To create a skill from scratch, click Create skill.
-
To add a sample skill that is provided with the product as a starting point for your own skill or as an example to explore before you create one yourself, click Use sample skill, and then click the sample you want to use.
The sample skill is added to your list of skills. It is not associated with any assistants. Skip the remaining steps in this procedure.
-
To add an existing skill to this service instance, you can import it as a JSON file. Click Import skill, and then click Choose JSON File, and select the JSON file you want to import.
Important:
- The imported JSON file must use UTF-8 encoding, without byte order mark (BOM) encoding.
- The maximum size for a skill JSON file is 10MB. If you need to import a larger skill, consider importing the intents and entities separately after you have imported the skill. (You can also import larger skills using the REST API. For more information, see the API Reference {: new_window}.)
- The JSON cannot contain tabs, newlines, or carriage returns.
Specify the data you want to include:
- Select Everything (Intents, Entities, and Dialog) if you want to import a complete copy of the exported skill, including the dialog.
- Select Intents and Entities if you want to use the intents and entities from the exported skill, but you plan to build a new dialog.
Click Import.
If you have trouble importing a skill, see Troubleshooting skill import issues.
-
-
Specify the details for the skill:
- Name: A name no more than 100 characters in length. A name is required.
- Description: An optional description no more than 200 characters in length.
- Language: The language of the user input the skill will be trained to understand. The default value is English.
After you create the dialog skill, it appears as a tile on the Skills page. Now, you can start identifying the user goals that you want the dialog skill to address.
- To add prebuilt intents to your skill, see Using content catalogs.
- To define your own intents, see Defining intents.
The dialog skill cannot interact with customers until it is added to an assistant and the assistant is deployed. See Creating an assistant.
{: #skill-dialog-add-import-errors}
If you receive a message that says the skill contains artifacts that exceed the limits imposed by your service plan, complete the following steps to import the skill successfully:
- Purchase a plan with higher artifact limits.
- Create a service instance in the new plan.
- Import the skill to the new service instance.
- Make edits to the skill such that it meets the artifact limit requirements for the plan you want to use going forward. You might need to decrease the number of dialog nodes used in the dialog tree, for example.
- Export the edited skill by downloading it.
- Try again to import the edited skill into the original service instance on the plan you want.
{: #skill-dialog-add-to-assistant}
You can add one dialog skill to an assistant. You must open the assistant tile and add the skill to the assistant from the assistant configuration page; you cannot choose the assistant that will use the skill from within the skill configuration page. One dialog skill can be used by more than one assistant.
-
From the Assistants tab, click to open the tile for the assistant to which you want to add the skill.
-
Click Add Dialog Skill.
-
Click Add existing skill.
Click the skill that you want to add from the available skills that are displayed.
When you add a dialog skill from here, you get the development version. If you want to add a specific skill version, add it from the skill's Versions tab instead.
{: #skill-dialog-add-download}
You can download a dialog skill in JSON format. You might want to download a skill if you want to use the same dialog skill in a different instance of the {{site.data.keyword.conversationshort}} service, for example. You can download it from one instance and import it to another instance as a new dialog skill.
To download a dialog skill, complete the following steps:
-
Find the dialog skill tile on the Skills page or on the configuration page of an assistant that uses the skill.
-
Specify a name for the JSON file and where to save it, and then click Save.
You can export a skill by using the API also. Include the export=true
parameter with the request. See the API reference for more details.
{: #skill-dialog-add-invite-others}
After you create the service instance, you can give other people access to it. Together, you can define the training data and build the dialog.
Only one person can edit an intent, entity, or a dialog node at a time. If multiple people work on the same item at the same time, then the changes made by the person who saves their changes last are the only changes applied. Changes that are made during the same time frame by someone else and are saved first are not retained. Coordinate the updates that you plan to make with your team members to prevent anyone from losing their work. {: important}
To share a dialog skill with other people, you must give them access to the service instance that hosts the skill. Note that the person you invite will be able to access any skill that is hosted by this service instance.
-
Make a note of the current instance name, which is displayed at the top of the current page.
-
Click the User icon in the page header, and select Manage Users from the drop-down.
-
From the navigation pane, click Users.
If you gave someone access to a service instance previously, then the person might be listed as an invited user already. To change the person's level of access to the instance, click the menu next to their name, choose Assign access, and then click Assign access to resources.
-
Click Invite users.
-
In the Services section, choose the {{site.data.keyword.conversationshort}} service.
-
Select at least one region and at least one service instance to share with this user.
-
Give this user the following assignments at a minimum:
- Platform access roles: Operator
- Service access roles: Writer
For more information about roles, see IAM access .
For older instances that are managed by Cloud Foundry, you must expand the Cloud Foundry access section, choose your organization, and then assign the person to the Developer space role. {: note}
-
Click Invite users.
If you are editing access for an existing user, click Assign access.
When the people you invite next log in to {{site.data.keyword.cloud}}, your account will be included in their list of accounts. If they select your account, they can see your service instance, and open and edit your skills.
With more people contributing to dialog skill development, unintended changes can occur, including skill deletions. Consider creating backup copies of your dialog skill on a regular basis, so you can roll back to an earlier version if necessary. To create a backup, simply download the skill as a JSON file.