I would like to understand a little bit more about the bot memory.
We have two kinds of memory: short memory and long memory.
I mean, if I ask about the weather and the bot could respond about the current weather. So if I put the question "and tomorrow?". I would like to know if the bot is able to understand the context.
I mean, the bot is able to identify the user (through the login, for example) and then respond some questions based on the user profile, stuff like this.
Improving the knowledgement:
I mean if we can improve the bot aiml code, for example "what is a car" and then the bot will build some possibles for the same question, kind of "how is a car, where is the car", do you know want I mean?
The idea here is to share some improvement with each one that is interested on that!
Thanks a lot
I'll try to match your two concepts of memory with ways in which an AIML based bot might process information:
1. Short-term memory - your example being "What is the weather like?" followed by a further question that you want the bot to remember is within the weather context. This is quite simple to demonstrate - imagine that the response to the pattern "What is the weather like?" is "The weather is ..." (and then the type of weather - perhaps consumed from a web-service such as the UK's Met Office). The you could construct the following category:
<that>The weather is *</that>
I'm afraid I'm no good at forecasting weather.
Notice that I use the "that" tag to specify a pattern that matches the previous response.
Another strategy would be to set the topic as "weather" and include a set of categories for general weather chit-chat. Whereas the "that" pattern matching is excellent for immediate short term "memory" setting and using the topic tag allows you to place a set of interactions within a short-term conversational context.
2. Long term memory: once again, this is very simple. In AIMLBot every user with whom the bot talks to is encapsulated within a "User" object. The user object contains a predicate hash that you use by "get"ting and "set"ting key/value pairs. This hash has the ability to output itself as XML (so you can save it in a database or in the file system) and read in an XML hash. For example, the user's name is stored in this way by the standard AIML set.
3. Single matches for multiple inputs - this is (again) simply achieved with the <srai> tag. The example at the following URL (on the ALICEBot web-site) demonstrates how simple this is: http://www.alicebot.org/documentation/srai.html
Thanks for the interest,
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.