One element to the success of your bot is the tone and voice your bots uses. Informal and “chatty” response may be a more engaging and better fit with your brand. In line with this approach, you would probably want to ensure your bot replies are not formulaic and predictable. In this article I demonstrate how you can easily randomize the responses from your bot.
Randomizing the responses from your bot
There are many different ways you can achieve this functionality but to keep the implementation as simple as possible I’ve done so by defining an array win the BotML and then using a simple pseudo random number generator (based on date/time) which picks one of your messages defined within the array. Furthermore, it’s quite simple to extend the array to include different message for different points in the conversation: welcome, goodbye, not understanding a response etc. The sample is simple and self-documenting. Import the bot and run it you will get three random messages for welcome, unresolved and goodbye. The only limitation with the code shown below is that since it takes the last digit of a time then it would expect 10 (0-9) possible messages within the message array. Read the complete article here.
For more information please see the Chatbot partner resource kit here.
For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.