Monday, July 11, 2011

Attempting at a basic conversation AI

After finally saving enough to buy and build a system, I went over the long list of ideas that I've been wanting to build. I went through many iterations, and one that I seem to have got stuck on is building a conversational AI.

There are some things in life that a person just wants to see what he's capable of and this is one of those things for me. So please no solutions; maybe a gentle nudge or better yet a challenging question to my methods.

So I have been working on this for a couple weeks on and off. My first version of course was very simple model to respond to the user's response. This is primarily to set up my development environment and make sure things work. I worked through a few kinks in the JavaScript side.

I then attempted to start building lists of similar texts so that there is more dynamic responses. I simply used the Random class to generate which text to pick. Some examples include greetings like "hi", "hey", "hello", etc.

Then there were certain user messages (i.e. statements or questions) that have similar meanings thus the response would be the same set: "How are you?", "How're you?", "How're you feeling?", "What's up?", etc.

The latest obstacle was handling multiple level questions. If a user responds to a question, then the user's message is dependent on the question. Thus I have to remember what I asked to respond properly. If the user responds "Yes", I will need to provide a response appropriate to the question asked (e.g. "Are you bored?", "Are you hungry?"). It wouldn't be right to say "Go eat something" when I asked "Are you bored?".

Next step is to add a back-end to the application. Recently, I just haven't had time to take a break from developing the middle-ware.

I also need to vamp up the front-end to better handle a different style of conversation. Currently the message-response model cannot handle someone that splits ideas among several lines. This requires a lot of change to the conversation topics. In the mean-time, the AI should be able to send multiple messages.

It'll probably be a while till my next code update.

No comments:

Post a Comment