vania-janet/multiturn-rag-retrieval-data huggingface dataset:
[create](https://cloud.ibm.com/docs/key-protect?topic=key-protect-key-protect-cli-referencekp-key-ring-create) Creates a key ring within a kp instance 
 [delete](https://cloud.ibm.com/docs/key-protect?topic=key-protect-key-protect-cli-referencekp-key-ring-delete) Deletes a key ring within a kp instance 







 Other kp commands 

More commands for managing Key Protect resources could support best practices.



Table 5. Commands for managing other resources

 Command Status v0.8 Description 

 [kp keys](https://cloud.ibm.com/docs/key-protect?topic=key-protect-key-protect-cli-referencekp-keys) List the keys that are available in your Key Protect instance 
 [kp key-rings](https://cloud.ibm.com/docs/key-protect?topic=key-protect-key-protect-cli-referencekp-key-rings) Lists the key rings associated with the kp instance 
 [kp region-set](https://cloud.ibm.com/docs/key-protect?topic=key-protect-key-protect-cli-referencekp-region-set) Target a different regional endpoint 
 [kp registrations](https://cloud.ibm.com/docs/key-protect?topic=key-protect-key-protect-cli-referencekp-registrations) List associations between root keys and other cloud resources
The ibmcloud resource service-instance-create command requires a service plan name and a location, which is in the catalog. show the catalog offerings for cloud object storage (COS) and Key Protect
$ ibmcloud catalog service cloud-object-storage

$ ibmcloud catalog service kms
 create a Cloud Object Storage (COS) instance
 "lite" is the pricing plan and "global" is the region
$ COS_NAME=my-cos-1

$ ibmcloud resource service-instance-create $COS_NAME cloud-object-storage lite global

Creating service instance my-cos-1 in resource group Default of account <account name> as <email address>...
OK
Service instance my-cos-1 was created.
Name: my-cos-1
ID: crn:v1:bluemix:public:cloud-object-storage:global:a/ea998d3389c3473aa0987652b46fb146:4b636e74-f3ca-40bb-80b8-3bd21801ccb8::
GUID: 4b636e74-f3ca-40bb-80b8-3bd21801ccb8
Location: global
State: active
Type: service_instance
Sub Type:
Allow Cleanup: false
Locked: false
Created at: 2020-06-15T16:03:39Z
Updated at: 2020-06-15T16:03:39Z
Last Operation:
Status create succeeded
Message Completed create instance operation

 capture the COS instance id (GUID)
$ COS_INSTANCE_ID=4b636e74-f3ca-40bb-80b8-3bd21801ccb8

 create a Key Management Service (KMS) service instance
 "tiered-pricing" is the pricing plan and "us-south" is the region
$ KMS_NAME=my-kms-1
In this file, you define resources by using HashiCorp Configuration Language. For more information, see the [Terraform documentation](https://www.terraform.io/docs/language/index.html).



Use the following steps to create custom roles:



1. Create an argument in your main.tf file. The following example creates a custom role by using the ibm_iam_custom_role resource, where name is a unique name to identify the custom role. You must add at least one service-defined action to successfully create the new role.

resource "ibm_iam_custom_role" "customrole" {
name = "Role1"
display_name = "Role1"
description = "This is a custom role"
service = "metrics-router"
actions = ["metrics-router.target.list"]
}

You can specify the name of the service for which you want to create the custom role on the service option. For more information, see the argument reference details on the [Terraform Identity and Access Management (IAM)](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/iam_custom_role) page.
2. After you finish building your configuration file, initialize the Terraform CLI. For more information, see [Initializing Working Directories](https://www.terraform.io/cli/init).

terraform init
3. Provision the resources from the main.tf file. For more information, see [Provisioning Infrastructure with Terraform](https://www.terraform.io/cli/run).



1. Run terraform plan to generate a Terraform execution plan to preview the proposed actions.

terraform plan
2. Run terraform apply to create the resources that are defined in the plan.

terraform apply
ibmcloud fn namespace create 

Create an IAM namespace.

ibmcloud fn namespace create NAMESPACE [--description DESCRIPTION]



 Command options 

NAMESPACE
: The name for a namespace. Do not include hyphens (-) in the name. This value is required.

--description DESCRIPTION, -n DESCRIPTION
: Write your own unique description to help you identify the namespace. If your description is more than one word, include quotation marks (") around your description. This flag is optional.





 Example 

ibmcloud fn namespace create HBCTeamProd --description "HBC Team Prod Environment. See Beth for information about this namespace."







 ibmcloud fn namespace delete 

Delete an IAM namespace.

ibmcloud fn namespace delete NAMESPACE



 Example 

ibmcloud fn namespace delete mynamespace







 ibmcloud fn namespace get 

Get the entities for or the metadata information from a Cloud Foundry or IAM namespace.

ibmcloud fn namespace get NAMESPACE [--auth KEY] [--name-sort] [--properties]



 Command options 

NAMESPACE
: The name or ID for a namespace. This value is required.

--authKEY, -uKEY
: The wsk authorization KEY. This flag is optional.

--name-sort, -n
: Sort the list of returned namespaces by name, otherwise the list is sorted by creation date. This flag is optional.

--properties
: Display the namespace properties instead of the entities contained within it. This flag is optional.





 Example 

ibmcloud fn namespace get user@domain.com_dev --properties

Output

Name: user@domain.com_dev
Description: This is a description of my namespace.
Resource Plan Id: functions-base-plan
Location: us-south
ID: 58c2e718-8c60-48bc-96de-cf9373fe6709
Resources 

The design of resources is fundamental to a usable API. That is, APIs should be designed primarily around how the state of a service is modeled as resources and secondarily around operations available to manipulate those resources.

This distinction allows users of the APIs to learn and reason about a resource's state separately from how that state can be changed. It's also a familiar separation of concepts for programmers: any programming environment has some notion of structured data (from low-level constructs, such as blocks of memory, to high-level constructs, such as classes) and code that operates on it (from subroutines in assembly to methods on objects).

By defining the data structures — or resources — first, an API is more approachable. The REST architectural style for HTTP APIs is built on this idea.

Further, HTTP provides a standard way to represent a resource's canonical address in the form of a URL, and standard methods to create (with POST), list and read (with GET), mutate (with PUT and PATCH) and delete (with DELETE) resources. With standard methods available for each resource, users can apply knowledge and code across operations that each work in a predictable, robust way.

In IBM Cloud REST-style APIs, each resource type SHOULD have two standard URL path types:



1. A resource collection path, such as /keys. A GET request on the collection returns a list of resources within it. A POST request on a collection URL creates a new resource in the collection.
2. A resource path, such as /keys/{id} where {id} is a unique identifier for a specific resource. A GET request on a resource URL returns the canonical resource representation, PATCH updates a resource, PUT replaces a resource, and DELETE deletes a resource.



The schemas for request payloads to create and mutate resources SHOULD be consistent with the canonical representation of the resource returned by a GET on the resource URL and MUST NOT differ arbitrarily. Often, schemas for resource creation and mutation MAY represent a subset of the properties in a resource's canonical representation, omitting properties that are system-defined or immutable.

For example, consider a resource's canonical representation:
ibmcloud ce build create --name helloworld-build2 --image us.icr.io/mynamespace/codeengine-helloworld --registry-secret myregistry --source https://github.com/IBM/CodeEngine --context-dir /hello

Example output

Creating build helloworld-build2...
OK

The following table summarizes the options that are used with the build create command in this example. For more information about the command and its options, see the [ibmcloud ce build create](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-build-create) command.



Table 2. Command description

 Option Description 

 --name The name of the build. Use a name that is unique within the project. This value is required.<br><br><br><br> * The name must begin with a lowercase letter.<br> * The name must end with a lowercase alphanumeric character.<br> * The name must be 55 characters or fewer and can contain letters, numbers, and hyphens (-).<br><br><br> 
 --image The location of the image registry. The format of the location must be REGISTRY/NAMESPACE/REPOSITORY or REGISTRY/NAMESPACE/REPOSITORY:TAG where TAG is optional. If TAG is not specified, the default is latest. 
 --registry-secret The registry secret that is used to access the registry. You can add the registry secret by running the secret create --format registry command. The registry secret is used to authenticate with a private registry. 
 --source The URL of the Git repository that contains your source code; for example, https://github.com/IBM/CodeEngine. 
 --context-dir The directory in the repository that contains the buildpacks file or the Dockerfile. Specify this value if your buildpacks file or Dockerfile is contained in a subdirectory. This value is optional. 



2. Use the build get command to check the status of your build.
This code is used to create an action that is invoked when the trigger is fired. When you make an action using this code, the action returns the data from the bucket change event.

function main(data) {
console.log(data);
}



 Creating an action with the console 



1. Navigate to the Cloud Functions [Triggers page](https://cloud.ibm.com/functions/triggers).
2. Click the trigger that you created.
3. On the Connected Actions page, click Add.
4. On the Add Action page, select Create New.
5. Specify a name for your action.
6. Select a package for your action.
7. For the Runtime, select Node.js 10.
8. Click Create & Add.
9. On the Connected Actions page, click the action that you created.
10. On the Action page, replace the Hello World example code with the code from your cosChange.js file.
11. Click Save.







 Creating an action with the CLI 

Create an action called cosChange by using the cosChange.js code.

ibmcloud fn action create cosChange <filepath>/cosChange.js

Create a rule called cosRule to connect the cosChange action to the cosTrigger trigger.

ibmcloud fn rule create cosRule cosTrigger cosChange







 2. Testing the trigger and action 

After you [create a trigger to respond to bucket changes](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-pkg_obstoragepkg_obstorage_ev_trig_ui) and [connect an action to the trigger](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-pkg_obstoragecos_feed_action), you can test that the action ran because the trigger fired. You can perform this test in either the console or CLI.



 Testing with the console 



1.
The Welcome page summarizes the purpose of the toolchain that is created, along with links to documentation and related materials. When you are ready to proceed, click Start to begin configuring the toolchain.

Review the default information for the toolchain settings:



1. The toolchain's name identifies it in IBM Cloud. Make sure that the toolchain's name is unique within your toolchains for the same region and resource group in IBM Cloud.
2. The toolchain region is the region where the toolchain itself and related resources (Git repos, pipelines, for example) are created. Toolchains can deploy to any region, regardless of where they are created.







 Step 3: Set up CI tool integrations 

You must configure multiple repositories during the guided setup, as described in the following sections.

For each repository, you can either clone the repository that is provided as a sample. Alternatively, you can provide a URL to an existing IBM-hosted Git Repos and Issue Tracking repository that you own. The toolchain supports linking only to existing Git Repos and Issue Tracking repositories.



 Infrastructure code 

The infrastructure source code repository is hosted on GitHub Enterprise. For consistency, this tutorial refers to Git Repos and Issue Tracking.

The recommended options are displayed by default, but you can click the Switch to advanced configuration toggle to see all of the configuration options available for the underlying Git integration. The default behavior of the toolchain is Use default sample infrastructure code, which clones the sample application into an IBM-hosted Git Repos and Issue Tracking repository.

Enter a name for the IBM-hosted Git Repos and Issue Tracking repository that is created by the toolchain as your infrastructure code repository.

The region of the repository remains the same as the region of the toolchain.

If you want to link an existing infrastructure code repository for the toolchain, select Bring your own infrastructure code, and provide it as input to the Repository URL field. The toolchain currently supports linking only to existing Git Repos and Issue Tracking repositories.
* For dialog skills, the Try it out pane now uses the [React](https://reactjs.org/) UI framework similar to the rest of the Watson Assistant user interface. You shouldn't see any change in behavior or functionality. As a part of the update, dialog skill error handling has been improved within the "Try it out" pane. This update was enabled on these dates:



* September 9, 2021 in the Tokyo and Seoul data centers
* September 13, 2021 in the London, Sydney, and Washington, D.C. data centers
* September 15, 2021 in the Dallas and Frankfurt data centers









 13 September 2021 

Dialog skill "Try it out" improvements
: For dialog skills, the Try it out pane now uses the [React](https://reactjs.org/) UI framework similar to the rest of the Watson Assistant user interface. You shouldn't see any change in behavior or functionality. As a part of the update, dialog skill error handling has been improved within the "Try it out" pane. This update was enabled on September 9, 2021 in the Tokyo and Seoul data centers. On September 13, 2021, the update was enabled in the London, Sydney, and Washington, D.C. data centers.

Disambiguation feature updates
: The dialog skill disambiguation feature now includes improved features:



* Increased control: The frequency and depth of disambiguation can now be controlled by using the sensitivity parameter in the [workspace API](https://cloud.ibm.com/apidocs/assistant/assistant-v1updateworkspace). There are 5 levels of sensitivity:



* high
* medium_high
* medium
* medium_low
* low



The default (auto) is medium_high if this option is not set.
* More predictable: The new disambiguation feature is more stable and predictable. The choices shown may sometimes vary slightly to enable learning and analytics, but the order and depth of disambiguation is largely stable.
It has two components:



* Custom prompts include the written text that is to be spoken and recorded audio that speaks the text as you want to hear it. The audio specifies the intonation, cadence, and stress of the synthesized text. The prompt can emphasize different syllables or words, introduce pauses, and generally make the synthesized audio sound more natural and appropriate for its context.
* Speaker models provide enrollment audio for a user who speaks one or more prompts. A speaker model provides an audio sample of a user's voice. The service trains itself on the voice, which can help it to produce higher-quality prompts for that speaker.



You specify a custom prompt with a speech synthesis request to indicate how the service's voice is to pronounce the text. To specify a prompt, you use the SSML extension <ibm:prompt id="{prompt_id}"/>. The synthesized audio duplicates the prosody of the prompt.

For more information about using the Tune by Example feature, see the following topics:



* [Understanding Tune by Example](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-tbe-intro)
* [Rules for creating custom prompts and speaker models](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-tbe-rules)
* [Creating a custom prompt](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-tbe-create)
* [Using a custom prompt for speech synthesis](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-tbe-use)
* [Managing custom prompts](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-tbe-custom-prompts)
* [Managing speaker models](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-tbe-speaker-models)



New Tune be Example methods
You can disable the search skill from being triggered.

You might want to do so temporarily, while you are setting up the integration. Or you might want to only ever trigger a search for specific user queries that you can identify within the dialog, and use a search skill response type to answer.

To prevent the search skill from being triggered, complete the following steps:



1. From the Assistants page, click the menu for your assistant, and then choose Settings.
2. Open the Search skill page, and then set the switch to Disabled.
Create a Watson Studio account, [create a project](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/projects.html), and add a Cloud Object Storage account to it.
2. From the Watson Studio community, choose a notebook.

Early in the development process, use the Dialog skill analysis for Watson Assistant notebook to help you get started. It offers the following types of insights:



* Examines the terms that are correlated with each intent in your training data to find anomalies that might identify problems that you can investigate further.
* Uses a blind test set that you provide to calculate performance on statistical metrics like Accuracy, Precision, Recall & F1.
* Offers advanced features that you can use to find the causes of common issues such as why some sentences are often misidentified.



To learn more about how this notebook can help you improve your dialog, read this [Medium.com blog post](https://medium.com/ibm-watson/announcing-dialog-skill-analysis-for-watson-assistant-83cdfb968178).
3. After you deploy a version of the assistant, and have some conversation log data collected, run the Measure Watson Assistant Performance notebook.
4. Follow the step-by-step instructions provided with the notebooks to analyze a subset of the dialog exchanges from the logs.

Run the following notebook first:



* Measure: Gathers metrics that focus on coverage (how often the assistant is confident enough to respond to users) and effectiveness (when the assistant does respond, whether the responses are satisfying user needs).



The insights are visualized in ways that make it easier to understand areas for improvement in your assistant.
5. Export a sample set of the logs from ineffective conversations, and then analyze and annotate them.

For example, indicate whether a response is correct. If correct, mark whether it is helpful. If a response is incorrect, then identify the root cause, the wrong intent or entity was detected, for example, or the wrong dialog node was triggered. After identifying the root cause, indicate what the correct choice would have been.
6.
You can disable the search skill from being triggered.

You might want to do so temporarily, while you are setting up the integration. Or you might want to only ever trigger a search for specific user queries that you can identify within the dialog, and use a search skill response type to answer.

To prevent the search skill from being triggered, complete the following steps:



1. From the Assistants page, click the menu for your assistant, and then choose Settings.
2. Open the Search Skill page, and then click to switch the toggle to Disabled.
* [Dialog skill analysis for Watson Assistant](https://dataplatform.cloud.ibm.com/exchange/public/entry/view/4d77701840fcb2f21587e39fdb887049)
* [Measure Watson Assistant Performance](https://dataplatform.cloud.ibm.com/exchange/public/entry/view/133dfc4cd1480bbe4eaa78d3f635e568).
* [Analyze Watson Assistant Effectiveness](https://dataplatform.cloud.ibm.com/exchange/public/entry/view/133dfc4cd1480bbe4eaa78d3f636921c)
* [Dialog Flow Analysis for Watson Assistant](https://dataplatform.cloud.ibm.com/exchange/public/entry/view/013c690997e27f3a8d9133265327a9e5)



If you choose to use the notebooks that are designed for use with Watson Studio, the steps are roughly these:



1. Create a Watson Studio account, [create a project](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/projects.html), and add a Cloud Object Storage account to it.
2. From the Watson Studio community, choose a notebook.

Early in the development process, use the Dialog skill analysis for Watson Assistant notebook to help you get started. It offers the following types of insights:



* Examines the terms that are correlated with each intent in your training data to find anomalies that might identify problems that you can investigate further.
* Uses a blind test set that you provide to calculate performance on statistical metrics like Accuracy, Precision, Recall & F1.
* Offers advanced features that you can use to find the causes of common issues such as why some sentences are often misidentified.
This documentation for the classic Watson Assistant experience has moved. For the most up-to-date version, see [Migrating to the v2 API](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-api-migration). To see all documentation for the new Watson Assistant, please go [here](https://cloud.ibm.com/docs/watson-assistant).



 Migrating to the v2 API 

The Assistant v2 runtime API, which supports the use of assistants and skills, was introduced in November 2018. This API offers significant advantages over the v1 runtime API, including automatic state management, ease of deployment, skill versioning, and the availability of new features such as the search skill.

The v2 API is available for all users, regardless of service plan, at no additional cost.

The v2 API currently supports only runtime interaction with an existing assistant. Authoring applications that create or modify workspaces should continue to use the v1 API.



 Overview 

With the v2 API, your client app communicates with an assistant, rather than directly with a workspace. An assistant is a new orchestration layer that offers several new capabilities, including automatic state management, skill versioning, easier deployment, and (for Plus and Premium plans) search skills. Your existing workspace (now referred to as a dialog skill) continues to function as before, but the new capabilities are provided by the new assistant layer.

All communication with an assistant takes place within the context of a session, which maintains conversation state throughout the duration of the conversation. State data, including any context variables that are defined by your dialog or client application, are automatically stored by Watson Assistant, without any action required on the part of your application.

State data persists until you explicitly delete the session, or until the session times out because of inactivity.

If you prefer to manage state yourself, the v2 API also provides a stateless message method that functions more like the v1 API. If you use the stateless message method, you do not need to explicitly create or delete sessions, and your app is responsible for maintaining context.