vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Using curl with Watson examples 

The curl utility lets you make HTTP requests from the command line. The utility provides a simple interface for making requests that use GET, POST, and other HTTP methods. It lets you pass request headers, data, and other input, and it can display all of the response headers and data that a call returns. Because curl eliminates the need to write code to exercise REST APIs, IBM Watson® documentation uses curl to demonstrate example calls.

The curl utility is installed by default with recent versions of Apple® macOS® and Microsoft® Windows®.



* For more information about installing or refreshing curl on macOS, Windows, or Linux®, see [Install curl](https://everything.curl.dev/get).
* For more information about using curl and its full range of capabilities, see [Everything curl](https://everything.curl.dev/).



curl is not recommended for application development.



 Using curl for secure communications 

To test whether curl is installed on your system, run the following command at a terminal prompt:

curl -V

If the output lists https among the supported protocols and SSL (Secure Sockets Layer) or TLS (Transport Layer Security) among the supported features, you're all set. All IBM Watson Watson services use these features for secure connections between the client and server. A connection request is verified against the local certificate store to ensure authentication, integrity, and confidentiality.

If these protocols are not listed, you can use a self-signed certificate for your requests. But to make a successful connection, you need to disable SSL verification by including the --insecure or -k option with the request.

Enabling SSL verification is highly recommended. Disabling SSL jeopardizes the security of the connection and data. Disable SSL only if necessary and only with data that is not confidential, and take steps to enable SSL as soon as possible.





 Example curl requests 

The following examples demonstrate the use of curl. The requests use the Speech to Text service to transcribe audio to text with both IBM Cloud® and IBM Cloud Pak® for Data.

IBM Cloud
Segment event reference 

The following tables show details of the events that Watson Assistant sends to Segment using the [Segment extension](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-segment-add). These events appear as tables in your Segment warehouse, and as regular events in other Destinations.

Only events generated using the Watson Assistant v2 API and associated with a user ID are included.



 Message Handled 

Sent when the assistant completes handling of a message.



 Property Type Description 

 accountId String The ID of the IBM account. 
 assistantId String The ID of the assistant. 
 browser String The browser that was used to send the message. 
 channel String The channel the customer used to send the message (for example, phone or chat). 
 device String The type of device that was used to send the message. 
 environment String The environment in which the message was handled (such as draft or live.) 
 language String The language of the assistant. 
 pageUrl String The URL of the web page from which the message was sent. 
 serviceInstance String The IBM Watson Assistant service instance. 
 sessionId String The ID of the session during which the message was handled. 
 skillsInvoked String[] An array of strings listing all skills that were invoked during handling of the message (for example, main skill or actions skill). 



The following properties are included only for messages that were handled by an actions skill:



 Property Type Description 

 action String The unique identifier of the action that was visited during handling of the message (for example, action_202). 
 actionCompleted Boolean Whether the action completed during handling of the message. 
 actionCompletedReason String The reason the action completed (for example, all_steps_done or fallback.) 
 actionStarted Boolean Whether processing of the action started during handling of the message. 
 actionTitle String The title of the action that was visited during handling of the message (for example, I want to pay my bill). 
 actionsVisited String[] An array of strings listing the actions visited during handling of the message. 
 fallbackReason String The reason why the fallback action was visisted (for example, escalated to human agent or no action matches).
This helps ensure that additional regions that are created for high availability are kept in sync with the primary regions and provides all the other security, compliance, and governance benefits of using infrastructure as code.





 Active/Passive 

When using an active/passive (cold standby) strategy, infrastructure as code enables contingency plans that include use of automation to create infrastructure on demand. This allows for very inexpensive active/passive configurations as costly infrastructure does not need to be maintained. Given the low cost of this approach, an Active/Active or Active/Standby high availability strategy can be combined with Active/Passive, particularly for important workloads.

Ensure that automation code such as terraform, deployable architectures, and associated configurations are included in the data that is backed up and made highly available.



 Preparation for Active/Passive 

There are [tradeoffs](https://cloud.ibm.com/docs/overview?topic=overview-understanding-drdr-categories) to be made between speed of recovery and cost. As setting up physical network connectivity is a slow process, direct-link connectivity to at least one alternative region should be established as a minimum even for Active/Passive (cold standby) configurations.

After network connectivity is available, the recovery strategy can be tailored for each BU or each workload. At the low cost, slow recovery end of the spectrum, all required infrastructure in the alternative region is re-created from infrastructure as code. At the other end of the spectrum, a copy of all infrastructure is maintained with running applications to allow near instant recovery. In between are options where bootstrap infrastructure is maintained, such as transit gateways and schematics agents to reduce recovery time. In all cases, after the infrastructure is available, data is then restored from backup before activating the passive deployment.





 Activating the alternative region 

Should a regional outage occur, an alternative region can be activated following pre-established and tested procedures. These procedures can include deploying infrastructure in the region by using project configurations that were created and tested in advance so that error free deployments can readily be accomplished. If pre-existing projects are not maintained, project configurations can be restored from backup and modified to target the alternative region.
Cluster users can override the default settings of the storage class by creating a Kubernetes secret with the PVC settings that they want. In order for the customized settings in the secret to get applied to your Block Storage for Classic instance, you must create a PVC with the same name as your Kubernetes secret.

[Enforce base64 encoding for the Key Protect root key](https://cloud.ibm.com/docs/containers?topic=containers-vpc-blockstatic-secret)
: In this scenario, you create one customized storage class with the default PVC settings and a reference to a static Kubernetes secret that overrides or enhances the default settings of the customized storage class. Your cluster users can't override the default settings by creating their own Kubernetes secret. Instead, cluster users must provision Block Storage for VPC with the configuration that you chose in your customized storage class and secret. The benefit of using this method over creating a [customized storage class](https://cloud.ibm.com/docs/containers?topic=containers-vpc-blockvpc-customize-storage-class) only is that you can enforce base64 encoding for the root key CRN of your Key Protect service instance when you want to encrypt the data in your Block Storage for Classic instance.

What do I need to be aware of before I start using the Kubernetes secret for my PVC settings?
: Some PVC settings, such as the reclaimPolicy, fstype, or the volumeBindingMode can't be set in the Kubernetes secret and must be set in the storage class. As the cluster admin, if you want to enable your cluster users to override your default settings, you must ensure that you set up enough customized storage classes that reference a generic Kubernetes secret so that your users can provision Block Storage for VPC with different reclaimPolicy, fstype, and volumeBindingMode settings.





 Enabling every user to customize the default PVC settings 



1.
Use the icon in the upper right of the chart to toggle between a line chart that shows the percentage of complete actions or a bar chart that shows the number of complete and incomplete actions. The Actions table provides number of requests, total incomplete, and completion percentage per action.

![Action completion](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/analytics-action-completion.png)

You can use the Actions table to focus on improving the completion of your actions. Incomplete results provide a focus area where you can make the biggest impact. The actions with the highest number of incompletions means these are the actions with the most users unable to get their questions answered or requests resolved.

To work on a specific action, click on the action name in the table. A page opens with completion details for that single action.

![Action page](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/analytics-single-action.png)

The Incomplete and Complete tabs provide details by timeframe. The Incomplete tab bar chart shows data for the four incompletion reasons. The Complete tab bar chart is organized by conversations either completed by the assistant or completed by a planned connect to agent response.

As you click on each tab, a table below the chart shows the list of either incomplete or complete requests. To explore individual requests in detail, you can click on each one. A panel opens showing the full back and forth between your customer and the assistant, including step interactions. The panel also provides a summary of how many requests there were, how many were recognized, whether search was initiated, and the duration of the conversation.

!
After you share it with a user and they click the link, the dashboard is added to their account.

All users with the dashboard link can share the dashboard, which means other users can see the populated data that they have permission to view. If they don’t have the same permissions as the owner, for example, if they don’t have access to Cora’s chatbot resource group, they cannot view that data. Users without permissions to the scoped resources are able to view the dashboard layout, but not the populated data. A user with insufficient permissions might see a warning icon next to the dashboard that indicates a scoping error and that the data that's displayed might not be complete. Make sure that the users you share a dashboard with have access to the resources you scope the dashboard to.





 Step 3: Duplicate a dashboard 

Cora decides that the team of developers she manages doesn't need to see the Usage for the project. Other than the Usage widget, she wants to share with them essentially the same dashboard that she shared with her program director.

You can duplicate a dashboard to include the same structure and layout without having to re-create the dashboard from scratch.



1. To duplicate a dashboard, click the Actions icon ![Actions icon](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/action-menu-icon.svg) > Duplicate.
2. Define the scope. The scope and assigned access is not saved from the dashboard that was duplicated. Cora applies the resource group filter for the chatbot project just like she did for the original dashboard.
3. Click Save dashboard.
4. Click the Actions icon ![Action icon](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/action-menu-icon.svg), and select Share to share the new dashboard with the correct users.







 Next steps
* Shipping customers have real-time access to shipments’ locations, delivery schedules, and even approved port records.
* Transit partners at various shipping terminals are aware of manifests and shipment details so that onsite logistics are improved, instead of delayed.









 Airline delivers innovative Human Resources (HR) benefits site in under 3 weeks 

An HR Exec (CHRO) needs a new HR benefits site with an innovative chatbot, but current Development tools and platform mean long lead times for apps to go live. This situation includes long waits for hardware procurement.

IBM Cloud Kubernetes Service provides easy spin-up of compute. Then, Developers can experiment easily, pushing changes to Development and Test systems quickly with open toolchains. Their traditional software development tools get a boost when they add on IBM Watson Assistant. The new benefits site was created in less than 3 weeks.



 Context 

Rapidly building and deploying innovative HR benefits site in less than 3 weeks.



* Employee growth and changing HR policies meant that a whole new site would be required for annual enrollment.
* Interactive features, such as a chatbot, were expected to help communicate new HR policies to existing employees.
* Due to growth in number employees, the site traffic is increasing, but their infrastructure budget remains flat.
* The HR team faced pressure to move faster: roll out new site features quickly and post last-minute benefit changes frequently.
* The enrollment period lasts for two weeks, and so downtime for the new app isn't tolerated.







 Solution 

The airline wants to design an open culture that puts people first. The HR Executive is well aware that a focus on rewarding and retaining talent impacts the airline’s profitability. Thus, the annual rollout of benefits is a key aspect of fostering an employee-centered culture.

They need a solution that helps the Developers and their users.



* FRONT-END TO EXISTING BENEFITS: insurance, educational offerings, wellness, and more
* REGION-SPECIFIC FEATURES: each country has unique HR policies so that the overall site might look similar but show region-specific benefits
* DEVELOPER-FRIENDLY TOOLS that accelerate rollout of features and bug fixes
* CHATBOT to provide authentic conversations about benefits and resolve users requests and questions efficiently.



Technical solution:



* IBM Cloud Kubernetes Service
Click Save dashboard.
4. Click the Actions icon ![Action icon](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/action-menu-icon.svg), and select Share to share the new dashboard with the correct users.







 Next steps 

When the chatbot project is complete, Cora's team of developers might want to remove the dashboard from their view, even if Cora wants to keep it around to reference later. You can remove a dashboard only if it was shared with you.



1. In the IBM Cloud console go to Manage > Account, and select Account resources > Dashboards.
2. Click the Actions icon ![Action icon](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/action-menu-icon.svg), and select Remove.



Is your dashboard no longer in use? Delete the dashboard that you created as a part of this tutorial. After you delete a dashboard, you can't recover it and it is deleted for all users. Only the dashboard owner can delete a dashboard.

To delete a dashboard, complete the following steps:



1. Expand the Actions icon ![Action icon](https://cloud.ibm.com/docs-content/v1/content/4d8c6eec891cff72b666dc24bd3211810c77fb42/icons/action-menu-icon.svg), and select Delete.
2. Click Delete.
Cluster administrators and developers must interact frequently so that cluster administrators understand workload requirements to provide this capability in the cluster, and so that developers know about available limitations, integrations, and security principles that they must consider in their app development process.







 Sizing your Red Hat OpenShift cluster to support your workload 

Figuring out how many worker nodes you need in your cluster to support your workload is not an exact science. You might need to test different configurations and adapt. Good thing that you are using Red Hat OpenShift on IBM Cloud, where you can add and remove worker nodes in response to your workload demands.

To get started on sizing your cluster, ask yourself the following questions.



 How many resources does my app require? 

First, let's begin with your existing or project workload usage.



1. Calculate your workload's average CPU and memory usage. For example, you might view the Task Manager on a Windows machine, or run the top command on a Mac or Linux. You might also use a metrics service and run reports to calculate workload usage.
2. Anticipate the number of requests that your workload must serve so that you can decide how many app replicas you want to handle the workload. For example, you might design an app instance to handle 1000 requests per minute and anticipate that your workload must serve 10000 requests per minute. If so, you might decide to make 12 app replicas, with 10 to handle the anticipated amount and an extra 2 for surge capacity.







 What else besides my app might use resources in the cluster? 

Now let's add some other features that you might use.



1. Keep in mind that the [worker nodes reserve certain amounts of CPU and memory resources](https://cloud.ibm.com/docs/openshift?topic=openshift-planning_worker_nodesresource_limit_node) to run required components, such as the operating system or container runtime.
2. Consider whether your app pulls large or many images, which can take up local storage on the worker node.
3.
Step 1: Import your Terraform template 



1. In the IBM Cloud console, click the Navigation Menu icon ![Navigation Menu icon](https://cloud.ibm.com/docs-content/v1/content/ff5860bfede49db3197c4bbba7f7123769bdc068/icons/icon_hamburger.svg) > Partner Center > Sell > My products.
2. Select the product that you're onboarding.
3. From the Software tab, click Import a version.
4. Choose Terraform as your deployment method.
5. Select the type of repository.
6. Enter the example Terraform URL as your source URL.
7. Enter the software version in the format of major version, minor version, and revision, for example, 1.0.0.
8. Click Add version.







 Step 2: Review the version details 

From the Configure version tab, you can review your version details. After you review your version details, click Next.





 Step 3: Configure the deployment values 

After you review the version details, you're ready to configure the deployment values.



1. If you need to specify the Terraform runtime version that you want Schematics to use, click the Override the default Terraform runtime version checkbox and enter a version.
2. From the Configure the deployment details section, click Add deployment values.
3. Select the Parameter checkbox to select all options, and click Add.
4. To customize which parameters are required for users to specify during the installation and which ones are hidden from users, select a parameter and click Edit. Click the checkboxes to configure the values and click Save.







 Step 4: Edit output value descriptions 

You can improve the descriptions for your Terraform template's output values to help users better understand the purpose of the parameters. The description of any output value that you include in your template can be updated.

To add output values, you need to include them in a new imported version of your Terraform template.
* Take notes so you can trace your steps.
* Understand and document you software versions.
* Document your subnets and IP address usage, including VIP and NAT addresses.
* Have diagrams of your network. You need a number of diagrams that show the physical (underlay) and logical (overlay) layers.
* Understand any recent changes to the environment.
* Research the impact of the fix, do not lock yourself out of any management interfaces.
* Ensure that you have backups of all key components in case they need to be reloaded or reset.
* Do not change more than one thing at a time.
* Document each change and its result.
* When you open a support request, ensure that you document carefully and provide pertinent information. Be clear in the symptoms that you are seeing and identify the components that you believe are faulty. Ensure that you use the correct terminology. Try to minimize any confusion or ambiguity in your choice of words.
* vSphere ESXi and vCenter Server configuration files control the behavior of the system. Most configuration file settings are set during installation, but can be modified after installation.
* Log files capture messages that are generated by the kernel and different subsystems and services. vSphere ESXi and vCenter services maintain separate log files. Understand where they are located and how they can be accessed.
* Understand how to use popular system administration tools for help in diagnostics.







 Troubleshooting with log files 

Log files are an excellent source of information to troubleshoot issues. However, the number of log files and the vast number of entries in each log make it difficult to diagnose. [Location of log files for VMware products (1021806)](https://kb.vmware.com/s/article/1021806) details where these log files are located in the VMware environment. Due to the number of log files and the vast number of entries in each log, consider the tools in the Operations Management on IBM Cloud to help capture and analyze event logs.





 Troubleshooting common scenarios 

In an aid to isolating the affected components, this documentation on troubleshooting common scenarios is classified into the following categories.
Getting started with Knowledge Studio for IBM Cloud Pak for Data 

This IBM Watson™ Knowledge Studio for IBM Cloud Pak for Data tutorial helps you perform prerequisite tasks that must be completed before you can start any of the other tutorials.



 Before you begin 



* Provision the instance of the Knowledge Studio for IBM Cloud Pak for Data add-on. For more information about provisioning, see [Installing the add-on](https://cloud.ibm.com/docs/watson-knowledge-studio-data?topic=watson-knowledge-studio-data-install).
* Confirm you're using a supported browser. For information, see [Browser requirements](https://cloud.ibm.com/docs/watson-knowledge-studio-data?topic=watson-knowledge-studio-data-system-requirements).







 Launching the Knowledge Studio application 



1. From the IBM Cloud Pak for Data web client menu, choose My Instances.
2. Click the Knowledge Studio instance to open the overview page. Click Launch Tool.

If you're prompted to log in, provide your IBM Cloud Pak for Data credentials.







 Lesson 1: Assigning user roles 

In this lesson, you will learn about the different roles that you can assign to users in Knowledge Studio.



 About this task 

The creation of a machine learning model requires input from subject matter experts, project managers, and users who can understand and interpret statistical models. Administrators assign roles to each user, such that they have appropriate authority for their tasks. For more information about user roles, see [Assembling a team](https://cloud.ibm.com/docs/watson-knowledge-studio-data?topic=watson-knowledge-studio-data-team).





 Procedure 



1. Log in to Knowledge Studio with an administrator ID.
2. Click the Settings icon to open the Service Details page. The page lists all the user IDs that are registered as Knowledge Studio users. Each user ID has one of the following roles (in decreasing order of included permissions):



* Admin
* Project Manager
* Human Annotator