vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Adding and using multiple environments 

Enterprise

Each assistant has a draft and live environment. For Enterprise plans, you can add up to three environments as a staging area to test your assistant before deployment. You can build content in the draft environment and test versions of your content in the extra environments.

For more information about environments, see [Environments](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-publish-overviewenvironments).



 Adding environments 

Each new environment appears as an extra tab on your Environments page. You can't reorder these environments, so add them to match your test-to-deploy lifecycle.

To add an environment:



1. Open the Environments page and click Add Environment.

Zoom

![Add environment](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/multiple-env-add-button.png)

Add environment
2. Enter a name and a description, then click Save. Names can't contain spaces or use any special characters.

Zoom

![Add an environment](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/multiple-env-add-modal.png)

Add an environment



The new environment appears as an extra tab on your Environments page.

Zoom

![Environment tab](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/multiple-env-tab.png)

Environment tab





 Using your environments 

You can use extra environments in your development and test process before you deploy an assistant for customer use.
[Skills menu icon](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/nav-skills-icon.png) Skills





If you do not see the skill or assistant you are looking for, you can look for it in a different service instance.



 Switching the service instance 

To switch to a different Watson Assistant service instance, complete the following steps:



1. From the header of any page in the current instance, click the User icon ![user icon](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/user-icon.png).
2. Choose Switch instance from the menu.
3. A list of the available service instances is displayed. Click a different service instance to open it.







 Getting API information 

Get information, such as the assistant ID and skill ID and credentials that you need before you can use the API.



* For an assistant, click the overflow menu, and then choose Settings. Click API Details.
* For a skill, click the overflow menu, and then choose View API Details.

You can find the ID of the workspace that is associated with a dialog skill on the Skill API Details page also. It is included in the Legacy v1 workspace URL, after the /workspaces/ segment.



If you cannot view the API details or service credentials, it is likely that you do not have Manager access to the service instance in which the resource was created. Only people with Manager service access to the instance can use the service credentials.

If you have a Writer or Reader service access role to the instance and want to use the API, you can create a personal API key. Go to the [IBM Cloud API keys](https://cloud.ibm.com/iam/apikeys) page to create an IBM Cloud API key to use to authenticate your API requests.
Free text As entered by the user Please check that the apples aren't bruised 



When building an assistant response that includes variables, you concatenate multiple parts (text strings and variables). A single response can consist of no more than 30 concatenated parts (for example, 15 variables along with 15 text strings).



 Referencing expressions 

If you need to reference a dynamic value that is calculated using an expression, you must first assign this value to a session variable. (For more information about how to do this, see [Storing a value in a session variable](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-manage-infostore-session-variable).) You can then reference the session variable in the Assistant says field.

Note that the <?...?> syntax for referencing expressions in assistant output is not supported in actions.
Follow the same steps you use to [deploy a skill version](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-versionsversions-deploy) to change the version that is linked to an assistant.





 Accessing a saved version 

The only way to view a saved version is to overwrite the in-progress development version of the skill with the saved version. (But not before you have saved any work you have done in the current development version.)

You cannot edit a saved version. To achieve the same goal, you can use a saved version as the basis for a new version in which you incorporate any changes you want to make. To start development work from a saved version, overwrite the in-progress development version of the skill with the saved version.



1. Save any changes you made to the skill since the last time you created a version.

Save a version of the skill now. Otherwise, your work will be lost when you follow these steps.
2. From the version you want to edit, click the Skill actions![Skill actions](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/kebab-react.png) icon, and then choose Copy to development and confirm the action.

The page refreshes to revert to the state that the skill was in when the version was created.



If you want to save any changes that you make to this version, you must save the skill as a new version. You cannot apply changes to an already-saved version.

When you open a skill by clicking the skill tile from the assistant page, the development version of the skill is displayed. Even if you associated a later version with the assistant, when you access the skill, its development version opens.





 Downloading a skill version 

You can download a dialog skill version in JSON format. You might want to download a skill version if you want to use a specific version of a dialog skill in a different instance of the Watson Assistant service, for example.
For more information about roles, see [Understanding roles](https://cloud.ibm.com/docs/assistant?topic=assistant-access-controlaccess-control-iam-roles).
10. Click Add.

You can repeat the previous step to invite other users and apply different roles to them.
11. Click Invite to finish the process.

If you are editing access for an existing user, click Assign access.



When the people you invite next log in to IBM 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](https://cloud.ibm.com/docs/assistant?topic=assistant-skill-dialog-addskill-dialog-add-download).
* Create two EP11 smart cards and two backup EP11 smart cards to store two master key parts, or create three EP11 smart cards and three backup EP11 smart cards to store three master key parts. Generate EP11 master key parts separately on two or three smart cards, depending on the number of key parts when you load your master key. Copy each key part value to a backup EP11 smart card.



For calculating the number of smart cards needed, you can refer to the following formulas:



Table 1. Formulas for calculating smart cards number

 Assumptions Formula 

 <br><br> * The number of backups per smart card: x<br> * The number of administrators (1 to 8): y<br> * The number of master key parts (2 or 3): z<br> * Store administrator signature keys separately from master key parts<br><br><br> 1 (CA card) + x (CA card backups) + y (administrator signature key EP11 cards)+ y * x (administrator signature key EP11 card backups) + z (master key part EP11 cards)+ z * x (master key part EP11 card backups) = (1+x) * (1+y+z) 
 <br><br> * The number of backups per smart card: x<br> * The number of administrators (1 to 8): y<br> * The number of master key parts (2 or 3): z<br> * Store an administrator signature key and a master key part on the same EP11 smart card<br> * The number of master key parts equals to the number of administrators (y = z)<br><br><br> 1 (CA card) + x (CA card backups) + z (administrator signature key and master key part EP11 cards)+ z * x (administrator signature key and master key part EP11 card backups) = (1+x) * (1+z) 



A backup certificate authority smart card can be created by using the Smart Card Utility Program. Select CA Smart Card > Backup CA smart card from the menu, and follow the prompts.

The contents of an EP11 smart card can be copied to another EP11 smart card that was created in the same smart card zone by using the Trusted Key Entry application.
For information about using a prompt with a speech synthesis request, see [Using a custom prompt for speech synthesis](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-tbe-use).



You can add custom models, custom prompts, and speaker models as often as you need. You can add a maximum of 1000 custom prompts to a single custom model.



 Create a custom model 

You add a custom prompt to a custom model. You can create a new custom model for your prompt, or you can add the prompt to an existing custom model. The same custom model can contain multiple prompts, and the model's prompts can be associated with multiple speaker models. The same custom model can also contain custom words. To create a new custom model for your prompt, use the POST /v1/customizations method. For more information, see [Creating a custom model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModelscuModelsCreate).

The following example creates a new custom model that is named Prompt test. Because custom prompts and speaker models are supported only for US English, the language of the model is en-US. The Content-Type header for the request must be application/json.

IBM Cloud

curl -X POST -u "apikey:{apikey}" --header "Content-Type: application/json" --data "{"name":"Prompt test", "language":"en-US", "description":"Custom model to test prompts"}" "{url}/v1/customizations"

IBM Cloud Pak for Data

curl -X POST --header "Authorization: Bearer {token}" --header "Content-Type: application/json" --data "{"name":"Prompt test", "language":"en-US", "description":"Custom model to test prompts"}" "{url}/v1/customizations"

The method returns a globally unique identifier (GUID) as the customization ID for the new custom model.
[open and close list of options](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/kabob-beta.png) icon for the skill you want to swap, and then choose Swap skill.

To swap the current dialog skill for a different version of the skill, choose Change skill version.
3. Choose an existing skill to use instead or [create a skill](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-skill-add).

You cannot swap search skills currently.







 Switching between service instances 

If you have more than one deployed instance of Watson Assistant in your cluster, you can switch to a different instance.

To change to a different instance, you must open the other instance from the My instances page of the IBM Cloud Pak for Data web client.

V1.3 only: If you are working within a skill, click the Skills breadcrumb link first. The banner displays the current instance name. To switch to a different service instance, click Change, and then choose the appropriate instance.
Each provider organization can create multiple catalogs. Catalogs are useful for organizing products and APIs for testing before you make them available to consumer organizations. For more information on managing catalogs, see the following topics in the extended V10 documentation:



* [Creating catalogs](https://www.ibm.com/support/knowledgecenter/SSMNED_v10cloud/com.ibm.apic.apionprem.doc/create_env.html)
* [Adding users to catalogs](https://www.ibm.com/support/knowledgecenter/SSMNED_v10cloud/com.ibm.apic.apionprem.doc/tapic_catalog_members_manage.html)



You can partition a catalog into spaces and then assign a different team of developers to work in each space.



 Using spaces in a catalog 

Each space is used by a different team of developers, and has its own set of management capabilities relating specifically to the APIs that are developed by associated team. Using spaces enables each development team to manage their APIs independently. For information on working with spaces, see the following topics in the extended V10 Reserved documentation:



* [Managing API syndication with spaces](https://www.ibm.com/support/knowledgecenter/SSMNED_v10cloud/com.ibm.apic.apionprem.doc/tapic_syndication_spaces_configure.html)
* Adding spaces to a catalog:



1. [Enable spaces](https://www.ibm.com/support/knowledgecenter/SSMNED_v10cloud/com.ibm.apic.apionprem.doc/tapic_syndication_spaces_enable.html)
2. [Create a space](https://www.ibm.com/support/knowledgecenter/SSMNED_v10cloud/com.ibm.apic.apionprem.doc/tapic_syndication_spaces_manage.html)
3.
Why can't I create internal keystores? 

When you try to add more internal KMS keystores, an error occurs.

  What’s happening 

You receive the following error message when you try to add more internal KMS keystores:



*  From UI:

> Adding keystore failed. The service was not able to add keystore <keystore_ID>.
*  From API:

> The operation on the keystore has failed.



  Why it’s happening 

For a single service instance, you can create a maximum of 50 internal KMS keystores. You have reached the limits.

  How to fix it 

Empty and delete an existing keystore so that you can create a new one.
(And it's because you didn't add anything else to your action.)

Zoom

![Preview](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/new-action-preview.png)

Preview
4. If the assistant doesn't understand the phrase, you see the built-in action No action matches. For more information, see [When the assistant can't understand your customer's request](https://test.cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-handle-errorsno-action-matches).

Zoom

![No action matches](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/new-action-preview-no-match.png)

No action matches







 Adding more examples 

When you're creating a new action, one example phrase is enough to start with. You can build the rest of your action with steps before you add more example phrases. Then, return to Customer starts with and add 10 or more variations of the same question or request, by using words that your customers commonly use. For example:



* Are you open on the weekend?
* How late are you open today?
* Get store hours
* What time do you open?
* Are you open now?



Each phrase can be up to 1,024 characters in length.

By adding these phrases, your assistant learns what is the right action for what a customer wants. The additional examples build the training data that the machine learning engine of Watson Assistant uses to create a natural language processing model. The model is customized to understand your uniquely defined actions.



 Uploading phrases 

If you have many example phrases, you can upload them from a comma-separated value (CSV) file than to define them one by one.
Development process 

Use Watson Assistant to leverage AI as you build, deploy, and incrementally improve a conversational assistant.

![Shows the flow of development steps starting with developing training data and ending with deploying to production](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/dev-process.png)



 Workflow 

The typical workflow for an assistant project includes the following steps:



1. Define a narrow set of key customer needs that you want the assistant to address on your behalf, including any business processes that it can initiate or complete for your customers. Start small.
2. Create intents that represent the customer needs you identified in the previous step. For example, intents such as about_company or place_order.
3. Build a dialog that detects the defined intents and addresses them, either with simple responses or with a dialog flow that collects more information first.
4. Define any entities that are needed to more clearly understand the user's meaning.

Mine existing intent user examples for common entity value mentions. Using annotations to define entities captures not only the text of the entity value, but the context in which the entity value is typically used in a sentence.

For dictionary-based entities, use synonym recommendations to expand your entity definitions.
5. Test each function that you add to the assistant in the "Try it" pane, incrementally, as you go.
6. When you have a working assistant that can successfully handle key tasks, add an integration that deploys the assistant to a development environment. Test the deployed assistant and make refinements.
7. After you build an effective assistant, take a snapshot of the dialog skill and save it as a version.

Saving a version when you reach a development milestone gives you something you can go back to if subsequent changes you make to the skill decrease its effectiveness. See [Creating skill versions](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-versions).
Before you begin, create [an action sequence](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-sequences) and [a trigger](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-triggers).

ibmcloud fn rule create RULE_NAME TRIGGER_NAME ACTION_SEQUENCE_NAME





 Associating multiple triggers and actions 

You can use different combinations of triggers and actions by creating a rule for each combination. You are not required to have a one to one ratio for actions and triggers.

For example, consider the following actions.



Table 1. Actions and descriptions

 Action Description 

 classifyImage An action that detects the objects in an image and classifies them. 
 thumbnailImage An action that creates a thumbnail version of an image. 



Also, suppose that two event sources are firing the following triggers.



Table 2. Event triggers and descriptions

 Trigger Description 

 newTweet A trigger that is fired when a new tweet is posted. 
 imageUpload A trigger that is fired when an image is uploaded to a website. 



You can set up rules so that a single trigger event invokes multiple actions, and have multiple triggers invoke the same action.



* newTweet -> classifyImage rule
* imageUpload -> classifyImage rule
* imageUpload -> thumbnailImage rule



The three rules establish the following behavior.



* Images in both tweets are classified.
* Uploaded images are classified
* A thumbnail version is generated.
Each organization needs a CA to issue its certificates, therefore we need to create two CAs. For the purpose of this tutorial, we will create only one CA at a time.

Watch the following video to learn about the process to create the peer's organization and the peer (for video tutorials on how to create an ordering service and a channel, see [video series](https://developer.ibm.com/series/ibm-blockchain-platform-console-video-series/):

Video transcript

Hello everyone, and welcome to this demonstration of how to create a peer using the IBM Blockchain platform console. I’ll be following the process from the IBM Blockchain platform documentation, which you can see here. At the end of this tutorial, you will have created this structure, representing the components related to org1. In our next video, we’ll create an ordering service. And after that, a channel, to complete the infrastructure of our network.

In this video, we’ll be using recommended values for the various fields in the UI. These are the same values you’ll find in the docs, which are cataloged in tables for the various tasks. These values are not mandatory, but if you’re using the console for the first time, we do recommended them. In cases where you have to reenter a value, for example an enroll ID and secret, which are not stored in the console, you will be able to refer to the tables in the documentation to remember what you entered. If you do choose different values, make sure to write them down somewhere.

Alright, so let’s get started creating that peer. If you're unfamiliar with Hyperledger Fabric, which the IBM Blockchain Platform is based on, you might not realize you have to create a Certificate Authority before you create a peer. This is because before we can create a peer, we have to create some identities. These identities allow a network entity, whether it’s an admin or a node, to sign its actions using a certificate. Those certificates are issued by a Certificate Authority, also known as a CA. Therefore, our first step in creating a peer is to create a CA and use it to register identities for the peer admin and for the peer itself.
Each HCX-NE appliance can extend up to eight segments at a time, and you can create multiple HCX-NEs if needed. You can configure them when you create the service mesh.





 Related links 



* [Ordering VMware HCX in IBM Cloud](https://cloud.ibm.com/docs/vmwaresolutions?topic=vmwaresolutions-hcx_ordering)
* [HCX for IBM Cloud for VMware Solutions Guide](https://cloud.ibm.com/docs/vmwaresolutions?topic=vmwaresolutions-hcxclient-planning-prep-install)
* [VMware HCX User Guide](https://docs.vmware.com/en/VMware-HCX/4.3/hcx-user-guide/GUID-BFD7E194-CFE5-4259-B74B-991B26A51758.html)
For more information, see [Add a grammar to the custom language model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-grammarAddaddGrammar).
4. To add multiple words to your custom models, use the POST /v1/customizations/{customization_id}/words method. To add single words to your custom models, use the PUT /v1/customizations/{customization_id}/words/{word_name} method. For more information, see [Add words to the custom language model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreateaddWords).
5. To train your custom models once you restore your corpora, grammars, and custom words, use the POST /v1/customizations/{customization_id}/train method. For more information, see [Train the custom language model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreatetrainModel-language).



The methods that you use to add corpora, grammars, and words and to train a custom language model are asynchronous. You need to monitor the requests until they complete.

You can incrementally add data and train your custom language models rather than adding all data before training the models. For example, you can add your corpora and then train your models before you add grammars and individual words. You can also incrementally add and train your models on individual corpus text files, grammar files, and groups of custom words.







 Disaster recovery for custom acoustic models 

For custom acoustic models, you need to maintain and be prepared to re-create and restore your custom acoustic models and their audio resources. You also need to be prepared to retrain your custom acoustic models on their audio resources.



 Backing up custom acoustic models 

Preserve the following information about your custom acoustic models:



* A list of all of your custom acoustic models and their definitions. To list information about your custom models: