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

learnf - how to replace or delete a learned fact
 
 

I am experimenting with an aiml 2.0 chatbot on the free Pandorabots playground.  The learned facts are stored in a file pand_learn.  I thought that if I processed a learnf tag with the same pattern but a different template that the original would be replaced but it seems to append every change to the file and there are multiple templates for the same category/pattern in the pand_learn file. 

Is there anyway to replace a category/pattern so that it can be updated?  Also is there a way to delete a pattern not used anymore, ie. to unlearn a fact?

 

 
  [ # 1 ]

Yes, the file gets appended with the new learned fact. This isn’t a problem though, as AIML will load the facts in order and so the latest one will always take priority.

To remove a fact, you need to create one with no template and so it won’t count as a match. That is a category with just a pattern.

 

 
  [ # 2 ]

Thanks Steve. 

I was trying to implement a more flexible way to store “facts” of subject verb object triples using an index number.  The pattern was just an index number and the “fact” was the template.  I had a method of updating the information and during testing I did it frequently.  I believe that the approach is still workable for information that does not change often.  The main issue is that the size of the pand_learn file is limited so filling up the file with extra categories that are not being used is not ideal.  And manually going through and editing the pand_learn file to remove old information will need to be a maintenance task. 

Thank you for explaining to me and others how to “unlearn” a fact. 

Happy New Year to you and all the chatbot authors out there!

 

 
  [ # 3 ]

Happy New Year to you also. I would suggest that maintaining the learned facts of an AIML chatbot is a vital role, along with checking the chatlogs. If this is neglected, you will soon have a bot that swears and talks about sex while spelling its responses badly smile

 

 
  login or register to react
‹‹ learnf      learnf - AIML "Facts" ››