Table of contents


Official Content

A scripted chatbot is a "command-based" chat. 

Scripted chatbots can be defined in scenarios where they can understand predefined commands.

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 machine learning.
  • 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. In these cases where scripted conversations are enough, and where the chatbot’s output is predetermined you don't need to use AI through an NLP provider.

The following image shows a scripted chatbot at runtime:

GeneXus Web_chatbot_DeveloperMenu3 

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: HowTo: Create a Scripted Chatbot.

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 16 upgrade 10.

See Also

Scripted Chatbots : Generated objects
Multi-Tenant Scripted Chatbots
Dynamic Scripted Chatbot

Notes:

Until GeneXus 17 upgrade 2 there were the following 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.
  • Conversational objects can be procedures only.

Since GeneXus 17 upgrade 3 the same Conversational Objects are generated as for NLP.

 

    

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant