Scripted Chatbots

Official Content

In general, chatbots are associated with AI and NLP. But in fact, there are two main ways in which a chatbot can do its job: with and without machine learning. Chatbots that use machine learning can be trained to "understand" the user Intents when they are expected to decipher natural speech and all its possible variations depending on the culture and localization.

On the other hand, in some scenarios where the conversation tends to be more "command-oriented" you do not need to add the complexity of an NLP solution.

Scripted Chatbot1

So, there are cases in which scripted conversations are enough (such as a command-based interface would be), and where the chatbot’s output is predetermined. In such cases, you don't need to use AI through an NLP provider. 

How to create a scripted Chatbot in GeneXus

Just configure the NLP Provider property to the value None. The other considerations to create a chatbot are the same as for any Chatbot that may use NLP, taking into account that all the information of the chatbot (such as Trigger Messages and Context) isn't stored in an NLP Provider but managed by the Chatbot generator.

image_20202312716_1_png

Consider that:

  • Each flow represents a question of the user.
  • The Trigger Messages, unlike what happens with a machine-intelligent chatbot, are considered exactly as they are defined. You can define more than one Trigger message for each Flow.
  • Each conversation can follow a number of defined paths (entering through different flows). This is solved as usual, using Chatbot User Input Redirections or Message redirections. As the user enters an input, that information is saved so the state of the conversation is persisted.
  • In the Response, only one text Message is considered (the first one), as there is no NLP to decide randomly what to answer.

After any change to the model, you can do "Generate Chatbot" and build.

You can download the sample here: Scripted Chatbot Sample.

Summary

Machine-intelligent chatbots can understand user intents the way people phrase them (with all the different variations they may have, such as culture, localization, or jargon).

Scripted chatbots are useful for those scenarios where it's enough to understand a set of predefined commands.

Availability

Since GeneXus Beta

See also

Scripted Chatbots : Generated objects

Temporary restrictions

  • The input and output parameters of conversational objects must be strings (Varchar, LongVarchar, etc).
  • Support to answer with components has not been implemented yet.