Multiple AIML containing same patterns. How to fetch it according to users preference

Hi There!
I have a chatbot which contains 'n' number of AIML files. each AIML files are related to different topics. but it may contain same patterns which causing a conflict while getting a reply from the chatbot. I wanna identify which topic the user is looking for.
So how can I configure my chatbot according to this requirement?

Comments

  • edited February 6

    for the purpose of debugging your aiml, or allowing the user to steer the topic?
    in either case, you should just need to set up some appropriate aiml rules incorporating something ike eg:

    ...
    <pattern>lets talk about *<pattern>
    <template> 
       <set name = "topic"><star/></set>
    </template>
     ...
    
    ...
    <pattern>what are we talking about<pattern>
    <template> 
       <get name = "topic" />
    </template>
    ...
    

    don't forget to add similar/identical topic escape & enquiry rules in each topic section, else you'll leave the user in a topical black hole ;).

    i haven't tested 'topic' tag fully yet in the latest release, but it seems to generally work. the real issue i find is in ensuring a consistent/traceable SRAI traversal - default wild card algorithm works by selecting a random pick from the 'top scoring' wildcard/SRAI matches - although the devs have recently implemented a new config swich to change wild cards to seek eg; most recent matcing, or oldest matching, & other variants - looks very useful indeed & long overdue (though again, i've yet to test it thoroughly).

    does this help? or have i misunderstood your question?

Sign In or Register to comment.