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..

How does aiml really work
 
 

Hey I am trying to create UML diagrams for my chatbot and I would really like to know how does aiml pattern matching work? I know the basic of aiml but now I would like to know what is really going on when the bot is matching patterns

 

 
  [ # 1 ]

That depends on the platform, really, and can even vary between versions of the same platform/script. For example, version 1 of Program O used Regular Expressions to select the “best match” between all AIML categories stored in it’s database, while versions 2 and 3 use use PHP’s SimpleXML/XPATH functions to do the same job. According to the AIML 1.0.1 Specification, there are only a few simple(?) rules that govern how patterns in AIML categories are matched. You can read about these rules here. Other chatbot engines/AIML interpreters handle the task of pattern matching differently, I’m sure. smile

 

 
  [ # 2 ]

The Slashdot Interview

http://www.pandorabots.com/pandora/pics/wallaceaimltutorial.html

My answer would be that it depends on the stimulus and the number of potential responses.  There is minimal AIML published by AIML designers that does nothing more than just test each pattern matching capability a single time.

 

 
  [ # 3 ]

With the new AIML 2.0 specification, and the addition of sets and maps (and the new zero-length wildcards, for that matter), that’s going to change, I’m sure. I’m still battling with how Program O will deal with the new possibilities, to be honest, and that’s the biggest challenge with the release of version 3. I need to sit down with someone who is experienced with Java, and work out with them how Program AB does it, since I can’t make out much of the logic in the source code on my own.

 

 
  [ # 4 ]

I understand that for the AIML 2.0 specification, the example code is in Java.  But there are already efforts to implement the new specs with C, C+, and C#.    Dr. Wallace carefully selected the new index capabilities of 2.0 to remedy the long standing faults of AIML 1.  So once we see a bot re-coded with categories and relationships that fully exploit the new features of AIML 2.0, we should see a significant increase in the intelligence of the bots or at least see some of the typical weak responses mitigated.  I expect to see better pattern filtering / selectivity and more object granularity.  Also with sets you will be better able to define the relationships between objects.  This will mean a even larger Knowledge Base (KB) size.  To sum it up, AIML 2.0 has a better / stronger search engine.  I agree that unless you have some background in database design, if not also set theory, the explanations are difficult to follow.  As there are now many many more grad students involved with AI than ten years ago, I am optimistic that a lot of new talent will be using and helping us mere mortals understand how best to design the AIML 2.0 knowledge base.

 

 
  [ # 5 ]

How does aiml really work

Most basically, pattern matching such as AIML is a form of search.  (Search is generally considered to be a form of Information Retrieval.)  AIML pattern matching is based on Markup Language.  The actual markup language or tags may be considered a kind of Metadata, or “data about data”.  Pattern matching does not have to be based on markup language or metadata.  Ngrams or Skipgrams (aka “concgrams”) may be used as defacto patterns.

Once identified, patterns do not have to be used with (or only with) pattern matching.  Patterns may also be used with a variety of statistical ranking methods.  Not only that, but question/answer chat logs resulting from pattern matching systems (like AIML) may be used as a training set for machine learning.

To the best of my understanding, an AIML interpreter functions as a rule engine - to interpret the markup language based on the rules contained in the various AIML specifications.  Statistical pattern ranking would be an additional interpretation method, and machine learning would be a third avenue to arrive at (appropriate) responses or replies.

 

 
  [ # 6 ]

trying to create UML diagrams for my chatbot

=> http://meta-guide.com/data-sources/mindmap-bots-mindmap-conversion/

I went through a whole journey trying to “mindmap” my chatbot, and then trying to get my chatbot to “read” mindmaps (see above link for details). 

In short, I haven’t (yet) found a good way to graphically represent an AIML knowledgebase, much less to edit it graphically.  The main problems with both writing and reading mindmaps are 1) lack of adequate standards, 2) consequent lack of inter-operability with other standards, 3) lack of ability to represent recursive relationships (in other words strictly hierarchical), and 4) use of nested ZIP files in the most popular mindmap format.

 

 
  [ # 7 ]

Dear Marcus,  Yes I agree with what you are saying, a great deal of the knowledge in a KB is the ‘meta-data’ represented by the structure of the code itself, the interactions between categories.  A GUI that accurately diagrams both the data base keywords and the code structure would be a huge boon to AI chat bot developers.

 

 
  [ # 8 ]

“Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it’s worth it in the end because once you get there, you can move mountains.”

—Steve Jobs

 

 
  login or register to react
‹‹ encrypting AIML files      Creating ALICE ››