AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Comparing AIML to the “narrative and keyword processing” approach
 
 

This is shameless self promotion as well as a way to show my ignorance of AIML but after a week of trying AIML I now have a faint grasp of how it is different from the approach I am taking in Narwhal (https://github.com/peterwaksman/Narwhal) which is focused on keywords and key narratives. The difference is: AIML is focused on sentence structure not narrative structure.

Consider a simple example of a chatbot at a bakery and the input phrase “I want to order bread”. It receives this input in a context where it is waiting to hear if someone wants bread.

The simplest method is to spot the word “bread” because that is what you are looking for in the input. In Narwhal you just create a list of synonyms and misspellings for “bread”. But when I tried to do this in AIML I had to consider all the versions of “I want to order X”, “Please send me X”, “I need a X”, “I need an X”, “We want to get X”, etc… It is only after matching one of those ‘pattern’ phrases could I read in the word “bread” using the <star> value.  Then the code is able to test if <star> equals bread.

I cannot escape the sense that AIML wants to echo that <star> value back to the client, while replacing the surrounding text with something in the form of an answer. That makes perfect sense if you want to simulate a conversation and not care about the actual content of <star> but it is misplaced effort if your bakery needs to know whether to deliver bread.

There is a large combinatoric complexity involved in handling sentence variations and much less in handling narrative variations. In practice if there are N synonyms for “bread” and M synonyms for “want” then programming complexity should be N+M for keyword variations. I am guessing the complexity for AIML is a function f(N,M) that is worse than N+M. (Does anyone have a sense of what f(N,M) should be for AIML?)

I believe it is this same combinatoric complexity in NLP that has people complaining about it where NLU does not necessarily have that problem

Finally, the narrative for the bakery example is something like [WANT] [BREAD] and there is value - at least in terms of readability - to having that be explicit in the program. I am pretty sure there is a combinatoric advantage as well. To really highlight the difference, [WANT][BREAD] is a perfect match for “want want get loaf want bread get bread bread now” because it collapses down to the same thing.

 

 
  login or register to react