X

Developer Partner Community

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

Juergen Kress
PaaS & Middleware Partner Adoption

 

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

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services