vania-janet/multiturn-rag-retrieval-data huggingface dataset:
If you are using the [IBM public GitHub repository](https://github.com/IBM/ibm-spectrum-scale-ibm-cloud-schematics), you do not need to provide it.



 Listing available workspaces 

You can list the workspaces in your account by using the following command:

ibmcloud schematics workspace list

Example response with workspace details:

Name           ID       Description           Status         Frozen
spectrum-scale-test   us-east.workspace.hpcc-scale-test.7cbc3f6b      Sample workspace      INACTIVE   False





 Retrieving workspace details 

You can retrieve the details of an existing workspace, including the values of all input variables, by running the following command:

ibmcloud schematics workspace get --id WORKSPACE_ID [--output OUTPUT]





 Updating a workspace 

You can update the details for an existing workspace, such as the workspace name, variables, or source control URL by running the following command:

ibmcloud schematics workspace update --id WORKSPACE_ID --file FILE_NAME [--github-token GITHUB_TOKEN]

To provision or modify IBM Cloud resources, you can run the command ibmcloud schematics plan command. For more information, see the [IBM Cloud Schematics CLI](https://cloud.ibm.com/docs/hpc-spectrum-scale?topic=schematics-schematics-cli-referenceschematics-plan) reference.







 Next steps 

After you've successfully created a workspace, you can begin [Generating a plan](https://cloud.ibm.com/docs/hpc-spectrum-scale?topic=hpc-spectrum-scale-generate-plan&interface=cli) to validate all of the configuration properties.





 Before you begin 

Before you get started, make sure that you've completed the prerequisites found in [Setting up the IBM Cloud Schematics API](https://cloud.ibm.com/docs/hpc-spectrum-scale?topic=hpc-spectrum-scale-setting-up-api).





 Creating a workspace using the API
ibmcloud schematics logs --id <workspace_id> --act-id <Job_id>









 Creating and viewing the detect drift through API 

Review the CURL commands to create and view the drift through API.



1. Retrieve your IAM access [steps](https://cloud.ibm.com/docs/schematics?topic=schematics-setup-apics_api) to authenticate with the IBM Cloud Schematics.
2. [Create the workspace](https://cloud.ibm.com/apidocs/schematics/schematicscreate-workspace). As part of the payload you need to add the following drift configuration.

{
commands: [
{
command: 'drift',
command_name: 'drift command',
command_desc: 'command to detect drift in workspace resources',
},
],
operation_name: 'drift',
description: 'command to detect drift in workspace resources',
}
3. [Get the workspace details](https://cloud.ibm.com/apidocs/schematics/schematicsget-workspace).
4. Run the [Schematics job plan](https://cloud.ibm.com/apidocs/schematics/schematicsplan-workspace-command).
5. Fetch the [ibmcloud schematics job logs](https://cloud.ibm.com/apidocs/schematics/schematicsget-template-activity-log).
6. Run the [ibmcloud schematics apply](https://cloud.ibm.com/apidocs/schematics/schematicsapply-workspace-command).
7. Run the [ibmcloud schematics job run](https://cloud.ibm.com/apidocs/schematics/schematicsrun-workspace-commands) to create a job in Schematics Workspace.
8.
* ibmcloud is instance-template-create my-template-name 72b27b5c-f4b0-48bb-b954-5becc7c1dcb8 us-south-1 bx2-2x8 72b27b5c-f4b0-48bb-b954-5becc7c1dcb8 --image r123-72b27b5c-f4b0-48bb-b954-5becc7c1dcb8 --network-interface '[{"name": "secondary-nic", "allow_ip_spoofing": true, "subnet": {"id":"72b27b5c-f4b0-48bb-b954-5becc7c1dcb3"}, "security_groups": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}, {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb3"}]}]' Create instance template that is attached to secondary network interface.
4. Reference a resource from your collection in your playbook. For more information, see the [Ansible documentation](https://docs.ansible.com/ansible/2.9/user_guide/collections_using.htmlusing-collections-in-a-playbook)







 Preparing your Ansible playbook to run in Schematics 

To prepare your Ansible playbook for Schematics, review the following considerations.



* Your Ansible playbook must be stored in a GitHub or GitLab repository.
* You are limited in how you can specify the target hosts for your Ansible resource inventory. For more information, see [Creating resource inventories for Schematics Actions](https://cloud.ibm.com/docs/schematics?topic=schematics-inventories-setup).
* All playbooks must be compatible to run with an Ansible version that is supported in Schematics. To find supported versions run [ibmcloud schematics version](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-referenceschematics-version) command.
* Optionally, to explore Ansible playbook capabilities in Schematics. You can try to use one of the [IBM-provided Ansible playbooks](https://github.com/Cloud-Schematics?q=topic%3Aansible-playbook).
Enter a name for the facet, and then create a dictionary of the terms that you want to categorize.

After you save the dictionary, the name that you used for the facet label is shown in the list of facets.
4. As you test the facet, you can add more terms to the dictionary you created by selecting Teach domain concepts > Dictionaries.

The dictionary that you created is shown in the list on the Dictionaries page. For more information, see [Dictionaries](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-domain-dictionary).







 Creating a facet by identifying a pattern 

Patterns is a beta feature and supports English language documents only.

IBM Cloud

IBM Cloud only

This facet is available only to managed deployments and in Document Retrieval and Conversational Search projects.

The Patterns feature uses pattern induction to help you teach Discovery to recognize patterns in your data. Pattern induction generates extraction patterns from examples that you provide. After you specify a few examples, Discovery suggests more rules that you must verify to complete the pattern.

Pattern recognition works best on text with consistent structure in casing, length, text, or numeric values. Examples of patterns you can teach Discovery to identify in your documents:



* All ISO standard numbers, for example ISO 45001, ISO 22000
* All currency amounts, for example $50.5 million, 29 dollars, $29.00
* All dates, for example 8 September 2019, June 12, 2020



If you need to identify specific terms or text, create a facet as part of a dictionary entry instead. For example, use a dictionary facet for grouping the following types of information:



* All products in the same family, Cloud Pak for Data, Cloud Pak for Automation, Cloud Pak for Security
* All terms in the same category, carburetor, piston, valves



For more information, see [Creating a facet by creating a dictionary](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-facetsfacetdict).

To add a facet by identifying a pattern, complete the following steps:



1.
* UI
* CLI
* API







 Creating a routing table 

Create a routing table to define rules to forward network traffic along the best path toward its destination. For example, a routing table provides information for sending a data packet to the next hop on its route across the network.



 Before you begin 

Before creating a routing table, ensure that you have at least one VPC and review and adhere to routing table [limitations and guidelines](https://cloud.ibm.com/docs/vpc?topic=vpc-about-custom-routes&interface=uilimitations-custom-routes).

You can create a routing table for an IBM Cloud service by using the UI, CLI, or API.





 Creating a routing table in the UI 

To create a routing table in the UI, follow these steps:



1. From the [IBM Cloud console](https://cloud.ibm.com/login), select the Navigation Menu ![Navigation Menu](https://cloud.ibm.com/docs-content/v1/content/f02b9c9adcbb7328d95a45e105cec371d50f15eb/vpc//images/menu_icon.png), then click VPC Infrastructure > Routing tables in the Network section. The Routing tables for VPC page appears.
2. Click Create in the upper right of the page.
3. In the Routing table for VPC provisioning page, complete the following information:



* Enter a unique name for your routing table.
* Select the Virtual Private Cloud that you want to associate with the routing table.
* Select a traffic type and optional traffic source:



* Egress (default) - Optionally, select to accept traffic from an IBM Cloud VPN server or VPN gateway.

Selecting VPN server allows VPN server resources to create routes in this routing table.
* Ingress - Ingress options are available for use on one routing table per VPC. You must choose at least one of the following traffic sources to enable ingress routing.
Observability 



Observability Terraform templates to provision resource using Schematics workspace

 Template Description Provision 

 [Observability service instance](https://github.com/Cloud-Schematics/terraform-ibm-observability) Provision an instance of all the Observability services on IBM Cloud such as IBM Cloud Log Analysis, IBM Cloud Monitoring, and IBM Cloud Activity Tracker in your account. ![Auto deployment button](https://cloud.ibm.com/docs-content/v1/content/4cd6263f39a034d265ddb4b0a5e6d50c55d13ee8/ibm-cloud-provider-for-terraform/images/autodeploy_button.png)[Deploy to IBM Cloud](https://cloud.ibm.com/schematics/workspaces/create?repository=https://github.com/Cloud-Schematics/terraform-ibm-observability&terraform_version=terraform_v0.13) <br> 
 [Observability agents for Kubernetes cluster](https://github.com/Cloud-Schematics/iks-logging-and-monitoring) Deploy logging and monitoring agents onto your existing IBM Cloud Kubernetes Service cluster on VPC. ![Auto deployment button](https://cloud.ibm.com/docs-content/v1/content/4cd6263f39a034d265ddb4b0a5e6d50c55d13ee8/ibm-cloud-provider-for-terraform/images/autodeploy_button.png)[Deploy to IBM Cloud](https://cloud.ibm.com/schematics/workspaces/create?repository=https://github.com/Cloud-Schematics/iks-logging-and-monitoring&terraform_version=terraform_v0.13) <br>
If you are using the [IBM Cloud public GitHub repository](https://github.com/IBM-Cloud/hpc-cluster-lsf), you do not need to provide it.



 Listing available workspaces 

You can list the workspaces in your account by using the following command:

ibmcloud schematics workspace list

Example response with workspace details:

Name           ID       Description           Status         Frozen
spectrum-lsf-test   us-east.workspace.bcc-lsf-test.7cbc3f6b      Sample workspace      INACTIVE   False





 Retrieving workspace details 

You can retrieve the details of an existing workspace, including the values of all input variables, by running the following command:

ibmcloud schematics workspace get --id WORKSPACE_ID [--output OUTPUT]





 Updating a workspace 

You can update the details for an existing workspace, such as the workspace name, variables, or source control URL by running the following command:

ibmcloud schematics workspace update --id WORKSPACE_ID --file FILE_NAME [--github-token GITHUB_TOKEN]

To provision or modify IBM Cloud resources, you can run the command ibmcloud schematics plan command. For more information, see the [IBM Cloud Schematics CLI](https://cloud.ibm.com/docs/ibm-spectrum-lsf?topic=ibm-spectrum-lsf-schematics-cli-referenceschematics-plan) reference.







 Next steps 

After you've successfully created a workspace, you can begin [Generating a plan](https://cloud.ibm.com/docs/ibm-spectrum-lsf?topic=ibm-spectrum-lsf-generate-plan&interface=cli) to validate all of the configuration properties.





 Before you begin 

Before you get started, make sure that you've completed the prerequisites found in [Setting up the IBM Cloud Schematics API](https://cloud.ibm.com/docs/ibm-spectrum-lsf?topic=ibm-spectrum-lsf-setting-up-api).
(https://cloud.ibm.com/docs/schematics?topic=schematics-secure-datapi-location).

IBM Cloud Schematics deprecates older version of Terraform. For more information, see [Deprecating older version of Terraform process in IBM Cloud Schematics](https://cloud.ibm.com/docs/schematics?topic=schematics-deprecate-tf-version).

Syntax

ibmcloud schematics workspace new --file FILE_NAME --state STATE_FILE_PATH [--agent-id AGENT_ID] [--github-token GITHUB_TOKEN] [--output OUTPUT] [--json]

Command options



Schematics Workspaces create flags

 Flag Required / Optional Description 

 --file or -f Optional The relative path to a JSON file on your local machine that is used to configure your workspace. For more information about the sample JSON file with the details, see [JSON file create template](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-referencejson-file-create-template). 
 --state Optional The relative path to an existing Terraform state file on your local machine. To create the Terraform state file: 1. Show the content of an existing Terraform state file by using the [ibmcloud schematics state pull](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-referencestate-pull) command. 2. Copy the content of the state file from your command-line output in to a file on your local machine that is named terraform.tfstate. 3. Use the relative path to the file in the --state command parameter. 
 --github-token or -g Optional Enter the functional personal access tokens for HTTPS Git operations. For example, --github-token ${FUNCTIONAL_GIT_KEY}.
* [Destroying workspace resources using the API](https://cloud.ibm.com/docs/schematics?topic=schematics-sch-destroy-wksdestroy-wks-api)



* [Verifying a workspace destroy operation](https://cloud.ibm.com/docs/schematics?topic=schematics-sch-destroy-wksverify-workspace-destroy-api)



* [destroying workspace resources with Terraform](https://cloud.ibm.com/docs/schematics?topic=schematics-sch-destroy-wksdestroy-wks-terraform)
* [Next steps](https://cloud.ibm.com/docs/schematics?topic=schematics-sch-destroy-wkssch-destroy-wks-nextsteps)









 Managing Actions 

[Creating Ansible roles and galaxy](https://cloud.ibm.com/docs/schematics?topic=schematics-ansible-roles-galaxyansible-roles-galaxy)



* [Creating your own roles in Ansible](https://cloud.ibm.com/docs/schematics?topic=schematics-ansible-roles-galaxymain-file)
* [Installing roles from Ansible Galaxy](https://cloud.ibm.com/docs/schematics?topic=schematics-ansible-roles-galaxyrequirements-file)



[Working with Schematics Actions](https://cloud.ibm.com/docs/schematics?topic=schematics-action-workingaction-working)



* [Creating and running a Schematics action](https://cloud.ibm.com/docs/schematics?topic=schematics-action-workingcreate-action)



* [Prerequisites](https://cloud.ibm.com/docs/schematics?topic=schematics-action-workingaction-working-prereq)
Make sure that the JSON file follows the structure as outlined in this command. Also ensure the location and the url endpoint are pointing to the same region when you create or update workspaces and actions. For more information about location and endpoint, see [Where is my information stored?](https://cloud.ibm.com/docs/schematics?topic=schematics-secure-datapi-location).

IBM Cloud Schematics deprecates older version of Terraform. For more information, see [Deprecating older version of Terraform process in IBM Cloud Schematics](https://cloud.ibm.com/docs/schematics?topic=schematics-deprecate-tf-version).

Syntax

ibmcloud schematics workspace new --file FILE_NAME --state STATE_FILE_PATH [--agent-id AGENT_ID] [--github-token GITHUB_TOKEN] [--output OUTPUT] [--json]

Command options



Schematics Workspaces create flags

 Flag Required / Optional Description 

 --file or -f Optional The relative path to a JSON file on your local machine that is used to configure your workspace. For more information about the sample JSON file with the details, see [JSON file create template](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-referencejson-file-create-template). 
 --state Optional The relative path to an existing Terraform state file on your local machine. To create the Terraform state file: 1. Show the content of an existing Terraform state file by using the [ibmcloud schematics state pull](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-referencestate-pull) command. 2. Copy the content of the state file from your command-line output in to a file on your local machine that is named terraform.tfstate. 3.
Run the [ibmcloud schematics apply](https://cloud.ibm.com/apidocs/schematics/schematicsapply-workspace-command).
7. Run the [ibmcloud schematics job run](https://cloud.ibm.com/apidocs/schematics/schematicsrun-workspace-commands) to create a job in Schematics Workspace.
8. Run the [ibmcloud schematics workspace action](https://cloud.ibm.com/apidocs/schematics/schematicscreate-job) to retrieve all activities of your workspace.
9. Fetch the [ibmcloud schematics job logs](https://cloud.ibm.com/apidocs/schematics/schematicsget-template-activity-log).
"url": "<gitrepo-url>"
},
"workspace_status": {
"frozen": true
},
"template_data": [{
"folder": ".",
"type": "terraform_v1.0",
"variablestore": {
"name": "sample_var",
"secure": true,
"value": "THIS IS IBM CLOUD TERRAFORM CLI DEMO",
"description": "Description of sample_var"
},
{
"name": "sleepy_time",
"value": "15"
}
]
}]
}
3. See [Managing IBM Cloud resources with Schematics](https://cloud.ibm.com/docs/schematics?topic=schematics-manage-lifecycle) to create, update, or delete IBM Cloud resources with Terraform.





 Verifying workspace plan execution 

Verify that the workspace plan is successfully listed with the list of workspace jobs that were created.

curl -X GET https://schematics.cloud.ibm.com/v1/workspaces -H "Authorization: <iam_access_token>"

Output

{
"activityid": "3815ef757cd34030bc43191f7d7c6744"
}

On successful, returns the list of the workspace.

For more information, see [FAQ](https://cloud.ibm.com/docs/schematics?topic=schematics-workspaces-faq), and [troubleshooting section](https://cloud.ibm.com/docs/schematics?topic=schematics-wks-create-api).







 Generating a workspace plan using Terraform 



1.
* @see com.ibm.avatar.api.udf.TableUDFBaseinitState() for detailed description
/
@Override
public void initState () throws TableUDFException
{
// Create accessors to do the work of copying fields from input tuples to output tuples
AbstractTupleSchema arg1Schema = getRuntimeArgSchema ().getFieldTypeByIx (0).getRecordSchema ();
AbstractTupleSchema arg2Schema = getRuntimeArgSchema ().getFieldTypeByIx (1).getRecordSchema ();
TupleSchema retSchema = getReturnTupleSchema ();

// Create offsets tables for a straightforward copy.
String[] srcs1 = new String[arg1Schema.size ()];
String[] dests1 = new String[arg1Schema.size ()];
String[] srcs2 = new String[arg2Schema.size ()];
String[] dests2 = new String[arg2Schema.size ()];

for (int i = 0; i < srcs1.length; i++) {
srcs1[i] = arg1Schema.getFieldNameByIx (i);
dests1[i] = retSchema.getFieldNameByIx (i);
}
for (int i = 0; i < srcs2.length; i++) {
srcs2[i] = arg2Schema.getFieldNameByIx (i);
dests2[i] = retSchema.getFieldNameByIx (i + srcs1.length);
}

arg1Copier = retSchema.fieldCopier (arg1Schema, srcs1, dests1);
arg2Copier = retSchema.fieldCopier (arg2Schema, srcs2, dests2);
}

/
<-- </ol> --><-- </section "id="section-cloudant_action_individual_doc" "> --><-- <section "id="section-cloudant_sequence_read" "> --> Create a sequence with the read action The read action can be composed with your docChange action to create an action sequence. ibmcloud fn action create docSequence --sequence /_/myCloudant/read,docChange
The following example shows possible output for the action create command. ok: created action docSequence
<-- </section "id="section-cloudant_sequence_read" "> --><-- <section "id="section-cloudant_trigger_change" "> --> Create a trigger with changes feed ibmcloud fn trigger create docTrigger --feed /_/myCloudant/changes --param dbname test
<-- </section "id="section-cloudant_trigger_change" "> --><-- <section "id="section-cloudant_rule_trigger" "> --> Create a rule to associate the trigger with the sequence The action docSequence can be used in a rule that activates the action on new IBM Cloudant trigger events. ibmcloud fn rule create docRule docTrigger docSequence
The following example shows possible output for the rule create command. ok: created rule docRule
The following example shows possible output from the action activation. "{"statusCode":0,"success":true,"activationId":"144a4f95198a49ec8a4f95198a79ecc8","rule":"<namespace_ID>/docRule","action":"<namespace_ID>/docSequence"}"
<-- </section "id="section-cloudant_rule_trigger" "> --><-- <section "id="section-cloudant_test_sequence" "> --> Test the sequence <-- <ol> -->1.
PUT /_replicator/{doc_id} <br>[Cloudant](https://cloud.ibm.com/apidocs/cloudantputreplicationdocument), [CouchDB](https://docs.couchdb.org/en/latest/replication/replicator.html) Trigger a replication. <br>IBM Cloudant documentation references more request body fields (selector, since_seq). 
 DELETE /_replicator <br>[Cloudant](https://cloud.ibm.com/apidocs/cloudantdeletereplicationdocument), [CouchDB](https://docs.couchdb.org/en/latest/replication/replicator.html) Cancel an ongoing replication. <br>IBM Cloudant documentation references more request body fields (selector, since_seq). 
 GET /_scheduler/docs <br>[Cloudant](https://cloud.ibm.com/apidocs/cloudantgetschedulerdocs), [CouchDB](https://docs.couchdb.org/en/latest/api/server/common.htmlscheduler-docs) Monitor the status of a replication that is described by a replication document. 
 HEAD /_scheduler/docs <br>[CouchDB](https://docs.couchdb.org/en/latest/api/server/common.htmlscheduler-docs) Retrieve the HTTP headers for the status of a replication that is described by a replication document. 
 GET /_scheduler/docs/_replicator/$doc_id <br>[Cloudant](https://cloud.ibm.com/apidocs/cloudantgetschedulerdocument), [CouchDB](https://docs.couchdb.org/en/latest/replication/replicator.html) Retrieve a replication scheduler document. 
 HEAD /_scheduler/docs/_replicator/$doc_id <br>[CouchDB](https://docs.couchdb.org/en/latest/replication/replicator.html) Retrieve the HTTP headers for a particular replication scheduler document.
Adding facets 

To help you analyze the results of linguistic processing and text analysis, Discovery organizes and classifies documents that share similar patterns or content.

Facets help you to filter documents so that you can perform deep analysis faster. Whether you are trying to find the proverbial needle in the haystack or to discover unexpected trends, starting with facets can speed up the research process.



* For Content Mining projects, facets are extracted from your collection based on parts of speech information (that is captured by the Part of Speech enrichment that is applied to projects of this type by default). You can also view facets that are derived from metadata in your documents.

Zoom

![Default facets in Content Mining projects](https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/discovery-data/images/cmdeffacetsnhtsa.png)

Figure 1. Extracted facets
* For Document Retrieval projects, facets are extracted from your collection based on recognized entities (that are captured by the Entities enrichment that is applied to projects of this type by default).

Zoom

![Watson Discovery "Customize display" section](https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/discovery-data/images/drdeffacets2.png)

Figure 2. Top Entities facet



For more information about the Entities and Part of Speech enrichments, see [Applying prebuilt enrichments](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-nlu). For more information about the enrichments that are applied to projects by default, see [Default project settings](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-project-defaults).



 Creating facets