Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Essential AIML responses?

Tags:

xml

chatbot

aiml

What do you think are important pattern/temples to program. Like in a chatbot what does EVERY chatbot need a response for? Im just starting out making the aiml file and need some help...

Heres the file now.

<aiml>

<category>
    <pattern>Hey</pattern>
    <template>Whats up?</template>
<category>

<category>
    <pattern>WHAT ARE YOU?</pattern>
    <template>I am a chatbot.</template>
<category>

<category>
    <pattern>DO YOU LIKE*</pattern>
    <template>Yes, I love <star/></template>
<category>

<category>
    <pattern>WHAT IS*</pattern>
    <template><star/>? is that what humans call what I did to your mom last night?</template>
<category>

<category>
    <pattern>WHEN WERE YOUR BORN*</pattern>
    <template>I was created in 2010.</template>
<category>

like image 201
user377419 Avatar asked Dec 03 '25 19:12

user377419


1 Answers

You may want to include basic/common patterns of speech that can be simplified or redirected to another category. Here are some examples that handle definition retrieval.

<category>
    <pattern>WHAT IS *</pattern>
    <template>
        <sr/>
    </template>
</category>
<category>
    <pattern>DEFINE *</pattern>
    <template>
        <sr/>
    </template>
</category>
<category>
    <pattern>WHAT IS A *</pattern>
    <template>
        <sr/>
    </template>
</category>
<category>
    <pattern>DEFINE A *</pattern>
    <template>
        <sr/>
    </template>
</category>
<category>
    <pattern>WHAT IS THE *</pattern>
    <template>
        <sr/>
    </template>
</category>
<category>
    <pattern>DEFINE A *</pattern>
    <template>
        <sr/>
    </template>
</category>
<category>
    <pattern>WHAT IS THE MEANING OF *</pattern>
    <template>
        <sr/>
    </template>
</category>
<category>
    <pattern>DEFINE THE MEANING OF *</pattern>
    <template>
        <sr/>
    </template>
</category>
<category>
    <pattern>WHAT IS THE DEFINITION OF *</pattern>
    <template>
        <sr/>
    </template>
</category>
<category>
    <pattern>DEFINE THE DEFINITION OF *</pattern>
    <template>
        <sr/>
    </template>
</category>

More useful AIML lines of code that pertain more to your question would be these:

<category>
    <pattern>HI *</pattern>
    <template>
        <srai>HI</srai>
    </template>
</category>
<category>
    <pattern>HELLO *</pattern>
    <template>
        <srai>HI</srai>
    </template>
</category>
<category>
    <pattern>ALOHA *</pattern>
    <template>
        <srai>HI</srai>
    </template>
</category>
<category>
    <pattern>HEY *</pattern>
    <template>
        <srai>HI</srai>
    </template>
</category>

Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!