Discovering QiChat, the SBR language for creating chatbots

Replying to greetings

1. Using a user rule

Now that the chat is ready to run, let's start on the dialogue: open the .top file!
Note that the header topic: ~basics() should stay as is, add your content below.

To make the robot answer human inputs (u:(...)), create a user rule:

u:(hello Pepper) #this is what the robot understands

Hello human! #this is the robot's answer

So with this rule, if you say "hello pepper" to the robot, he will answer "Hello human!".

Note: to gain some time, you can type the input and read the output in the visual interface Dialog view but always test your final application by speaking to the robot!

2. Using a list of synonyms

Let's add some variability to the input - after all, "hello" is not the only way to greet someone!

u:([hello hi hey howdy] Pepper)

Hello human!

The syntax [] defines a list of interchangeable (or) words or phrases/sentences (use quotation marks to define phrases and sentences). Lists can be embedded within one another, and can be used both in inputs and outputs (used in inputs, lists define possible variations, and in outputs, the words or phrases will be used sequentially in order to create varying responses if the rule is triggered several times).

u:([hello hi hey howdy "good [morning afternoon evening]"] Pepper)

Hello human!