vania-janet/multiturn-rag-retrieval-data huggingface dataset:
port The HTTPS port number for accessing the service instance on the host. It's 443 as only HTTPS access is allowed by IBM Cloudant. This field displays only if the Use both legacy credentials and IAM option is chosen. 
 url The HTTPS URL to access the IBM Cloudant instance. If the Use both legacy credentials and IAM option is chosen, it also includes the embedded legacy username and password. 
 apikey The IAM API key. 
 iam_apikey_description Description of the IAM API key. 
 iam_apikey_name ID of the IAM API key. 
 iam_role_crn The IAM role that the IAM API key has. 
 iam_serviceid_crn The CRN of the service ID. 







 Authentication 

IBM Cloudant has two authentication methods available at provisioning time, either Use only IAM or Use both legacy credentials and IAM. You can see the details about your legacy credentials in the service credentials only if the Use both legacy credentials and IAM authentication method is chosen. The credentials display on the Service credentials tab for your instance. For more information, see the [IAM guide](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-managing-access-for-cloudant) and [legacy authentication](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-work-with-your-accountauthentication) document for details about using either style of authentication.

The IBM Cloudant team recommends you use IAM access controls for authentication whenever possible. If you're using IBM Cloudant legacy authentication, you must use [API keys](https://cloud.ibm.com/apidocs/cloudantintroduction) rather than account-level credentials for programmatic access and replication jobs.





 IBM Cloudant Dashboard 

You can open the IBM Cloudant Dashboard for your instance by going to the Manage tab of the IBM Cloud Dashboard instance details page. You can use either Launch or Launch Cloudant Dashboard to open the dashboard in a new browser tab. You can do the following tasks by using the IBM Cloudant Dashboard:



* Monitor your current consumption of the instance.
secrets-manager.configurations.list List configurations. 
 secrets-manager.configuration.read View the details of a configuration. 
 secrets-manager.configuration.update Update a configuration. 
 secrets-manager.configuration.delete Delete a configuration. 
 secrets-manager.endpoints.view Get service instance endpoints. 
 secrets-manager.notifications-registration.create Create a registration with Event Notifications. 
 secrets-manager.notifications-registration.read Get Event Notifications registration details. 
 secrets-manager.notifications-registration.delete Delete an Event Notifications registration. 
 secrets-manager.notifications-registration.test Send a test event. 







 Viewing events 

Events that are generated by an instance of the Secrets Manager service are automatically forwarded to the IBM Cloud Activity Tracker service instance that is available in the same location.

IBM Cloud Activity Tracker can have only one instance per location. To view events, you must access the web UI of the IBM Cloud Activity Tracker service in the same location where your service instance is available. For more information, see [Launching the UI through the IBM Cloud UI](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-launchlaunch_cloud_ui).





 Analyzing events 

Successful events that are generated by an instance of the Secrets Manager service contain various fields that can help you to identify the initiator, the target resource, and the outcome of each completed action in your instance. For more information about the components that make up an event, see the [IBM Cloud Activity Tracker documentation](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-event).

Due to the sensitivity of secrets, when an IBM Cloud Activity Tracker event is generated as a result of an API call to the Secrets Manager service, the generated event does not include the actual contents of a secret. Sensitive data, such as an API key or password, is replaced with identifying information about the secret only, or it is omitted from generated events altogether.

You can create views and alerts from all of your Secrets Manager instances, or from a specific instance.
To target a specific instance, replace host:secrets-manager with app:{INSTANCE_CRN}.



 Query for finding all create secret actions:
agents, ags [Deprecated] Agents extends Schematics ability to reach your private, or on-premises, infrastructure.
apply Apply a plan to an workspace to deploy the latest version of your configuration.
blueprint, bp Deploy and manage large scale environments using reusable blueprint templates.
destroy Destroy resources in an existing workspace. This action cannot be reversed.
inventory, iv Create and manage Schematics Inventories. Inventory let you define host group that can contain INI or Resource Query id's
job, j Create and manage Schematics jobs. Job let you manage all the jobs like creating/deleting/updating/retrieving.
kms listing and enabling IBM Cloud Schematics kms instances and root keys .
logs Show details about actions that ran against an workspace.
output Get all the output values from your workspace; (ex. result of terraform output command
plan Create a plan for an workspace. Plans show how resources would change if you applied the latest version of your workspace configuration.
policy, plcy [Beta] Create and manage policies.
refresh Refresh the workspace with latest version of your workspace configuration.
resource-query, rq Create and manage Schematics Resource Query. Resource query let you define conditions to fetch host group that can be used to perform actions
state Advanced state management
version Report version information about the IBM Cloud Schematics CLI.
workspace, ws Create and manage workspaces. Workspaces let you define the source control repository that contains your Terraform configuration and pass workspace-specific variables.
help, h Show help

Enter 'ibmcloud schematics help [command]' for more information about a command.







 Updating the CLI 

Update the IBM Cloud command-line and the Schematics command-line plug-in periodically to get access to new features.



1. [Update the IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cli-install-ibmcloud-cliupdate-ibmcloud-cli).
2. Log in to the IBM Cloud CLI.
[Learn more](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-service_plans).
* Check that your user ID has permissions to launch the web UI, view or manage service keys, and view events. [Learn more](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-view_events).
* Check that the auditing instance has the export feature enabled. [Learn more](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-export_config).







 Export API 

Use ENDPOINT/v2/export?QUERY_PARAMETERS" -u SERVICE_KEY: to export events.

ENDPOINT represents the entry point to the service. Each region has a different URL. To export events from a auditing instance, see [Endpoints](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-endpoints).

QUERY_PARAMETERS are parameters that define the filtering criteria that is applied to the export request.

SERVICE_KEY is an API key that you must use to validate your credentials with the auditing instance. For more information on how to get a service key, see [Service keys by using the API](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-service_keysservice_keys_api).

The : after SERVICE_KEY is required.





 Query parameters 

You can define query parameters to refine the events that you want to export.

The following table lists the query parameters that you can set:



Query parameters

 Query parameter Type Status Description 

 from int32 Required Start time. Set as UNIX timestamp in seconds or milliseconds. 
 to int32 Required End time. Set as UNIX timestamp in seconds or milliseconds. 
 size string Optional Number of event lines to include in the export.
You will need to pass the token when you make an API call.
5. From the launched application instance, go to the Integrate and Deploy > API Information page.
6. Copy the project ID. You will specify this value as the {project_id}.

If you're using a Content Mining project, stay on the Share Link page. From the web browser's location field, copy the URL starting with /projects. For example, projects/a8ce5fed-7f33-4405-aa4b-88ffba322712/deploy/beta. The ID that is specified after the /projects/ segment of the URL is your project ID.
7. Construct a request URL by using the IDs you copied.

For example, the following request lists the collections in the project:

curl -H "Authorization: Bearer {token}" "{url}/v2/projects/{project_id}/collections?version=2019-11-29 -k"



The bearer token that is generated for an administrator can access any instance regardless of the access settings that are configured for the instance.

The bearer token expires after 12 hours. For more information about customizing the length of a session, see [Setting the idle session timeout](https://www.ibm.com/docs/SSQNUZ_4.6.x/cpd/admin/post-install-session-timeout.html).





 Next steps 

A developer can make the following enhancements:



* Use the API to [define more complex queries with the Discovery Query Language](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-query-dql-overview).
* Specify the exact document to return in response to a specific query with [curations](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-curations).
* Process documents without storing them in a collection by [using the Analyze API](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-analyzeapi).
* Check that your user ID has permissions to launch the web UI, view or manage service keys, and view logs. [Learn more](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-view_logs).
* Check that the logging instance has the export feature enabled. [Learn more](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-export_config).







 Export API 

Use ENDPOINT/v1/export?QUERY_PARAMETERS" -u SERVICE_KEY: to export logs.

ENDPOINT represents the entry point to the service. Each region has a different URL. To export logs from a logging instance, see [Endpoints](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-endpoints).

QUERY_PARAMETERS are parameters that define the filtering criteria that is applied to the export request.

SERVICE_KEY is an API key that you must use to validate your credentials with the logging instance. For more information on how to get a service key, see [Service keys by using the API](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-service_keysservice_keys_api).

Add : after SERVICE_KEY.





 Query parameters 

You can define query parameters to refine the logs that you want to export.

The following table lists the query parameters that you can set:



Query parameters

 Query parameter Type Status Description 

 from int32 Required Start time. Set as UNIX timestamp in seconds or milliseconds. 
 to int32 Required End time. Set as UNIX timestamp in seconds or milliseconds. 
 size int32 Optional Number of log lines to include in the export. 
 hosts string Optional Comma-separated list of hosts. 
 apps string Optional Comma-separated list of applications. 
 levels string Optional Comma-separated list of log levels. 
 tags string Optional Comma-separated list of tags. 
 query string Optional Search query.
Use the appropriate API version for the [kind of Kubernetes object](https://cloud.ibm.com/docs/openshift?topic=openshift-plan_deployobject) that you deploy. The API version determines the supported features for the Kubernetes object that are available to you. The name that you give in the metadata is the object's name, not its label. You use the name when interacting with your object, such as oc get deployment <name>.

apiVersion: apps/v1
kind: Deployment
metadata:
name: wasliberty





 Replica set 

To increase the availability of your app, you can specify a replica set in your deployment. In a replica set, you define how many instances of your app that you want to deploy. Replica sets are managed and monitored by your Kubernetes deployment. If one app instance goes down, Kubernetes automatically spins up a new instance of your app to maintain the specified number of app instances.

spec:
replicas: 3





 Labels 

With [labels](https://cloud.ibm.com/docs/openshift?topic=openshift-plan_deploydeploy_organize), you can mark different types of resources in your cluster with the same key: value pair. Then, you can specify the selector to match the label so that you can build upon these other resources. If you plan to expose your app publicly, you must use a label that matches the selector that you specify in the service. In the example, the deployment spec uses the template that matches the label app: wasliberty.

You can retrieve objects that are labeled in your cluster, such as to see staging or production components. For example, list all resources with an env: production label across all namespaces in the cluster. Note: You need access to all namespaces to run this command.

oc get all -l env=production --all-namespaces



* For more information about labels, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/).
* Enter the Number of worker nodes to create a contract for the initial reservation. You can add contracts for additional worker nodes later.



6. Fill out the Reservation details. For more information about the discounts, see [Billing and discounts](https://cloud.ibm.com/docs/containers?topic=containers-reservationsri-about-billing).



* Contract length: Choose between 1 or 3 years for the initial contract duration. You can add contracts for additional durations later.
* Start date: Choose the date that the contract and billing begin, at 00:00 UTC regardless of your time zone. The contract ends 1 or 3 years after the date that you select, such as 15 December 2020 - 15 December 2021. You can select a future date, but you can't create worker nodes that use the reservation until that date begins.
* Reservation name: Give your reservation a name. This name is used to generate names for all the associated contracts, which appear in your billing and usage reports. Consider including brief details on the location and flavor to help when selecting the reservation to create worker pools later.



7. In the Summary pane, review the order summary and then click Create. Your reservation is created with the initial contract for worker nodes.
8. Optional: To add more capacity to your reservation, you can create more contracts.



1. From the [IBM Cloud Kubernetes Service reservations console](https://cloud.ibm.com/kubernetes/reservations), click your reservation.
2. In the Contracts section, click Add+.
3. Select the Number of worker nodes, Contract length, and Start date for the contract.
4. In the Summary pane, review the order summary and then click Create. Your contract is added to the reservation and becomes available to use to provision worker nodes on the start date.





Your reservation is created!
Keep in mind that you can't change the flavor for the reservation later.
* Enter the Number of worker nodes to create a contract for the initial reservation. You can add contracts for additional worker nodes later.



6. Fill out the Reservation details. For more information about the discounts, see [Billing and discounts](https://cloud.ibm.com/docs/openshift?topic=openshift-reservationsri-about-billing).



* Contract length: Choose between 1 or 3 years for the initial contract duration. You can add contracts for additional durations later.
* Start date: Choose the date that the contract and billing begin, at 00:00 UTC regardless of your time zone. The contract ends 1 or 3 years after the date that you select, such as 15 December 2020 - 15 December 2021. You can select a future date, but you can't create worker nodes that use the reservation until that date begins.
* Reservation name: Give your reservation a name. This name is used to generate names for all the associated contracts, which appear in your billing and usage reports. Consider including brief details on the location and flavor to help when selecting the reservation to create worker pools later.



7. In the Summary pane, review the order summary and then click Create. Your reservation is created with the initial contract for worker nodes.
8. Optional: To add more capacity to your reservation, you can create more contracts.



1. From the [Red Hat OpenShift on IBM Cloud reservations console](https://cloud.ibm.com/kubernetes/reservations), click your reservation.
2. In the Contracts section, click Add+.
3. Select the Number of worker nodes, Contract length, and Start date for the contract.
4. In the Summary pane, review the order summary and then click Create. Your contract is added to the reservation and becomes available to use to provision worker nodes on the start date.





Your reservation is created!
Now that Discovery knows more about the structure of the document, we can split the single 99-page document into more documents. Remember, only one passage was returned for each query that you submitted before. If we split the document into multiple segments, Discovery can return the best passages from across all of the document segments.

When you split a document, you turn one document into many documents. Be aware of the document limits for your plan type. Each document segment that is generated by splitting a document counts toward the plan's document limit.

When you annotated the document, you identified the subtitle field. These subtitles are a good marker from which each new document segment can begin.



1. From the Improve query results by splitting your documents section of the Manage fields page, click Split document.
2. Select subtitle from the Split document on each occurrence of field.

Zoom

![Shows the subtitle field that is being selected from the split document field](https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/discovery-data/images/tut-sdu-split-doc.png)

Figure 24. Choosing to split documents on the subtitle field
3. Click Apply changes and reprocess.

A notification is displayed to indicate that the collection was updated. You remain on the Manage fields page, but the Apply changes and reprocess button is disabled.
4. Click Activity from the page header to return to the Activity page where you can monitor the progress of the change you made.



When no documents are processing, document splitting is finished.

For more information about splitting documents, see [Split documents to make query results more succinct](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-split-documents).





 Step 8: Test the project again 

Let's find out whether we improved the search function by adding a user-trained SDU model for the document. To do so, let's retest the project.
You can retrieve the details a placement group in your IBM Cloud VPC by using the command-line interface (CLI).

To retrieve the details of a placement group by using the CLI, use the ibmcloud is placement-group command. Specify the placement group ID.

The following example retrieves the details for a placement group named PLACEMENT_GROUP.

ibmcloud is placement-group PLACEMENT_GROUP --output JSON





 Viewing placement group details with the API 

You can view details about a placement group, such as the placement group name, assigned resource group, placement group ID, location, date placement group was created, and the specified placement group strategy.

The following example retrieves a single placement group that is specified by the identifier in the URL.

curl -X GET "$vpc_api_endpoint/v1/placement_groups/$id?version=2021-04-20&generation=2" -H "Authorization: $iam_token"





 Viewing placement group details with Terraform 

You can view details about a placement group, such as the placement group name, assigned resource group, placement group ID, location, date placement group was created, and the specified placement group strategy.

You can retrieve the details a placement group in your IBM Cloud VPC by using Terraform.

The following example retrieves details for a single placement group with an ID of ibm_is_placement_group.is_placement_group.name.

data "ibm_is_placement_group" "d_is_placement_group" {
name = ibm_is_placement_group.is_placement_group.name
}
For more information about how to label data by using either the API or from the Discovery product user interface, see [Labeling data](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-information-securitylabeling).

Customer data can be deleted by using the API. For more information about deleting customer data, see [Deleting labeled data](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-information-securitydeletingdata).

Experimental and beta features are not intended for use with a production environment and are not guaranteed to function as expected when you label and delete thier associated data. Do not use experimental and beta features when you implement a solution that requires the labeling and deletion of data.





 Methods that support labeling data 

The following stored information can be deleted by using a customer_id if the customer_id was specified when the information was originally added by using the associated method:



* Curations (/v2/projects/{project_id}/curations) Only available for natural_language_query query types.
* Documents (/v2/projects/{project_id}/collections/{collection_id}/documents)
* Notices (/v2/projects/{project_id}/notices) Only ingestion notices are labeled.
* Training data (/v2/projects/{project_id}/training_data/queries)
* Dictionaries (Only when created in the Discovery product user interface)
* Exported documents (Only when created in the Content Mining application)
* Reports (Only when created in the Content Mining application)



Exported documents and reports can be viewed in the Repository and Report pages of the Content Mining application. They are not available by using the API.

Discovery does not log query request data.

For more information about the options for labeling data in Discovery, see [Labeling data](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-information-securitylabeling).

The following stored information is not explicitly labeled and cannot be deleted by specifying the customer_id. Personal Data is not supported in these fields.