Context variables

Before we go further, we need to discuss context variables. Any robust conversational agent will benefit from context. Context enables memory between turns in the conversation and enables anaphora—reducing the awkward need to repeat words, especially nouns, used earlier in the exchange. Context is represented within the dialog as a set of developer-defined context variables, represented with the $ prefix, and passed between the application and the conversation service through a JSON structure.

Keep in mind that the Watson Assistant conversational API is statelessthat is, it doesn't maintain any memory of prior calls to the service, and therefore any state, such as context, must be passed back and forth between your application ...

Get Cognitive Computing with IBM Watson now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.