Randomizing Responses from your Bot with Oracle Intelligent Bots by Grant Ronald


imageOne 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.

Developer Partner Community

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.

clip_image003 Blog clip_image005 Twitter clip_image004 LinkedIn image[7][2][2][2] Facebook image Meetups

Technorati Tags: PaaS,Cloud,Middleware Update,WebLogic, WebLogic Community,Oracle,OPN,Jürgen Kress

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.