I was wondering if there is a way to specify a particular pattern with a particular type of tag that means that no matter which <topic name=”“></topic> sub-topic a conversation is in the AIML engine would look throughout the whole of the AIML file for the set pattern, rather than just within the bounds of the sub-topic?
Not sure if this makes any sense to anyone but me. My AIML bot is used by students learning Chinese for scenario based conversations in Chinese. The structure of the AIML files/conversations is such that the bot will ask a specific question and through the use of the <set name=“topic”>.....</set> tags will automatically move the conversation into a specific sub-topic. Once in the sub-topic, a range of patterns to be matched are available that relate to that sub-topic. Some <template></template> responses will throw the conversation back out to the general part of the AIML file (again using <set name=“topic”></set>), while others will keep the pattern matching within the sub-topic until a point in the conversation is reached where it needs to move on to a new sub-topic or it can return to the general part of the AIML file.
An example would be, after entering our restaurant, a student/customer is greeted by our waitress bot. When the student/customer replies with the equivalent of ‘hello’, they are welcomed and then asked if they want to have a meal. At this point, the AIML throws to a sub-category called ‘enterdialogue’. If the student/customer says ‘yes’ they want to eat, the bot waitress will then ask ‘how many people’ and automatically throw the AIML over to the next sub-category (<set name=“topic”>howmany topik</set>). A range of possible responses from the student/client is possible within this sub-topic (i.e. ‘only one’, ‘two of us’, etc.). Depending on the answer given by the student/client, the bot waitress will then say ‘good, please follow me’, begin waling towards a pre-set table, and the AIML with then throw to another sub-topic (which starts off the conversation about ordering particular dishes).
This structure works well, except for the fact that there are some questions that could come up at any time in the conversation and that are not necessarily directly related to the particular sub-topic for that part of the conversation. At the moment unless this type of question/pattern is entered into every sub-topic, the AIML will not find the question/pattern within the sub-topic and will give the default response of ‘I don’t understand. Could you repeat that please?’ (which is entered in every sub-topic).
Is it possible to tag some questions so that no matter what sub-topic the conversation is in, the AIML engine will look outside the sub-topic (i.e throughout the whole file or all of the associated files) for a match if it can’t find one within the sub-topic?
Sorry to be so convoluted with my question.