vania-janet/multiturn-rag-retrieval-data huggingface dataset:
updateOptions.SetRev(revision)
_, response, _ := service.ReplaceOffering(updateOptions)
fmt.Println(response)

vcatalogID = "{catalogID}";
offeringID = "{offeringID}";
revision = "{revision}";
label = "{label}";
shortDesc = "{shortDesc}";
response = await service.replaceOffering({'catalogIdentifier': catalogID, 'offeringId': offeringID, 'id': offeringID, 'rev': revision, 'label': label, 'shortDescription': shortDesc});
console.log(response);





 Update an existing version by using Terraform 

Use the following steps to update an existing version of your software by using Terraform.



1. Create an argument in your main.tf file. The following example accesses the software version by using the cm_version resource, where offering_id identifies the software.

resource "cm_version" "cm_version" {
catalog_identifier = "catalog_identifier"
offering_id = "offering_id"
zipurl = "zipurl"
}

For more information, see the argument reference details on the [Terraform Catalog Management](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/cm_version) 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.
If you have custom language or custom acoustic models that are based on these models, you must upgrade your existing custom models to take advantage of the updates by using the following methods:



* POST /v1/customizations/{customization_id}/upgrade_model
* POST /v1/acoustic_customizations/{customization_id}/upgrade_model



For more information, see [Upgrading custom models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-upgrade).

The split_transcript_at_phrase_end parameter is now generally available for all languages
: The speech recognition parameter split_transcript_at_phrase_end is now generally available for all languages. Previously, it was generally available only for US and UK English. For more information, see [Split transcript at phrase end](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-parsingsplit-transcript).

Hesitation marker for German has changed
: The hesitation marker that is used for the updated German broadband and narrowband models has changed from [hesitation] to %HESITATION. For more information about hesitation markers, see [Speech hesitations and hesitation markers](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-basic-responseresponse-hesitation).

Defect fix: Address latency issue for models with large numbers of grammars
: Defect fix: The service no longer has a latency issue for custom language models that contain a large number of grammars. When initially used for speech recognition, such custom models could take multiple seconds to load. The custom models now load much faster, greatly reducing latency when they are used for recognition.





 15 July 2020 (Version 1.1.4) 

Red Hat OpenShift version 4.3 is going out of service
: IBM Cloud Pak for Data 3.0.1 is deprecating support for Red Hat OpenShift 4.3 on 1 September 2020. Red Hat OpenShift 4.3 is going out of service on 22 October 2020.
After deployment completes, the status changes to "available" if the deployment was successful, or "error" if problems occurred.

Once available, make a note of the model ID (model_id).







 What to do next 

To use the model, you must export the model, and then import it into Discovery.



1. Select the Rule-based Model > Versions > Rule-based Model tab.
2. Click Export current model.

If you have a Lite plan subscription, no export option is available.

The model is saved as a PEAR file, and you are prompted to download the file. A PEAR (Processing Engine ARchive) file is the UIMA standard packaging format for UIMA components. The model is saved in PEAR format so it can be distributed and reused within UIMA applications.
3. Download the file to your local system.
4. From the Discovery service, follow the steps to create a Machine Learning enrichment, which include uploading the PEAR file. For more details, see [Machine Learning models](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-domainmachinelearning) in the Discovery v2 documentation.



If you're using a Discovery v1 service instance, you must provide the model ID when it is requested during the Discovery service enrichment configuration process. For more information, see [Integrating your custom model with the Discovery tooling](https://cloud.ibm.com/docs/discovery?topic=discovery-integrating-with-wksintegrate-customtooling) in the Discovery v1 documentation.







 Deploying a rule-based model to IBM Watson Natural Language Understanding 

Uploading an advanced rules model to Natural Language Understanding is deprecated. As of June 10, 2021, you will not be able to deploy advanced rules models to Natural Language Understanding.

Deploy the rule-based model to enable an application that uses the Natural Language Understanding service to use the model to find and extract entities that are relevant to your domain.
* POST /v1/customizations/{customization_id}/upgrade_model
* POST /v1/acoustic_customizations/{customization_id}/upgrade_model



For more information, see [Upgrading custom models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-upgrade).

The version parameter renamed to base_model_version
: The version parameter of the following methods is now named base_model_version:



* /v1/recognize for WebSocket requests
* POST /v1/recognize for sessionless HTTP requests
* POST /v1/sessions for session-based HTTP requests
* POST /v1/recognitions for asynchronous HTTP requests



The base_model_version parameter specifies the version of a base model that is to be used for speech recognition. For more information, see [Using upgraded custom models for speech recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-upgrade-use) and [Making speech recognition requests with upgraded custom models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-upgrade-usecustom-upgrade-use-recognition).

New support for smart formatting for Spanish speech recognition
: Smart formatting is now supported for Spanish as well as US English. For US English, the feature also now converts keyword strings into punctuation symbols for periods, commas, question marks, and exclamation points. For more information, see [Smart formatting](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formattingsmart-formatting).





 1 March 2018 

Updates to French and Spanish broadband models for improved speech recognition
: The French and Spanish broadband models, fr-FR_BroadbandModel and es-ES_BroadbandModel, have been updated for improved speech recognition. By default, the service automatically uses the updated models for all recognition requests.
update-entity Action username, password, iam_access_token, iam_apikey, iam_url, headers, headers[X-Watson-Learning-Opt-Out], url, workspace_id, entity, new_entity, new_description, new_metadata, new_fuzzy_match, new_values Update an entity. 
 create-value Action username, password, iam_access_token, iam_apikey, iam_url, headers, headers[X-Watson-Learning-Opt-Out], url, workspace_id, entity, value, metadata, synonyms, patterns, value_type Add an entity value. 
 delete-value Action username, password, iam_access_token, iam_apikey, iam_url, headers, headers[X-Watson-Learning-Opt-Out], url, workspace_id, entity, value Delete an entity value. 
 get-value Action username, password, iam_access_token, iam_apikey, iam_url, headers, headers[X-Watson-Learning-Opt-Out], url, workspace_id, entity, value, export, include_audit Get an entity value. 
 list-values Action username, password, iam_access_token, iam_apikey, iam_url, headers, headers[X-Watson-Learning-Opt-Out], url, workspace_id, entity, export, page_limit, include_count, sort, cursor, include_audit List entity values. 
 update-value Action username, password, iam_access_token, iam_apikey, iam_url, headers, headers[X-Watson-Learning-Opt-Out], url, workspace_id, entity, value, new_value, new_metadata, new_type, new_synonyms, new_patterns Update an entity value.
Note: Each version can be deployed to only one service instance. If you want to deploy the same model to more than one instance, create a version for each instance.
4. Click Deploy, choose to deploy it to Natural Language Understanding, and then click Next.
5. Provide the IBM Cloud space and instance. If necessary, select a different region.
6. Click Deploy.
7. The deployment process might take a few minutes. To check the status of the deployment, click Status on the Versions tab next to the version that you deployed.

If the model is still being deployed, the status indicates "publishing". After deployment completes, the status changes to "available" if the deployment was successful, or "error" if problems occurred.

Once available, make a note of the model ID (model_id). You will provide this ID to the Natural Language Understanding service to enable the service to use your custom model.







 What to do next 

To use the deployed model, you must specify the model ID of your custom model in the entities.model parameter.

You can use the model with the Natural Language Understanding GET /analyze request to extract entities.

See the [Natural Language Understanding documentation](https://cloud.ibm.com/docs/natural-language-understanding) for more details.







 Undeploying models 

If you want to undeploy a model or find a model ID, view the Deployed Models page.



 Procedure 

To undeploy models or find model IDs:



1. Launch Knowledge Studio.
2. From the Settings menu in the top right menu bar, select Manage deployed models.
3. From the list of deployed models, find the model you want to view or undeploy.
4. To undeploy the model, from the last column of that row, click Undeploy model.
5. To find the model ID, see the Model ID column.



Alternatively, you can undeploy models from the Versions pages for rule-based models and machine learning models.







 Leveraging a rule-based model in IBM Watson Explorer
(Use of the max_alternatives parameter with next-generation models was previously available as an experimental feature to a limited number of customers.)

Defect fix: Update to Japanese next-generation multimedia model (upgrade required)
: Defect fix: The Japanese next-generation multimedia model, ja-JP_Multimedia, was updated to address an internal inconsistency that could cause an error during speech recognition with low latency. You need to upgrade any custom models that are based on the ja-JP_Multimedia model. For more information about upgrading custom models, see



* [Upgrading custom models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-upgrade)
* [Using upgraded custom models for speech recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-upgrade-use)



Defect fix: Add documentation guidelines for creating Japanese sounds-likes based on next-generation models
: Defect fix: In sounds-likes for Japanese custom language models that are based on next-generation models, the character-sequence ウー is ambiguous in some left contexts. Do not use characters (syllables) that end with the phoneme /o/, such as ロ and ト. In such cases, use ウウ or just ウ instead of ウー. For example, use ロウウマン or ロウマン instead of ロウーマン. For more information, see [Guidelines for Japanese](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-corporaWords-ngwordLanguages-jaJP-ng).

Defect fix: Correct use of display_as field in transcription results
: Defect fix: For language model customization with next-generation models, the value of the display_as field for a custom word now appears in all transcripts. Previously, the value of the word field sometimes appeared in transcription results.

Security vulnerabilities addressed
: The following security vulnerabilities have been fixed:
To identify the version of a model on which a custom language model is based, use the GET /v1/customizations method to list all of your custom language models or the GET /v1/customizations/{customization_id} method to list a specific custom language model. The versions field of the output shows the base model for a custom language model. For more information, see [Listing custom language models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageLanguageModelslistModels-language).

To re-create a custom language model, first create a new custom model. Then add all of the previous custom model's corpora and custom words to the new model. You can then delete the previous custom model. For more information, see [Creating a custom language model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate).





 28 October 2021 

New Chinese next-generation telephony model
: The service now offers a next-generation telephony model for Mandarin Chinese: zh-CN_Telephony. The new model supports low latency and is generally available. For more information about all available next-generation models, see [Next-generation languages and models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng).

New Australian English and UK English next-generation multimedia models
: The service now offers the following next-generation multimedia models. The new models are generally available, and neither model supports low latency.



* Australian English: en-AU_Multimedia
* UK English: en-GB_Multimedia



For more information about all available next-generation models, see [Next-generation languages and models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng).

Updates to multiple next-generation models for improved speech recognition
: The following next-generation models have been updated for improved speech recognition:
For information about uploading a dictionary enrichment .csv file, see [Dictionary](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-domain-dictionary).





 Restoring pattern enrichments 

You can restore pattern enrichment .zip files as advanced rules models .zip files by completing the following steps:



1. Open your project.
2. On the Improvement tools panel of the Improve and customize page, click Teach domain concepts, Advanced rules models, and then Upload.
3. In the Apply advanced rules model dialog box, enter a name for your .zip file, select a language, specify a result field, click Upload, and select your advanced rules models .zip file.
4. Click Create.



After you upload pattern model .zip files for recovery, you cannot use the pattern editor to further edit the .zip files.

For more information about uploading an advanced rules models .zip file, see [Advanced rules models](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-domain-mladvanced-rules).





 Restoring entity extractors 

To restore an entity extractor model, import the exported .ent file to create a new machine learning model. You cannot open the exported model in the entity extractor tool to continue working with it. However, you can import a finished model and apply it to collections as an entity extractor enrichment.

For more information about how to import an entity extractor model to create a machine learning enrichment, see [Use imported ML models to find custom terms](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-domain-ml).
Most previous-generation models were deprecated on 15 March 2022. Previously, the Arabic and Japanese models were not deprecated. Deprecation now applies to all previous-generation models.



* For more information about the next-generation models to which you can migrate from each of the deprecated models, see [Previous-generation languages and models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models)
* For more information about migrating from previous-generation to next-generation models, see [Migrating to next-generation models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-migrate).
* For more information about all next-generation models, see [Next-generation languages and models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng)



Note: When the previous-generation en-US_BroadbandModel is removed from service, the next-generation en-US_Multimedia model will become the default model for speech recognition requests.

Defect fix: Improved training time for next-generation custom language models
: Defect fix: Training time for next-generation custom language models is now significantly improved. Previously, training time took much longer than necessary, as reported for training of Japanese custom language models. The problem was corrected by an internal fix.

Defect fix: Dynamically generated grammar files now work properly
: Defect fix: Dynamically generated grammar files now work properly. Previously, dynamic grammar files could cause internal failures, as reported for integration of Speech to Text with IBM Watson® Assistant. The problem was corrected by an internal fix.





 20 January 2023 

Deprecated Arabic and United Kingdom model names are no longer available
: The following Arabic and United Kingdom model names are no longer accepted by the service:



* ar-AR_BroadbandModel - Use ar-MS_BroadbandModel instead.
* en-UK_NarrowbandModel - Use en-GB_NarrowbandModel instead.
* en-UK_BroadbandModel - Use en-GB_BroadbandModel instead.
[Export a machine learning model](https://cloud.ibm.com/docs/watson-knowledge-studio-data?topic=watson-knowledge-studio-data-publish-mlexporting-a-machine-learning-model).
2. Follow the [Customizing](https://cloud.ibm.com/docs/natural-language-understanding-data?topic=natural-language-understanding-data-customizing) instructions in the Natural Language Understanding for IBM Cloud Pak for Data documentation to create an entities model with the .zip file that you downloaded.









 Deleting a version 

If you wish to delete a specific version a same machine learning model, navigate to the Versions page and click the Delete link on the row of the version that you want to delete. Note: The Delete model version link is only active if there are no deployed models associated with it. Undeploy all associated models before deleting the a version.





 Leveraging a machine learning model in IBM Watson Explorer 

Export the trained machine learning model so it can be used in IBM Watson Explorer.



 Before you begin 

If you choose to identify relation types and annotate them, then you must define at least two relation types, and annotate instances of the relationships in the ground truth before you export the model. Defining and annotating only one relation type can cause subsequent issues in IBM Watson Explorer, release 11.0.1.0.





 About this task 

Now that the machine learning model is trained to recognize entities and relationships for a specific domain, you can leverage it in IBM Watson Explorer.

Click [this link ![External link icon](https://cloud.ibm.com/docs-content/v1/content/icons/launch-glyph.svg)](https://www.youtube.com/watch?v=1VoS-xczBow&feature=youtu.be) to watch a less than 2 minute video that illustrates how to export a model and use it in IBM Watson Explorer.





 Procedure 



1.
Add example to training data query [POST /v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples](https://cloud.ibm.com/apidocs/discoverycreatetrainingexample) [POST /v2/projects/{project_id}/training_data /queries/{query_id}](https://cloud.ibm.com/apidocs/discovery-dataupdatetrainingquery) <br>Use the Create training query method in v2 and pass all examples when you create the query. Otherwise, use the update API. 
 Delete example for training data query [DELETE /v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id}](https://cloud.ibm.com/apidocs/discoverydeletetrainingexample) [POST /v2/projects/{project_id}/training_data/ queries/{query_id}](https://cloud.ibm.com/apidocs/discovery-dataupdatetrainingquery) <br>Use the v2 training_data update method. 
 Change label or cross-reference for example [PUT /v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id}](https://cloud.ibm.com/apidocs/discoveryupdatetrainingexample) [POST /v2/projects/{project_id}/training_data/ queries/{query_id}](https://cloud.ibm.com/apidocs/discovery-dataupdatetrainingquery) <br>Use the v2 training_data update method. 
 Get details for a training data example [GET /v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id}](https://cloud.ibm.com/apidocs/discoverygettrainingexample) Not available.
Build, deploy, test and monitor a predictive machine learning model 

This tutorial may incur costs. Use the [Cost Estimator](https://cloud.ibm.com/estimator/review) to generate a cost estimate based on your projected usage.

This tutorial walks you through the process of building a predictive machine learning model, deploying the generated model as an API to be used in your applications and testing the model all of this happening in an integrated and unified self-service experience on IBM Cloud. You will then monitor the deployed model with IBM Watson OpenScale.

In this tutorial, the Iris flower data set is used for creating a machine learning model to classify species of flowers.

In the terminology of machine learning, classification is considered an instance of supervised learning, i.e. learning where a training set of correctly identified observations is available.

Watson Studio provides you with the environment and tools to solve your business problems by collaboratively working with data. You can choose the tools you need to analyze and visualize data, to cleanse and shape data, to ingest streaming data, or to create and train machine learning models.



 Objectives 



* Import data to a project.
* Build a machine learning model.
* Deploy the model and try out the API.
* Test a machine learning model.
* Monitor the deployed model
* Retrain your model.



Zoom

![Architecture Diagram](https://cloud.ibm.com/docs-content/v1/content/f84e2238288b7f0355715a4c355609ce7ac48fb0/solution-tutorials/images/solution22-build-machine-learning-model/architecture_diagram.png)

Figure 1. Architecture diagram of the tutorial



1. The admin uploads a CSV file from a local machine.
2. The uploaded CSV file is stored in IBM Cloud Object Storage service as a dataset.
3. The dataset is then used to build and deploy a machine learning model. The deployed model is exposed as an API (scoring-endpoint).
4.
To update an NLB by with the API, perform the following procedure:



1. Set up your [API environment](https://cloud.ibm.com/docs/vpc?topic=vpc-set-up-environmentapi-prerequisites-setup).
2. Use the following example to get the listener ID that you need for the update:

Save the ID of the load balancer

export lbid="0738-dd754295-e9e0-4c9d-bf6c-58fbc59e5727"

curl -H "Authorization: $iam_token" -X GET
"$vpc_api_endpoint/v1/load_balancers/$lbid?version=$api_version&generation=2"

Sample output:

{
"created_at": "2020-08-24T23:36:22.990359Z",
"crn": "crn:v1:bluemix:public:is:eu-gb-3:a/be636a7a6e4d4b6296bedf669ce8f88::load-balancer:r018-808fedde-2650-46cc-9cd1-4b828b92970a",
"hostname": "808fedde-eu-gb.lb.appdomain.cloud",
"href": "https://eu-gb.iaas.cloud.ibm.com/v1/load_balancers/r018-808fedde-2650-46cc-9cd1-4b828b92970a",
"id": "r018-808fedde-2650-46cc-9cd1-4b828b92970a",
"is_public": true,
"listeners": [
{