Here a some opinionated tricks to develop a chatbot with RedBot
Shield your senders/receivers nodes with some Link nodes
in order to minimize the number of senders/receivers in your flow. In case you’ll change the configuration, you don’t have to go through every node.
Link nodes
With [[Message node|Message-node]] it’s possible to specify different message versions, they will be chosen randomly. This makes your chatbot less robotic and more human.
Complex flows can be rearranged in sub-flows, this is useful to unclutter your chatbot and keep the complexity under control while it grows. When you spot a topic that your chatbot is able to handle, group the nodes into a sub-flow with one input and two outputs, the first one will see the output message in case the sub-flow is handle it, otherwise the message will go through the second output.
In this way you can chain complex sub-flows together and handle a final “I didn’t understand” message in case none of them was able to give an answer.
Chain sub-flows
Use the topic variable of the [[chat context|Chat-context]] to redirect the incoming messages to specific branches of your flow that can handle the specific requests based on the intention of the user. For example when the user types “what’s up”, it can lead to some generic answers in case it’s the first message, but - for example - if the user is booking an hotel room, it could mean “what is the status of the booking/what do you need to complete it”. In this case the [[Rules node|Rules-node]] is your best friend.
A good chatbot requires constant tweaking and traing, for this reason is important to log all sentences from the users that are not well interpreted by the parser nodes, use the Log node to dump the inbound message to a file in a format suitable for a log.
Chain sub-flows