Search code examples
aiml

How can we use AIML for making a chatbot?


Can we give random responses for a single question in AIML. For "Hi", I need random replies like "hey", "hello", "hi", etc.


Solution

  • AIML can be used for making chatbots. But you have to make templates for all possible questions user could possibly ask. Here is an example for AIML random responses

     <pattern>HI</pattern>
       <template>
         <random>
            <li> Hello! </li>
            <li> Hi </li>
            <li> Hey </li>
         </random>