Context

Explanation

What is Context?

Contexts represent the current context of a user's request. When you're talking to a friend or to the assistant you do not have to repeat the context many times, but you can save it and re-use it for a certain life span.

Bad example:

What time is it in Spain?

What is the weather like in Spain?

Will in rain in Spain?

Good Example:

Amanda: Hey Eliza, I really enjoyed the stroopwafels.

Eliza: I am glad you liked them.

Amanda: Can you bring some more of them to the WTM Summit, please?

Eliza: Right, I will bring some more for you there.

Lifespan

It is the quantity of messages exchanged between the two participants, linking the intents.

The contexts expire after a while, to be more precise, contexts in intents expire after either five requests or 20 minutes from the time they were activated. On the other hand, contexts in Follow-up intents have a default lifespan of two requests.

But you can change the default setting by clicking in the current number that represents the life span.

Output Contexts

The output context is the one that the intent passes on to the external environment.

Input Contexts

The input context refers to the context the intent receives from the external environment.

Extracting Parameter Values from Contexts

You can use the following syntax:

#context_name.parameter_name

#some-context.some-argument

#search-followup.get_name

#search-followup.get_location

#search-followup.get_name

Last updated