vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Action events

 Action Description 

 schematics.action.create A Schematics action is created or failed to create. 
 schematics.action.delete A Schematics action was deleted or failed to delete. 
 schematics.action.read A Schematics action is viewed by a user. 
 schematics.action.update A Schematics action is updated successfully or failed to update. 







 Job events 



Job events

 Action Description 

 schematics.job.create A Schematics job is created or failed to create. 
 schematics.job.delete A Schematics job was deleted or failed to delete. 
 schematics.job.read A Schematics job is viewed by a user. 
 schematics.job.update A Schematics job is updated successfully or failed to update. 







 Shareddata events 



 Action Description 

 schematics.shareddatas.create A Schematics shared data set was created or failed to create. 
 schematics.shareddatas.delete A Schematics shared data set was deleted or failed to delete. 
 schematics.shareddatas.update A Schematics shared data set was updated or failed to updated. 
 {: caption="Shareddata events" caption-side="bottom"} 







 Other events 



Other events

 Action Description 

 schematics.credentials.ready-to-use Credentials passed by a user as a workspace variable in the Schematics API request is being sent to IBM Cloud Object Storage to complete the user’s action. 









 Viewing events 

You can monitor the Schematics through any of the following regions only:



* Dallas (us-south)
* Washington (us-east)
* Frankfurt (eu-de)
* London (eu-gb)



You must [create an Activity Tracker instance](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-provision) in Frankfurt, Dallas, or both to monitor the Schematics service.



Location of events per region

 Schematics region Activity Tracker region where events are available 

 us-south us-south 
 us-east us-south 
 eu-de eu-de
* Personal access token - <leave it blank>.
* Terraform Version - terraform_v1.0. Note that you need to select Terraform version 1.0 or greater than version.
* Click Next.



* In Workspace details section:



* Workspace name as schematics-agent-infra_workspace.
* Tags as agents-infra.
* Resource group as default or other resource group for this workspace. For more information, see [Creating a resource group](https://cloud.ibm.com/docs/account?topic=account-rgs). Ensure you have right access permission for the resource group.
* Location as North America or other [region](https://cloud.ibm.com/docs/schematics?topic=schematics-multi-region-deployment) for this workspace. If the location used for Agent infrastructure and Agent service does not match, then the logs are not sent to LogDNA.
* Click Next.
* Check the information entered are correct to create a workspace.



* Click Create.



3. On successful creation of the schematics-agent-infrastructure Workspace, review and edit the following Agent infrastructure input variables in the workspace Settings page.

The Agent infrastructure workspace and the Agent infrastructure need not have the same input values for the Resource Group, Location, and Tags.



Schematics Agents infrastructure inputs

 Input variable Data type Required/Optional Description 

 agent_prefix String Required Provide the prefix that is used for your VPC, IBM Cloud Kubernetes Service Cluster, and Observability. 
 location String Required The location of an Agent infrastructure. For beta, the Agent must be deployed in a fresh provisioned VPC, IBM Cloud Kubernetes Service Cluster, and Log Analysis instance. For example, us-south. If the location used for Agent infrastructure and Agent service does not match, then the logs are not sent to LogDNA. 
 resource_group_name String Required Name for the resource group used for an Agent infrastructure and Agent service. For example, test_agent.
--source-table-def-file ([VirtualizeTableSourceTableDefFile](https://cloud.ibm.com/docs/cli?topic=cli-CLI-namecli-virtualize-table-parameter-source-table-def-item-example-schema))
: Required.

--sources ([]string)
: The name of data source. Required.

--virtualized-table-name (string)
: The name of the table that will be virtualized. Required.

--virtualized-schema (string)
: The schema of the table that will be virtualized. Required.

--virtualized-table-def-file ([VirtualizeTableVirtualTableDefFile](https://cloud.ibm.com/docs/cli?topic=cli-CLI-namecli-virtualize-table-parameter-virtual-table-def-item-example-schema))
: Required.

--is-included-columns (string)
: The columns that are included in the source table.

--replace (bool)
: Determines whether to replace columns in the virtualized table.





 Examples 

Virtualize table

ibmcloud watson-query virtualized-table-create --source-table-name table1 --source-table-def-file source_tabel_def.json --virtualized-schema DV_IBMID_270001PD8Q --sources CONN1:TABLE1 --virtualized-table-name TABLE1 --virtualized-table-def-file virtualized_table_def.json. The json file content example: "[{"column_name":"COL1","column_type":"VARCHAR"}]"







 ibmcloud watson-query virtualized-table-delete 

Remove specified virtualized table. You must specify the schema and table name.

ibmcloud watson-query virtualized-table-delete --virtualized-schema VIRTUALIZED-SCHEMA --virtualized-name VIRTUALIZED-NAME



 Command options
--source-table-def-file ([VirtualizeTableSourceTableDefFile](https://cloud.ibm.com/docs/watson-query-cli-plugincli-virtualize-table-parameter-source-table-def-item-example-schema))
: Required.

--sources ([]string)
: The name of data source. Required.

--virtualized-table-name (string)
: The name of the table that will be virtualized. Required.

--virtualized-schema (string)
: The schema of the table that will be virtualized. Required.

--virtualized-table-def-file ([VirtualizeTableVirtualTableDefFile](https://cloud.ibm.com/docs/watson-query-cli-plugincli-virtualize-table-parameter-virtual-table-def-item-example-schema))
: Required.

--is-included-columns (string)
: The columns that are included in the source table.

--replace (bool)
: Determines whether to replace columns in the virtualized table.





 Examples 

Virtualize table

ibmcloud watson-query virtualized-table-create --source-table-name table1 --source-table-def-file source_tabel_def.json --virtualized-schema DV_IBMID_270001PD8Q --sources CONN1:TABLE1 --virtualized-table-name TABLE1 --virtualized-table-def-file virtualized_table_def.json. The json file content example: "[{"column_name":"COL1","column_type":"VARCHAR"}]"







 ibmcloud watson-query virtualized-table-delete 

Remove specified virtualized table. You must specify the schema and table name.

ibmcloud watson-query virtualized-table-delete --virtualized-schema VIRTUALIZED-SCHEMA --virtualized-name VIRTUALIZED-NAME



 Command options
For more information, see [IBM Event Streams](https://www.ibm.com/cloud/event-streams) for handling scalable, time-ordered streams of events.
* A real-time publish and subscribe system. For more information, see [IBM Databases for Redis](https://www.ibm.com/uk-en/cloud/databases-for-redis) for handling publish and subscribe topics.
* A transaction log. Some databases store each change in a transaction log, but the distributed and eventually consistent nature of IBM Cloudant means that no definitive time-ordered transaction log exists.
* A querying mechanism. For more information, see [MapReduce Views](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-creating-views-mapreduce) for creating views of your data that is ordered by a key of your choice.
IBM Cloud Activity Tracker integration 

Users of IBM® Cloudant® for IBM Cloud® can use IBM Cloud® Activity Tracker to access audit logs for the service. IBM Cloud Activity Tracker records user-initiated activities that change the state of a service in IBM Cloud®. You can use this service to investigate abnormal activity and critical actions and to comply with regulatory audit requirements. You can also be alerted about actions as they happen. The events that are collected comply with the IBM Cloud Auditing Data Federation (CADF) standard. For more information, see [Auditing events](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-at_events).
[$and](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operatorsthe-and-operator) Array Matches if all the selectors in the array match. 
 [$elemMatch](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operatorsthe-elemmatch-operator) Selector Matches and returns all documents that contain an array field with at least one element that matches all the specified query criteria. 
 [$nor](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operatorsthe-nor-operator) Array Matches if none of the selectors in the array match. 
 [$not](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operatorsthe-not-operator) Selector Matches if the selector doesn't match. 
 [$or](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operatorsthe-or-operator) Array Matches if any of the selectors in the array match. All selectors must use the same index. 





 Examples of combination operators 



 The $all operator 

The $all operator matches an array value if it contains all the elements of the argument array.

See the following example that uses the $all operator:

{
"selector": {
"genre": {
"$all": ["Comedy","Short"]
}
},
"fields": [
"title",
"genre"
],
"limit": 10
}





 The $allMatch operator 

The $allMatch operator matches and returns all documents that contain an array field, where all the elements in the array field match the supplied query criteria.

See the following example that uses the $allMatch operator:

{
"genre": {
"$allMatch": {
"$eq": "Horror"
}
}
}





 The $and operator 

The $and operator matches if all the selectors in the array match.
"year": 2010
}
}

See the following example that uses the command line to show how to identify the index that was used to answer a query:



* Curl
* Java
* Node
* Python
* Go



curl "$SERVICE_URL/movies/_explain" 	-X POST 	-H "Content-Type: application/json" 	-d '{
"selector": {
"$text": "Pacino",
"year": 2010
}
}'

import com.ibm.cloud.cloudant.v1.Cloudant;
import com.ibm.cloud.cloudant.v1.model.ExplainResult;
import com.ibm.cloud.cloudant.v1.model.PostExplainOptions;

import java.util.HashMap;
import java.util.Map;

Cloudant service = Cloudant.newInstance();

Map<String, Object> selector = new HashMap<>();
selector.put("$text", "Pacino");
selector.put("year", 2010);

PostExplainOptions explainOptions =
new PostExplainOptions.Builder()
.db("movies")
.selector(selector)
.build();

ExplainResult response =
service.postExplain(explainOptions).execute()
.getResult();

System.out.println(response);

import { CloudantV1 } from '@ibm-cloud/cloudant';

const service = CloudantV1.newInstance({});

let selector: CloudantV1.Selector = {
'$text': 'Pacino',
'year': 2010
};

service.postExplain({
db: 'movies',
selector: selector
}).then(response => {
console.log(response.result);
});
(https://cloud.ibm.com/docs-content/v1/content/522c6f62358b063f921283400a601c3f9bc66f08/Cloudant/tutorials/images/status-replication-jobs.png)

Figure 4. Status of your replication job
5. See the status when your job finishes change to Completed.
6. Check that the database was created on the databases page.

Zoom

![The Databases page shows the details of each database in your service instance.](https://cloud.ibm.com/docs-content/v1/content/522c6f62358b063f921283400a601c3f9bc66f08/Cloudant/tutorials/images/databases.png)

Figure 5. Databases page







 Step 5: Monitoring active tasks 

The Active tasks page displays a list of all running tasks. When you monitor your system's performance, this list can help you find potential issues. You can see a list of active tasks, which includes compaction, replication, and indexing. For more information, see the [Managing tasks](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-managing-tasks) guide.

If your instance does not have any active tasks, you can return to the previous step, delete the query-movies database, and then replicate it again. If you open the Active Tasks page immediately, you can see your replication.



1. Click Active Tasks.

The Active Tasks page opens.

Zoom

![On the Active Tasks page, you can see a list of active tasks, which includes compaction, replication, and indexing.](https://cloud.ibm.com/docs-content/v1/content/522c6f62358b063f921283400a601c3f9bc66f08/Cloudant/tutorials/images/active-tasks-page.png)

Figure 6. Active tasks
2.
The array value is converted by the Watson Assistant into this string value:

"title": "["a single array element"]"

As a result, the string is returned in this format in the chat; the surrounding brackets and quotation marks are displayed:

["a single array element"]

If you see this happening, consider choosing a different collection field from which to extract search results.

The Discovery document highlight field stores values in an array.







 Next steps 

After you add the search integration for the first time, it appears as a tile on the Draft environment page. Click the tile to see or edit the search configuration.

![Search in draft environment](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/search-draft-env.png)

When you're ready, you can repeat the steps to add the search integration to your Live environment or to other environments, if you're using [multiple environments](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-multiple-environments).

![Search in live environment](https://cloud.ibm.com/docs-content/v1/content/ca9232b3702768f24bb897f48f10778fcda28718/watson-assistant/images/search-live-env.png)





 Search trigger 

The search integration is triggered from an action step. This approach is useful if you want to narrow down a user query before you trigger a search.

For example, the conversational flow might collect information about the type of device a customer wants to buy. When you know the device model, you can then send a model keyword in the query that is submitted to the search integration to get better results.

In the And then field of the step where you want the search to be triggered, choose Search for the answer.

To configure the search in Discovery, complete the following steps:



1. Click Edit settings.
2.
Built-in global variables 

By writing expressions, you can access a set of global system variables that provide information about the conversation.

Each variable contains a JSON object that is taken from the message method input or output. For more information about these objects, see the [API Reference](https://cloud.ibm.com/apidocs/assistant/assistant-v2message) information for the message method request and response.

These variables are special system objects that require syntax different from the standard variable notation. To reference any of these values in an expression, use the variable name by itself (not including ? or {} characters).



Built-in global system variables

 Variable  Description                                                                                                 Expression example            

 input     The input object from the most recent message request sent to the assistant.                                input.text                    
 output    The output object from the most recent message response. Currently, only output.debug is included.          output.debug.turn_events[0]
* To search for the existence of a registration up to a specific CRN segment, use a colon followed by an asterisk ().

crn:v1:bluemix:public:databases-for-redis:us-south:a/
274074dce64e9c423ffc238516c755e1:29caf0e7-120f-4da8-9551-3abf57ebcfc7::

This query returns Databases for Redis registrations that are associated with all resource types and names for deployment ID 29caf0e7-120f-4da8-9551-3abf57ebcfc7.
* To search for existence of a registration up to a specific CRN segment that's prefixed by <string>, use a colon followed by <string> on the last segment of the CRN query.

crn:v1:bluemix:public:cloud-object-storage:global:a/e1bb63d6a20dc57c87501ac4c4c99dcb::bucket:prod

This query returns all Cloud Object Storage bucket registrations within account e1bb63d6a20dc57c87501ac4c4c99dcb that are prefixed by prod.



When [listing registrations that are associated with any root key](https://cloud.ibm.com/apidocs/key-protectlist-registrations-for-any-key), your CRN query should not contain an asterisk (*) in the first eight segments.

The following tables provides a list of CRN query examples before and after URL encoding. To view the URL encoded values, click the URL encoded tab.

Original

URL encoded



Table 9. CRN query examples.

 Value 

 crn:v1:bluemix:public:databases-for-redis:us-south:a/274074dce64e9c423ffc238516c755e1:29caf0e7-120f-4da8-9551-3abf57ebcfc7::
To reference a session variable inside an expression, you must specify the variable ID using the format ${variable_id} (for example, ${current_time}. You can find the variable ID in the list of variables. (For more information, see [Using variables to manage conversation information](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-manage-info).)

When you are editing an expression, you can type $ to see a drop-down list of variables you can reference. Select a variable from the list to automatically insert the step ID or variable ID.





 Supported data types 

Expressions can use atomic JSON types (such as integer, string, number, and boolean), and compound data types (such as JSON arrays ([]) and objects ({}). When specifying literal string values, you can use either single (') or double (") quotation marks.

Values that action steps collect from customers use customer response types such as date, time, currency, or percent. These values are stored as JSON objects in the following format:

{
"system_type": "{system_type}",
"value": "{value}"
}

where {system_type} is one of the following types:



* time
* percentage
* currency







 Date and Time methods 

Several methods are available to work with date and time values.



 now(String timezone) 

The now() method returns the current date and time for a specified time zone, in the format yyyy-MM-dd HH:mm:ss 'GMT'XXX:

now('Australia/Sydney').

In this example, if the current date and time is 2021-11-26 11:41:00, the returned string is 2021-11-26 21:41:00 GMT+10.00 or 2021-11-26 21:41:00 GMT+11.00 depending on daylight saving time.

The output string format change above is applicable to date and time calculation methods as well.
--provider-credential PATH_TO_PROVIDER_CREDENTIAL
: Optional. The path to a JSON file on your local machine that has the credentials of the infrastructure provider for the Satellite location. The credential format is provider-specific. For more information, see [Providing Satellite with credentials to your infrastructure provider](https://cloud.ibm.com/docs/satellite?topic=satellite-infrastructure-plan). If you include this option, you must also include the --provider option.

-q
: Optional. Do not show the message of the day or update reminders.





 Example 

ibmcloud sat location create --managed-from wdc --name mylocation







 ibmcloud sat location dns get 

View the details of a registered subdomain in a Satellite location.

ibmcloud sat location dns get --location LOCATION --subdomain SUBDOMAIN [--output OUTPUT] [-q]



 Minimum required permissions 

IBM Cloud IAM Viewer platform role for the Location resource in the Satellite location. For more information, see [Checking user permissions](https://cloud.ibm.com/docs/satellite?topic=satellite-iam-assign-accesschecking-perms).





 Command options 

--location LOCATION
: Required. Enter the ID or name of the location that you want to retrieve DNS record for. To retrieve the location ID or name, run ibmcloud sat location ls.

--subdomain SUBDOMAIN
: Required. Enter the ID or name of the subdomain that you want to retrieve DNS record for. To list existing subdomains, run ibmcloud sat location dns ls.

--output json
: Optional. Prints the command output in JSON format.

-q
: Optional. Do not show the message of the day or update reminders.





 Example
IA-4 - Identifier Management 



 Control requirements 

The organization manages information system identifiers by:

IA-4 (a)
: Receiving authorization from [Assignment: organization-defined personnel or roles] to assign an individual, group, role, or device identifier;

IA-4 (b)
: Selecting an identifier that identifies an individual, group, role, or device;

IA-4 (c)
: Assigning the identifier to the intended individual, group, role, or device;

IA-4 (d)
: Preventing reuse of identifiers for [IBM Assignment: at least two (2) years]; and

IA-4 (e)
: Disabling the identifier after [IBM Assignment: ninety (90) calendar days for user identifiers].





 Additional IBM Cloud for Financial Services specifications 

The organization must follow customer requirements when establishing customer identifiers including:



* aligning with customer email address or unique number corresponding to a user
* prohibiting the use of Social Security Numbers (SSN) or customer-specific identifiers in the organization's internal environment







 IBM Cloud for Financial Services profile 

The rules related to this control that follow are part of the IBM Cloud for Financial Services v1.2.0 profile in [IBM Cloud® Security and Compliance Center](https://cloud.ibm.com/docs/security-compliance?topic=security-compliance-getting-started).



Rules for IA-4 in IBM Cloud for Financial Services v1.2.0 profile

 Requirement ID Rules
Show more

The option response contains multiple options to be presented to the user. Each option includes two objects, label and value. The label is a user-facing string identifying the option; the value specifies the corresponding message input that should be sent back to the assistant if the user chooses the option.

Our client app will need to use the data in this response to build the output we show to the user, and to send the appropriate message to the assistant.





 Listing available options 

The first step in handling an option response is to display the options to the user, using the text specified by the label property of each option. You can display the options using any technique that your application supports, typically a drop-down list or a set of clickable buttons. (The optional preference property of an option response, if specified, indicates which type of display the application should display if possible.)

Our simplified example uses standard input and output, so we don't have access to a real UI. Instead we will just present the options as a numbered list.

// Option example 1: lists options.

const prompt = require('prompt-sync')();
const AssistantV2 = require('ibm-watson/assistant/v2');
const { IamAuthenticator } = require('ibm-watson/auth');

// Set up Assistant service wrapper.
const service = new AssistantV2({
version: '2019-02-28',
authenticator: new IamAuthenticator({
apikey: '{apikey}', // replace with API key
})
});

const assistantId = '{assistant_id}'; // replace with assistant ID
let sessionId;

// Create session.
service
.createSession({
assistantId,
})
.then(res => {
sessionId = res.result.session_id;
sendMessage({
messageType: 'text',
text: '', // start conversation with empty message
});
})
.catch(err => {