vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Account usage requestData fields

 Field Type Description Status 

 month String Indicates the month that the user selects to view usage data. Included always in the event 
 usage_report_type String Indicates the type of report. <br>Valid values are instances and rollup. Included always in the event 
 sub_account_id String Indicates the sub-account ID. Optional 
 resource_group String Indicates the resource group. Optional <br>Included if the user filters data by resource group. 
 organization_id String Indicates the organization ID. Optional 
 daily Boolean Indicates the frequency of the report. Optional 



The following table lists the fields that are available through the requestData field in the events with actions billing.enterprise-usage-report.read and billing.enterprise-usage-report.download:



Table 18. Enterprise usage requestData fields

 Field Type Description Status 

 month String Indicates the month that the user selects to view usage data. Included always in the event 
 children Boolean Indicates whether the usage is aggregated at account level. Included always in the event 
 enterprise_id String Indicates the ID of the enterprise. Included always in the event 
 account_id String Indicates the sub-account ID that is requested in the report. Optional 
 account_group_id String Indicates the account group when a user selects one. Optional <br>Included if the user filters data by selecting 1 account group. 



The following table lists the fields that are available through the requestData field in the events with actions billing.enterprise-instances-usage-report.download:



Table 19. Enterprise instances usage requestData fields

 Field Type Description Status 

 month String Indicates the month that the user selects to view usage data. Included always in the event 
 enterprise_id String Indicates the ID of the enterprise. Included always in the event 
 account_id String Indicates the the sub-account IDs that is requested in the report. Optional 
 account_group_id String Indicates the account group when a user selects one. Optional <br>Included if the user filters data by selecting 1 account group. 









 Account IAM settings events (Deprecated)
Usage access is managed separately and can be targeted to the enterprise, an account group, or an account.](https://cloud.ibm.com/docs-content/v1/content/d4595e5202a9a27767cf034e81b038cdf772e0d5/secure-enterprise/includes/billing-usage/includes/billing-usage/images/enterprise-billing-usage.svg)

Figure 1.Enterprise billing and usage management





 Billing options 

Enterprises require subscription billing or an account with the [Enterprise Savings Plan billing model](https://cloud.ibm.com/docs/billing-usage?topic=billing-usage-committed-use). In subscription billing, you purchase a subscription for an amount of credit to spend during the subscription term, and usage is deducted from the subscription credit at a discounted rate. The Enterprise Savings Plan billing model is similar to subscription billing. You commit to spend a certain amount on IBM Cloud and receive discounts across the platform. You are billed monthly based on your usage and you continue to receive a discount even after you reach your committed amount.

The account that you use to create the enterprise must be a [Subscription account](https://cloud.ibm.com/docs/account?topic=account-accountssubscription-account) or an account with the [Enterprise Savings Plan billing model](https://cloud.ibm.com/docs/billing-usage?topic=billing-usage-committed-use). After the enterprise is created, you can add more accounts to the enterprise. If you add a Lite or trial account, the account is automatically upgraded to a Pay-As-You-Go account.

Some Pay-As-You-Go accounts can't be directly imported into an enterprise, such as many Pay-As-You-Go accounts that are billed in United States dollars (USD). However, you can still import these accounts into your enterprise by converting them to Subscription accounts and then importing them. To convert an account, contact [IBM Cloud Sales](https://www.ibm.com/cloud?contactmodule).

Each enterprise supports only a single billing currency.
Expressions for accessing objects 

You can write expressions that access objects and properties of objects by using the Spring Expression (SpEL) language. For more information, see [Spring Expression Language (SpEL)](https://docs.spring.io/spring/docs/3.0.x/reference/expressions.html).



 Evaluation syntax 

To expand variable values inside other variables or invoke methods on properties and global objects, use the <? expression ?> expression syntax. For example:



* Expanding a property

"output":{"text":"Your name is <? context.userName ?>"}
* Invoking methods on properties of global objects

"context":{"email": "<? @email.literal ?>"}







 Shorthand syntax 

Learn how to quickly reference the following objects by using the SpEL shorthand syntax:



* [Context variables](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-expression-languageexpression-language-shorthand-context)
* [Entities](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-expression-languageexpression-language-shorthand-entities)
* [Intents](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-expression-languageexpression-language-shorthand-intents)





 Shorthand syntax for context variables 

The following table shows examples of the shorthand syntax that you can use to write context variables in condition expressions.



 Shorthand syntax Full syntax in SpEL 

 $card_type context['card_type'] 
 $(card-type) context['card-type'] 
 $card_type:VISA context['card_type'] == 'VISA' 
 $card_type:(MASTER CARD) context['card_type'] == 'MASTER CARD' 



You can include special characters, such as hyphens or periods, in context variable names. However, doing so can lead to problems when the SpEL expression is evaluated.
* [Microservices](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-use_casesuse_cases_microservices)
* [Web apps](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-use_casesuse_cases_webapps)
* [IoT](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-use_casesuse_cases_iot)
* [API backend](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-use_casesuse_cases_backend)
* [Mobile back end](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-use_casesuse_cases_mobile)
* [Data processing](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-use_casesuse_cases_data)
* [Cognitive](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-use_casesuse_cases_cognitive)
* [Event processing with Kafka or Event Streams](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-use_casesuse_cases_events)



[How Cloud Functions works](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-aboutabout)



* [Cloud Functions terminology](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-aboutfunctions-terminology)
* [What happens behind the scenes in Cloud Functions?](https://cloud.ibm.com/docs/openwhisk?topic=openwhisk-aboutabout_scenes)



* [1.
Column reference 

An expression can be a column reference, as in the following example:

create view Person as
select F.name as firstname, L.name as lastname
from FirstName F, LastName L
where FollowsTok(F.name, L.name, 0, 0);

This view identifies text that can be interpreted as a person’s full name (for example, “Samuel Davis”, “Vicky Rosenberg”). The expressions F.name and L.name are column-reference expressions that return the name column of the views F and L, respectively. The from statement defines views F and L as the local names for the views FirstName and LastName (which define valid given names and surnames, and are not shown in this example).





 Scalar function call 

An expression can be composed of one or more scalar function calls, each of which might contain arguments that are also expressions of type constant, column reference, or scalar function call. A scalar function call can be one of the built-in scalar functions, or a scalar user-defined function. Consider the following example:

create view FamilyMembers as
select ToLowerCase(GetText(P.lastname)) as lastname, List( (GetText(P.firstname))) as firstnames
from Person P
group by GetText(P.lastname);

This view identifies potential family members by grouping people with the same surnames together, printing all of the names, with the surnames in lowercase characters (for example, lastname keaton, firstnames (Elyse, Alex, Diane)). The outputs of the GetText function calls are used as arguments to the ToLowerCase function call to display the names in lowercase. The scalar function call expressions in this example are: ToLowerCase, (GetText(P.lastname), ToLowerCase(GetText(P.firstname)), and GetText(P.lastname).





 Aggregate function call 

An expression can be an aggregate function call. This expression type can have as arguments another expression of type column reference or type scalar function call. The following example shows an aggregate function call with expression type column reference:
The following example shows how to access the user phone number (i.e. the phone number that the call was received from):

"context": {
"variables": [
{
"value": {
"expression": "${system_integrations.voice_telephony.private.user_phone_number}.replace('+','')"
},
"skill_variable": "user_phone_number"
}
]
}

For more information about the phone integration context variables, see [Phone integration context variables](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-phone-context).
[Shows how to access the JSON editor associated with a standard node response.](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/contextvar-json-response.png)

If the Multiple responses setting is On for the node, then you must first click the Edit response![Edit response](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/edit-slot.png) icon for the response with which you want to associate the context variable.

![Shows how to access the JSON editor associated with a standard node that has multiple conditional responses enabled for it.](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/contextvar-json-multi-response.png)
3. Add a "context":{} block if one is not present.

{
"context":{},
"output":{}
}
4. In the context block, add a "name" and "value" pair for each context variable that you want to define.

{
"context":{
"name": "value"
},
"output": {}
}

In this example, a variable named new_variable is added to a context block that already contains a variable.

{
"context":{
"existing_variable": "value",
"new_variable":"value"
}
}

To subsequently reference the context variable, use the syntax $name where name is the name of the context variable that you defined. For example, $new_variable.



Learn more:
map(key0, value0, key1, value1, ...)
: Creates a map with the indicated key/value pairs.
: Example of an SQL function usage fragment

> SELECT map(1.0, '2', 3.0, '4')
: Result value

{1.0:"2",3.0:"4"}





 map_keys 

map_keys(map)
: Returns an unordered array that contains the keys of the map.
: Example of an SQL function usage fragment

> SELECT map_keys(map(1, 'a', 2, 'b'))
: Result value

[1,2]





 map_values 

map_values(map)
: Returns an unordered array that contains the values of the map.
: Example of an SQL function usage fragment

> SELECT map_values(map(1, 'a', 2, 'b'))
: Result value

["a","b"]





 max 

max(expr)
: Returns the maximum value of expr.





 md5 

md5(expr)
: Returns an MD5 128-bit checksum as a hex string of expr.
: Example of an SQL function usage fragment

> SELECT md5('Spark')
: Result value

8cde774d6f7333752ed72cacddb05126





 mean 

mean(expr)
: Returns the mean that is calculated from values of a group.





 min 

min(expr)
: Returns the minimum value of expr.





 minute 

minute(timestamp)
: Returns the minute component of the string/timestamp.
: Example of an SQL function usage fragment

> SELECT minute('2009-07-30 12:58:59')
: Result value

58





 mod 

expr1 mod expr2
: Returns the remainder after expr1/expr2.
: Example of an SQL function usage fragment

> SELECT 2 mod 1.8;
: Result value
* context.weather.tomorrow



The results (temp and rain parameter values) are stored in the context in this structure:

{
"weather": {
"today": {
"temp": "20",
"rain": "30"
},
"tomorrow": {
"temp": "23",
"rain": "80"
}
}
}

If multiple actions in a single JSON action array add the result of their programmatic call to the same context variable, then the order in which the context is updated matters. Per action type, the order in which the actions are defined in the array determines the order in which the context variable's value is set. The context variable value returned by the last action in the array overwrites the values calculated by any other actions.









 Client call example 

The following example shows what a call to an external weather service might look like. It is added to the JSON editor that is associated with the node response. By the time the node-level response is triggered, slots have collected and stored the date and location information from the user. This example assumes that the program that will be called is named MyWeatherFunction, and that it takes location and date parameters, and returns a JSON object, {"forecast": "<value>"}.

{
"actions": [
{
"name": "MyWeatherFunction",
"type": "client",
"parameters": {
"date": "$date",
"location": "$location"
},
"result_variable": "context.my_forecast"
}
]
}

Normally, the service only returns to the client from a POST /message request when new user input is required, such as after executing a parent and before executing one of its child nodes. However, if you add a client action to a node, then after evaluation, the service always returns to the client so that the result of the action call can be returned.
It is usually used for the images which has restriction on software license.
* Available for checkout should be selected if the image is ready for students. Otherwise, students cannot see this image.
* Revision indicates the different versions this image has. You can have comments for each version, and select one version as production version, and delete any unwanted version. Production version will be automatically chosen when students reserve this image. You can delete any revisions

![delete1](https://cloud.ibm.com/docs-content/v1/content/b6c5dbb443b797203b2824b05472cac5ae8635da/cloud-for-education/images/revision.png)
* Each image has delete button for deleting entire image.



![delete1](https://cloud.ibm.com/docs-content/v1/content/b6c5dbb443b797203b2824b05472cac5ae8635da/cloud-for-education/images/deleteImage.png)
"olives"
],
"age": 18,
"full_name": {
"first": "Jane",
"last": "Doe"
}
},
"output":{}
}

To define a context variable in JSON format, complete the following steps:



1. Click to open the dialog node to which you want to add the context variable.

Any existing context variable values that are defined for this node are displayed in a set of corresponding Variable and Value fields. If you do not want them to be displayed in the edit view of the node, you must close the context editor. You can close the editor from the same menu that is used to open the JSON editor; the following steps describe how to access the menu.
2. Click the Options icon ![Advanced response](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/kebab.png) that is associated with the response, and then click Open JSON editor.

![Shows how to access the JSON editor associated with a standard node response.](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/contextvar-json-response.png)

If the Multiple responses setting is On for the node, then you must first click the Edit response![Edit response](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/edit-slot.png) icon for the response with which you want to associate the context variable.

![Shows how to access the JSON editor associated with a standard node that has multiple conditional responses enabled for it.]
Consider referencing this type of resource to get an idea of the types of entities you might want to define in your own type system.



 Mentions 

A mention is any span of text that you consider relevant in your domain data. For example, in a type system about automotive vehicles, occurrences of terms like airbag, Ford Explorer, and child restraint system might be relevant mentions.





 Entity types 

An entity type is how you categorize a real-world thing. An entity mention is an example of a thing of that type. For example, the mention President Obama can be annotated as a PERSON entity type. The mention IBM can be annotated as an ORGANIZATION entity type. Entities are often nouns, but can also be verbs, as long as the verb is important to capture for the purposes of the application that will use the type system. For example, EVENT_CRASH might be a valid entity type for a type system about automotive vehicles, so that the word hit in the sentence, The car hit the barrier. can be annotated.

The goal of your annotation workspace is to annotate each mention in a document with the type of thing that it is. After a mention is classified by entity type, the labeled span of text is referred to as an entity.

A type system that you build with Knowledge Studio can include the following entity type attributes. The attributes help qualify mentions in text, but they are not marked as entity types by a machine learning model. For example, if the entity type ORGANIZATION has an entity subtype called COMMERCIAL, COMMERCIAL is not marked as an entity type on its own.



* Role

Qualifies the mention by the context in which the mention occurs. For example, the mention France in the statement, the students went to France, is marked with the entity type GPE because France is a geo-political entity. But, because France in this context is also a destination for the traveling students, the entity type is qualified by adding an attribute, in this case the role LOCATION. For another example, the mention Lawyers might be marked with the entity type PEOPLE and also by the role OCCUPATION.
* Entity subtype

Further classifies the entity type. For example, the entity type ORGANIZATION might include the subtypes COMMERCIAL, GOVERNMENT, MILITARY, and EDUCATION.
"time": null,
"confirmation": null
}
}
Show more





 Replacing a slot context variable value 

If, at any time before the user exits a node with slots, the user provides a new value for a slot, then the new value is saved in the slot context variable, replacing the previously-specified value. Your dialog can acknowledge explicitly that this replacement has occurred by using special properties that are defined for the Found condition:



* event.previous_value: Previous value of the context variable for this slot.
* event.current_value: Current value of the context variable for this slot.



For example, your dialog asks for a destination city for a flight reservation. The user provides Paris. You set the $destination slot context variable to Paris. Then, the user says, Oh wait. I want to fly to Madrid instead. If you set up the Found condition as follows, then your dialog can handle this type of change gracefully.

When user responds, if @destination is found:

Condition: (event.previous_value != null) &&
(event.previous_value != event.current_value)
Response: Ok, updating destination from
<? event.previous_value ?> to <? event.current_value ?>.
Response: Ok, destination is $destination.

This slot configuration enables your dialog to react to the user's change in destination by saying, Ok, updating the destination from Paris to Madrid.





 Avoiding slot filling confusion 

When a user input is evaluated, the slot with the first slot condition to match it is filled only. Test for the following possible causes of misinterpretation, and address them:



* Problem: The same entity is used in more than one slot.

For example, @sys-date is used to capture the departure date in one slot and arrival date in another.

Solution: Use slot found conditions that get clarification from the user about which date you are saving in a slot before you save it.
* Problem: A term fully or partially matches the entities in more than one slot condition.
* [Referencing resources in other resource blocks](https://cloud.ibm.com/docs/schematics?topic=schematics-create-tf-configreference-resource-info)



* [Managing resources in other account](https://cloud.ibm.com/docs/schematics?topic=schematics-create-tf-configmanage-resource-account)
* [Using variable blocks to customize resources](https://cloud.ibm.com/docs/schematics?topic=schematics-create-tf-configconfigure-variables)



* [Referencing variables](https://cloud.ibm.com/docs/schematics?topic=schematics-create-tf-configreference-variables)



* [Providing values to IBM Cloud Schematics for the declared variables](https://cloud.ibm.com/docs/schematics?topic=schematics-create-tf-configdeclare-variable)



* [Example for list of Strings](https://cloud.ibm.com/docs/schematics?topic=schematics-create-tf-configexample-list-strings)
* [Example for list of Objects](https://cloud.ibm.com/docs/schematics?topic=schematics-create-tf-configexample-list-object)



* [Storing your Terraform templates](https://cloud.ibm.com/docs/schematics?topic=schematics-create-tf-configstore-template)



[Using environment variables with workspaces](https://cloud.ibm.com/docs/schematics?topic=schematics-set-parallelismset-parallelism)



* [Usage](https://cloud.ibm.com/docs/schematics?topic=schematics-set-parallelismenv-var-usage)
For information about how to update the value of a context variable when the value is a JSON object or JSON array data type, see [Updating a context variable value in JSON](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtime-contextdialog-runtime-context-update-json)





 How context variables are processed 

Where you define the context variable matters. The context variable is not created and set to the value that you specify for it until your assistant processes the part of the dialog node where you defined the context variable. In most cases, you define the context variable as part of the node response. When you do so, the context variable is created and given the specified value when your assistant returns the node response.

For a node with conditional responses, the context variable is created and set when the condition for a specific response is met and that response is processed. For example, if you define a context variable for conditional response #1 and your assistant processes conditional response #2 only, then the context variable that you defined for conditional response #1 is not created and set.

For information about where to add context variables that you want your assistant to create and set as a user interacts with a node with slots, see [Adding context variables to a node with slots](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtime-contextdialog-runtime-context-var-slots).





 Order of operation 

When you define multiple variables to be processed together, the order in which you define them does not determine the order in which they are evaluated by your assistant. Your assistant evaluates the variables in random order. Do not set a value in the first context variable in the list and expect to be able to use it in the second variable in the list, because there is no guarantee that the first context variable will be executed before the second one. For example, do not use two context variables to implement logic that checks whether the user input contains the word Yes in it.



Using two context variables to check for a value in user input

 Variable Value 

 user_input <? input.text ?> 
 contains_yes <?