Sunday, December 6, 2009

API VS mark up language

For a chat bot system's implementation, a lot of people uses a pure API based system. The obvious reason is for flexibility. When you are using an API based system, your bot author are trained developer. Your bot are exposed to the full functionality of a real programming language. It will very easy to make your bot to interface with different chat system, like chatroom, AIM, liv messenger, etc. The short coming is, it is hard to maintain the "content". For a smart chatbot loaded with complex knowledge to do something useful. It is not easy and staight forward to put those in the code.

Naturally, developper will tend to organize those "content" related information in a data file. However, this content could be quite complicated and have its own structure. Along this line of thinking, AIML is invented. It did quite a good job in organize questions and answers. It also have some context support by introducing variables and javascript, so some degree of flow control or programming interface can be utilized. It also divide the role of a developper and bot author. From now on, bot author can just be tech writes or people has domain knowledge with limited xml training. They can be in full charge of a chat bot's behaviour. Fairly comparable to webmaster in charge of a website.

CML made the next leap. It provides sophiscated context support by introducing tree-structured topic and conversation, context-aware mis-spelling correction and a tag based semi-programming system. It also provides a java plug-in interface so you can access the full functionality of a real programing language is necessary. It can be as easy as AIML with better context recognition and match rate but as functional and flexibal as an API based system. You can have Bot author to maitain the "content" side of a chatbot and a developer to code for plug-ins to interface with a enterprise system. It is an attempt to have the best of the two sides. And it is doing that fairly well. Without any plug-in, it is already a better bot system than AIML due to it's context support, mis-spelling correction and a score based match system. With plug-in, you can do all the tricks an API based system can do.

No comments:

Post a Comment