-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Learn bot #58
Comments
Hi, The XML files contains the rules which are parsed and loaded into memory to create the parse tree that then interprets the questions you ask the bot. There is no XML database as such its all in memory So to teach the bot the ability to answer new questions you create your own .aiml files with the appropriate grammars and then reload the entire bot. I am in the process of writing a tutorial for aiml, and there is some basic documentation in the wiki on how to get started. I'm not sure what you are referring to in terms of "sort these data by the necessary categories" K |
@keiffster, If the user has asked a question for which there is no answer, I want to understand to which category (which AIML file this data can be attributed), then the bot should ask a leading question to find out what exactly the person means, in order to Afterwards, having received the same question, he had an answer to it. And what about the fact that the user data is lost after the bot reboots? I understand that it is necessary to record at least the session ID in the database, and to link user data to this session, but I have not yet fully understood how to do this. I already write the session to the user in the cookie, and I get it to the REST backend, but I do not understand what to do next. |
If a question is not understood, then part of the recursive tree decent is to look for a more and more generic pattern. For example You are correct at this time there is no persistence once the app terminates. The typically way with AIML to remember something is to use the tag which writes the knowledge as new rules which are then reloaded at restart. However there is no session management within the app at this time, its not something that is covered in AIML 2.0 spec but something I am looking at and may result in the introduction of some sort of session storage database |
I think conversation and var/predicate persistence might be good, but then anything further than that I think is going beyond the core bot framework. For us, much user information is stored in other systems and we real-time pull what we need from those systems. There's nothing stopping someone writing an extension/service for such functions as an optional add-on :-) Perhaps if we are just reloading the braintree it can also reload session info, but perhaps a full reload of the XML should (by default) wipe the lot and start from scratch. Would be good to have the option - this leads to my next point... Can we do partial refresh of AIML, sets, predicates etc, without restarting the entire bot? That might require more fundamental changes (as I think every brain row would need to track the original source aiml/config, in case later we want to refresh it). The idea is to reduce the changes that require a full "reboot". Perhaps something for the back-backlog.... not urgent. |
I do not know how it works, I did not have time to figure it out yet, but they use a MySQL
@ideasean , @keiffster what do you think about it? |
For our requirements, we don't need a large AIML set, and the performance to date has been fine. The fact that Program-Y runs all-Python is a key feature for us. Adding a MySQL requirement opens up all sorts of issues for enterprise deployments (support, standards, which security zone the bot goes in, firewall rules, ...). For a more general chatbot with a large AIML set, I can see things might require optimising. I tried loading The Professor demo bot but didn't get far. But then, I think for the bulk of its content I would push the query to a wikipedia or other knowledge API. Even a human at some point would say "have you heard of this thing called Google?" If optimisation was required, I would perhaps suggest trying one of the caching or indexed data-frame python libraries (or other approaches). Given Python is one of the most popular big data languages (after R), I am sure there would be a way of speeding things up without the overhead of a full RDBMS. I've also been reading Designing Bots. It makes an interesting point that a bot that instantly responds "feels weird" to many people. Some delay is a good thing (perhaps could be a feature Keith - a minimum response delay?? ) :-) |
The problem that I personally see for myself, in all bots that use AIML so far, is that their files are static, bots can not learn in the process of communication, and in fact, they read responses from files. This is a good option when the predictability of the bot is important. He does not have the one that I did not write to the AIML file, or that can not be obtained from external services. But when I need a bot to learn, and become smarter from communication with each person, supplementing my library of knowledge, the solutions that I found do not fit. I really like the Project-y, and that's the best I've found, especially since I'm basically writing to Python. However, I'm still looking for how I can do what I want with him. With performance, everything is fine, more than, except that the Professor, requires about 16 GB of RAM :) But he responds super-fast. |
Unfortunately users cannot always be trusted... Microsoft silences its new A.I. bot Tay, after Twitter users teach it racism I think Keith is doing a great job to make it as extensible as possible. Hopefully there is a mix of extensions and updates to core that will work. Perhaps break down some of your core update priorities and Keith can put them on the backlog. Sometimes backlog items seem to get done at the time I find I need them! :-) |
Yes, users can not be trusted learning bot, almost always, I agree. But how then to fill the bot with thousands of AIML files, give him thousands of brain files so that he knows the colors, cars, moods, and so on. But even the problem is not this. If I want to initiate a conversation from the bot, for example, if I write to him, that went to the parking lot behind the car so that on return, the bot asked how I went to the parking lot, or if I say that I'm sick, so that the bot inquired about my health, etc. I am am confused by the very technology of AIML. It initially seems simple and attractive, but then, personally to me, it seems the imitation of AI. |
All AI so far is an imitation of intelligence, just in varying degrees :-) Even Eliza is still considered an "artificial" intelligence. AIML is generally a pattern based approach. What you are probably looking for is a mix between NLP and deep learning. Facebook M, with the millions behind it, is still only part of the way there
I don't imply to give up… There is a ton of value that a bot interface can add quickly. It also forces developers to think harder about user interaction, which is a good thing. I think we are still a long way from a generally intelligent artificial intelligence. According to some, that's a good thing too :-) |
What do you think about https://github.com/bwilcox-1234/ChatScript ? |
Unfortunately it doesn't support AIML. This was a factor for us. Your requirements may differ though. Cleverbot also seems to have more learning capabilities like you are after, however it hasn't done so well at the Loebner prize for the past few years. |
Just an update on Professor. Yes it is huge, close to 500k terms, but also over 80k problems. Another contributor is currently work8ng through these bu5 dies highlight that there are a lot of broken aiml files out there. A fix for Professor is close, huge thanks to michel who has be3n working hard cleaning this up |
I have a few questions about the training.
I understand how learning works like "learn * is *", or "my name is *"
And I understand that this data is stored in memory, that is, as long as the application is running.
But I would like to supplement existing files, or even create new ones, through this training.
I also thought that you can use the XML database to store this information.
Why have not I seen an example of using a database for these purposes?
But even if you learn how to create files, or if you want to use a database, the question is how to sort these data by the necessary categories.
I still have very weak knowledge in neural networks and in-depth training.
But I am constantly learning, and soon I will be able to do relatively complicated things.
The text was updated successfully, but these errors were encountered: