vania-janet/multiturn-rag-retrieval-data huggingface dataset:
: Fixed a bug in the Dialogs tool which prevented you from being able to configure a jump-to that targets the response of a node with the anything_else special condition.

Digression return message
: You can now specify text to display when the user returns to a node after a digression. The user will have seen the prompt for the node already. You can change the message slightly to let users know they are returning to where they left off. For example, specify a response like, Where were we? Oh, yes... See [Digressions](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtimedialog-runtime-digressions) for more details.





 12 July 2018 

Rich response types
: You can now add rich responses that include elements such as images or buttons in addition to text, to your dialog. See [Rich responses](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overviewdialog-overview-multimedia) for more information.

Contextual entities (Beta)
: Contextual entities are entities that you define by labeling mentions of the entity type that occur in intent user examples. These entity types teach your assistant not only terms of interest, but also the context in which terms of interest typically appear in user utterances, enabling your assistant to recognize never-seen-before entity mentions based solely on how they are referenced in user input. For example, if you annotate the intent user example, I want a flight to Boston by labeling Boston as a @destination entity, then your assistant can recognize Chicago as a @destination mention in a user input that says, I want a flight to Chicago. This feature is currently available for English only. See [Adding contextual entities](https://cloud.ibm.com/docs/assistant?topic=assistant-entitiesentities-create-annotation-based) for more information.

When you access the tool with an Internet Explorer web browser, you cannot label entity mentions in intent user examples nor edit user example text.

Entity recommendations
: Watson can now recommend synonyms for your entity values.
: Used for pagination. The number of records to retrieve.

--include INCLUDE (optional)
: Feature details to include the associated collections or rules details in the response.

--offset OFFSET (optional)
: Used for pagination. The number of records to skip.

--collections COLLECTIONS (optional)
: Filter features by a list of comma-separated collections.

--segments SEGMENTS (optional)
: Filter features by a list of comma-separated segments.

--expand EXPAND (optional)
: Expanded view of the item.

--tags TAGS (optional)
: Filter features by a list of comma-separated tags.

--sort SORT (optional)
: Sort the details based on the specified attribute.





 Example 

To list all features, run the following command:

ibmcloud ac feature list --environment_id "production"



 Output 

The command returns the following output:

name feature_id segment_exists
Indian IBMers ibm-discount true
sampleFeature sampleFeature true
Cycle Rentals cycle-rentals true









 ibmcloud ac feature create 

You can create a feature, by using the command:

ibmcloud ac feature create {--file FILE-PATH | --environment_id ENVIRONMENT_ID --name NAME [--feature_id FEATURE_ID] --description DESCRIPTION --type TYPE --enabled_value ENABLED_VALUE --disabled_value DISABLED_VALUE --tags TAGS --enabled ENABLED --segment_rules SEGMENT_RULES --collections COLLECTIONS}



 Command options 

--environment_id ENVIRONMENT_ID
: Environment ID

--name NAME
: Feature name. Required field - input either as a flag or from file.

--feature_id FEATURE_ID (optional)
: Feature ID. If this value is not provided, name will automatically become the ID. Optional field - input either as a flag or from file.

--description DESCRIPTION
: Description of the feature. Required field - input either as a flag or from file.

--type TYPE
: Type of the feature (Boolean, String, Number).
* Rotation policy: showing whether this key has a rotation policy attached to it.
* Associated resources: shows whether the key is protecting any resources.



The search capability is limited to a volume of 5,000 keys. If you have more than 5,000 keys, and you cannot filter the number of keys that will be searched to less than 5,000 (for example, by filtering by key state to only look for Enabled keys), your search will fail unless it exactly matches a key ID or alias. For more information about the API spec for key search, check out [GET /keys](https://cloud.ibm.com/apidocs/key-protectgetkeys).

If you want to narrow the number of results returned by a search, try using one or a combination of the following parameters:



* not: when specified, inverts the logic the search uses (for example, not:foo will search for keys that have aliases or names that do not contain foo).
* escape: everything after this option is take as plaintext (example: escape:not: will search for keys that have an alias or name containing the substring not:).
* exact: only looks for exact matches.
* alias: only looks for key aliases.
* name: only looks for key names.



Note that not:exact:foobar will look for keys where key name or alias is not exactly foobar, while exact:not:foobar will look for keys where key name or alias is exactly not:foobar

Search scopes behave in an OR manner. This means when using more than one search scope, a match in at least one of the scopes will result in the key being returned. By default (if no scopes are provided), the search is performed in both name and alias scopes.

Not seeing the full list of keys that are stored in your Key Protect instance? Verify with your administrator that you are assigned the correct role for the applicable Key Protect instance or individual key. For more information about roles, see [Roles and permissions](https://cloud.ibm.com/docs/key-protect?topic=key-protect-manage-accessmanage-access-roles).



 Retrieving keys by state
You can also pair extractable with offset, limit, and state to page through your available resources. 



For usage notes, check out the following examples for setting your extractable query parameter.



Table 6. Provides usage notes for the extractable query parameter

 URL Description 

 ../keys Lists all of your available resources, up to the first 200 keys. 
 ../keys?extractable=true Lists standard keys. 
 ../keys?extractable=false Lists root keys. 







 Sorting a list of keys 

Using the sort parameter in the query string [sorts the list of keys](https://cloud.ibm.com/apidocs/hs-cryptokms-get-key-sort-api) returned based on one or more key properties. To sort on a property in descending order, prefix the term with "-". To sort on multiple key properties, use a comma to separate each property. The first property in the comma-separated list is to be evaluated before the next.

$ curl -X GET "https://api.<region>.hs-crypto.cloud.ibm.com:<port>/api/v2/keys?sort=<sort-value>" -H "accept: application/vnd.ibm.collection+json" -H "authorization: Bearer <IAM_token>" -H "bluemix-instance: <instance_ID>"



Table 7. Usage notes for the sort query parameter

 Variable Description 

 sort-value The list of properties for sorting. The key properties that can be sorted at this time are:<br><br><br><br> * id<br> * state<br> * extractable<br> * imported<br> * creationDate<br> * lastUpdateDate<br> * lastRotateDate<br> * deletionDate<br> * expirationDate<br><br><br>
[checkbox](https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/discovery-data/images/checkbox.png) Take actions to improve your results. [Improving your query results](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-improvements) 
 ![checkbox](https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/discovery-data/images/checkbox.png) Analyze the data. [Understanding contracts](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-contracts-schema)
SearchResult response = service.postSearch(searchOptions.build()).execute().getResult();
while (response.getRows().size() > 0) {
System.out.println(response.getRows());
// The bookmark of the next request becomes the bookmark of this response
searchOptions.bookmark(response.getBookmark());
response = service.postSearch(searchOptions.build()).execute().getResult();
}
const { CloudantV1 } = require('@ibm-cloud/cloudant');
async function paginate(pageSize) {
let requestParams = {
db: 'cities',
ddoc: 'search',
index: 'freetext',
query: 'country:US',
limit: 5
};

let searchResult = (await service.postSearch(requestParams)).result;
while (searchResult.rows.length > 0) {
let documents = searchResult.rows;
console.log(documents);
// The bookmark of the next request becomes the bookmark of this response
requestParams.bookmark = searchResult.bookmark;
searchResult = (await service.postSearch(requestParams)).result;
}
}
paginate(5);
selector = {'country': {'$eq': 'US'}}
request_params = dict(
db='cities',
ddoc='search',
index='freetext',
query='country:US',
limit=5,
)
response = service.post_search(request_params).get_result()

while len(response'rows']) > 0:
documents = response'rows']
print(json.dumps(documents, indent=2))
 The bookmark of the next request becomes the bookmark of this response
With your query parameters defined in the previous step, you are ready to define the response object, which is returned when you invoke the weather API. Scroll to the Definitions panel.



1. Add a new definition.
2. Name the new definition Current.
3. Set the Type of Object.
4. Add new properties for the Current definition as shown in Table 1.



Table 1. Properties for the Current definition

 Name Type 

 zip string 
 temperature integer 
 humidity integer 
 city string 
 state string 





![definition-current-1.png](https://cloud.ibm.com/docs-content/v1/content/78bb71851d95d7580503eb9ba10cf3ae31490ade/apiconnect/tutorials/images/definition-current-1.png)



5. Save your API.



12. In the previous step, you defined the response object. Next you'll need to ensure the response object is associated with the get /current path. In the navigation, scroll back up to the Paths panel. a. Open the GET /current operation, and scroll to the Responses section. b. Change the schema of the 200OK response from "object" to "Current". c. Save your API.
13. The GET /current path and operation get the current weather data. Now you'll need to create a similar path and operation to get today's weather data. Similar to how you created the /current path in step 11, create a new path: /today.
14. Add a Parameter to the GET /today operation.



* Parameter Name: zipcode
* Located in: Query
* Required: Yes
* Type: string



15. Create a new definition: Today.
16. Add new properties for the Today definition as shown in Table 2.



Table 2. Properties for the Today definition

 Name Type 

 zip string 
 hi integer 
 lowe integer 
 nighthumidity integer 
 dayhumidity integer 
 city string
For example, if you add open_account here, it means that you want the response that you will specify in this node to be returned to the user if the user input indicates that the user wants to open an account.

As you begin to define a condition, a box is displayed that shows you your options. You can enter one of the following characters, and then pick a value from the list of options that is displayed.



Condition builder syntax

 Character Lists defined values for these artifact types 

 `#` intents 
 `@` entities 
 `@{entity-name}:` {entity-name} values 
 `$` context-variables that you defined or referenced elsewhere in the dialog 



You can create a new intent, entity, entity value, or context variable by defining a new condition that uses it. If you create an artifact this way, be sure to go back and complete any other steps that are necessary for the artifact to be created completely, such as defining sample utterances for an intent.

To define a node that triggers based on more than one condition, enter one condition, and then click the plus sign (+) icon next to it. If you want to apply an OR operator to the multiple conditions instead of AND, click the and that is displayed between the fields to change the operator type. AND operations are executed before OR operations, but you can change the order by using parentheses. For example: $isMember:true AND ($memberlevel:silver OR $memberlevel:gold)

The condition you define must be less than 2,048 characters in length.

For more information about how to test for values in conditions, see [Conditions](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-overviewdialog-overview-conditions).
4. Optional: If you want to collect multiple pieces of information from the user in this node, then click Customize and enable Slots. See [Gathering information with slots](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-slots) for more details.
5. Enter a response.
ibmcloud schematics resource-query create --name RESOURCE_QUERY_NAME [--type RESOURCE_QUERY_TYPE] [--query-file QUERY_FILE_PATH] [--file FILE_NAME ] [--output OUTPUT] [--no-prompt]

Command options



Schematics resource query create flags

 Flag Required / Optional Description 

 --name or -n Required The unique name for a resource query. 
 --type or -t Optional The type of resource that you want to retrieve. Supported values are vsi. 
 --query-file or -f Optional The path to the JSON file where you specified the details of your resource query. To find a list of supported queries, see [Supported resource queries](https://cloud.ibm.com/docs/schematics?topic=schematics-inventories-setupsupported-queries). 
 --file or -f Optional The path to the JSON file that specifies the details of the resource query that you want to create. 
 --output or -o Optional Returns the command-line output in JSON format. Currently only JSON file format is supported. 
 --no-prompt Optional Set this flag to create the resource query without an interactive command-line session. 





 Using the payload file 

You can provide a payload file to specify certain parameters for the resource_query create command. Then, you pass the file name to the command by using the --file command option. For a list of supported resource queries, see [Supported resource queries](https://cloud.ibm.com/docs/schematics?topic=schematics-inventories-setupsupported-queries).

You need to replace the <...> placeholders with the actual values. For example, "<WORKSPACE_ID" as us-east.workspace.ID1231.

Syntax

[{
"query_type": "workspaces",
"query_condition":
{
"name": "workspace-id",
"value": "<WORKSPACE_ID>",
"description": "string"
},
For quering a spatial index, pyst provides the following different query APIs: contained_in, contained_in_with_info, containing, containing_with_info, intersects, intersects_with_info, within_distance, within_distance_with_info, nearest_neighbors, nearest_neighbors_with_info.

Sample queries:



* Which county does White Plains Hospital belongs to? Which county polygon contains the point location of White Plains Hospital?

>>> white_plains_hospital = stc.point(41.026132, -73.769585)
>>> si.containing(white_plains_hospital)
['Westchester']
* Which county is the city of White Plains located in? Which county polygon contains the polygon of White Plains?
GetText(S.match) as stopword,
Count(S.match) as stopwordcount
from StopWords S
group by GetText(S.match);

-- Retrieve the most used and least used stop word count
create view StopWordUsageCount as
select Min(S.stopwordcount) as least, Max(S.stopwordcount) as most
from StopWordsCount S;
Show more







 Predicate functions 

Predicate functions test a certain predicate over its input arguments and return a corresponding Boolean value.

Input arguments to predicate functions include return values of other scalar or aggregate functions in addition to dictionaries, regular expressions, and more. These functions can be employed within the where clause of a select statement, and the having clause of an extract statement.



 And 

The And function accepts a variable number of Boolean arguments and returns the results of a logical AND operation across all the input arguments.

The AQL optimizer does not attempt to optimize the order of evaluation of the arguments to this function as part of the logical AND operation. If any input is null, the result is null.

Consider this query format:

select ...
from ...
where And(predicate1, predicate2);

As a result, a query format that uses the AND operation often runs considerably slower than the same query in the form of:

select ...
from ...
where predicate1 and predicate2;

When possible, use the SQL-style and keyword instead of this function.





 Contains 

The Contains function takes two spans as arguments:

Contains(<span1>, <span2>)

This function returns TRUE if span1 completely contains span2. If span2 starts at or after the beginning of span1, and ends at or before the end of span1, span2 is completely contained. If either argument is null, the function returns null.





 ContainsDict 

The ContainsDict function checks if the text of a span contains any entry from a given dictionary. This function accepts as input arguments a dictionary, an optional flag specification, and a span to evaluate.
For example, you might want to ask for the customer's name and then address the person by name later on. A context variable is used by the dialog skill. [Learn more](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-runtime-contextdialog-runtime-context-variables). 
 Dialog The component where you build the conversation that your assistant has with your customers. For each defined intent, you can author the response your assistant should return. [Learn more](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-overview). 
 Digression A feature that gives the user the power to direct the conversation. It prevents customers from getting stuck in a dialog thread; they can switch topics whenever they choose. [Learn more](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-runtimedialog-runtime-digressions). 
 Disambiguation A feature that enables the assistant to ask customers to clarify their meaning when the assistant isn't sure what a user wants to do next. [Learn more](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-runtimedialog-runtime-disambiguation). 
 Entity Information in the user input that is related to the user's purpose. An intent represents the action a user wants to do. An entity represents the object of that action. [Learn more](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-entities). 
 Integrations Ways you can deploy your assistant to existing platforms or social media channels. [Learn more](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-deploy-integration-add). 
 Intent The goal that is expressed in the user input, such as answering a question or processing a bill payment.
<-- </section "id="section-top_hits-syntax" "> --><-- <section "id="section-top_hits-example" "> --> Example The following example returns the top hit for the term halt per city. {
"query":"halt",
"aggregation": "term(CITY).top_hits(1)"
}
The response contains the top query results for the term halt grouped by cities mentioned in documents where the term is most mentioned. Ten results are returned by default. For each of the 10 cities, the document with the top score is returned as the hit object. The content for each hit in the hits array matches the content in each result in the results array. Only the order of the results is different. "aggregations":
{
"type": "term",
"field": "CITY",
"results":
{
"key": "LOS ALTOS",
"matching_results": 3,
"aggregations":
{
"type": "top_hits",
"size": 1,
"hits": {
"matching_results": 3,
"hits":
{
"document_id": "2bed19a9069442fd82542827ebe260d5_7015",
...
}
]
}
}
]
},
{
"key": "ANDOVER",
"matching_results": 2,
"aggregations":
{
"type": "top_hits",
"size": 1,
"hits": {
"matching_results": 2,
"hits":
{
"document_id": "2bed19a9069442fd82542827ebe260d5_18329",
...
}
]
}
}
]
},
...
{
Query parameters Details 

 version <br>Required <br>string Requests the version of the API as of a date in the format YYYY-MM-DD. Any date up to the current date can be provided. Specify the current date to request the latest version. <br>Possible values: Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ 





Table 3. Request body attributes for adding prefix filters

 Request body Details 

 action <br>Required <br>string Whether to permit or deny prefix filter. <br>Possible values: [permit,deny] <br>Example: permit 
 prefix <br>Required <br>string IP prefix and subnet mask <br>Example: 192.168.100.0/24 
 before <br>string Identifier of prefix filter to handle the ordering and follow semantics:<br><br><br><br> * When a filter reference another filter in it's before field, then the filter making the reference is applied before the referenced filter. For example: if filter A references filter B in its before field, A is applied before B.<br> * When a new filter is added that has the same before as an existing filter, then the older filter has its before field updated to point to the new filter. Starting with the above example: if filter C is added and it references B in its before field, then A's before field should be modified to point to C, so the order of application would be A, C and finally B.<br> * A filter that has an empty before reference is applied last (though the date order mentioned still applies). So continuing the preceding examples, if filter B has an empty before field, then it is applied last, but if filter D is created with an empty before field, then B's before field is modified to point to D, so B is applied before D. <br> Example: 1a15dcab-7e40-45e1-b7c5-bc690eaa9782<br><br><br> 
 ge <br>integer IP prefix greater than or equal to this number is processed.
[Get a service key](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-service_keys).





 Step 2. Identify the data to pass through the export parameters 

To verify that the query that you use in the export returns the set of logs that you are looking for, define the search query through the logging web UI. Refine the query until you can only see the logs that you want to export. Then, map the data to the query parameters.

Notice that when you copy the query from the logging web UI, you must replace every space with %20.





 Step 3. Export the logs 

Run the following cURL command to export logs:

curl "ENDPOINT/v2/export?QUERY_PARAMETERS" -u SERVICE_KEY:

Where



* ENDPOINT represents the entry point to the service. Each region has a different URL. [Learn more](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 the service key that you created in the previous step.









 Samples 

For example, to write log lines into the terminal, you can run the following command:

curl "https://api.us-south.logging.cloud.ibm.com/v2/export?to=$(date +%s)000&from=$(($(date +%s)-86400))000<=vels=info" -u e08c0c759663491880b0d61712346789:

To use the query parameter to find all log lines with a level of info, you can run the following command:

curl -s "https://api.us-south.logging.cloud.ibm.com/v2/export?query=test_query<=vels=info" -u :