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

Chatbot Interpreter vs. Rules Engine
 
 

data <=> knowledge <=> natural language

Could anyone please explain to me the difference between a “chatbot interpreter” and a “rules engine”?? 

Is a “chatbot language” not just a set of “rules”? 

 

 

 
  [ # 1 ]

Would a “Rules Engine” not just be a means of generating certain rules for use in the operation? Perhaps rules that could be processed in a Chatbot interpreter. Perhaps they just go hand in hand. Or I could be completely off and I know nothing raspberry

Just my 2 cents.

 

 
  [ # 2 ]

The line between an interpreter and a rules engine is blurry. Gary Dubuque’s AIML program N included both an AIML interpreter and an Expert System that could be used to do Case Based reasoning (rules). It also included a javascript interpreter.

Rules engines tend to be able to execute IF/THEN statements until conclusion of operation (and elimination of loops).

An AIML interpreter could be considered as stating:
IF I SAY ...
THEN YOU SAY ...

The additional components of a chatbot interpreter often handle things like spelling errors or ‘sybolic reduction’.

 

 
  [ # 3 ]

I’m not familiar enough with terminology to give a sensible answer, but as an opinion I think of all types of AI as rules, just with a different depth of instruction.

The pattern [if “A *” then “B *”] is the same as the rule [if A then B]. Both are set in stone and the program has no choice but to follow those exact instructions. However, not all rules have to be as literally built-in. One can have a variable database and use subsets of rules to weigh an abundance of factors, so that the outcome of A may turn out to be anything from A to Z. With some effort, certain chatbot languages can do the same though.

 

 
  [ # 4 ]

Don,

How about that rule in math notation: φ→ψ

 

 
  [ # 5 ]

I’m afraid my education didn’t cover greek symbols smile
But for all I know Marcus’ question may be rhetorical smile

 

 
  [ # 6 ]

Have no fear.  We are all friends here. It was just some of the chatbot programming discussed on this thread, translated to some elegant math notation.  Here is a bit more…

φ→ψ∧¬φ→τ

Meanings:

φ ... P
→ 
... then
ψ 
... Q
τ  
... 

if P then Q else R

if “HELLO” then “Hi there!” else “Please go on…”

How do you feel about math notation being used in chatbot design?

 

 
  [ # 7 ]

Although my late father was a mathematician and programmer, I’ve only recently started looking into mathematical symbolism of algorithms.  I’ve spent a number of years reviewing the academic literature of “chatbot design”, more generally referred to as “dialog systems”, frequently couched in the mathematical symbolism of algorithms. 

Only recently I took a short course in machine learning, with an Indian instructor who was completely in love with algorithms, and began to crack this mysterious “code”.  Basically, the algebra of algorithms can be used to describe the geometry of three dimensional processes, for instance modeling biological processes mathematically.

One of the lessons I learned in Bangalore was that if your algorithms are sound then the programming language becomes irrelevant.  Sound algorithms can be implemented in more or less any programming language.

 

 
  [ # 8 ]

Marcus asked, ‘Could anyone please explain to me the difference between a “chatbot interpreter” and a “rules engine”’?

Yes, I can.  A chatbot interpreter may be a rules engine. And a rules engine may be a chatbot interpreter. Yet a rules engine, unlike a chatbot interpreter, is not limited to chatbots.  For example, a rules engine may be an expert system.

Marcus asked, ‘Is a “chatbot language” not just a set of “rules”?’
I think, “Yes!” it is advantageous to keep the “chatbot language” script separate from the interpreter, which analyzes and executes that set of rules.  However, I think RiveScript may be considering embedding some of the interpreter into the script by adding conditional branches.

 

 
  [ # 9 ]

All programming languages are the same to me, some are just more convenient than others. AIML seems to provide enough functions to be used as a programming language, people just rarely use them.
I didn’t know math could contain if/then rules, I always thought of mathemetical formula as leading to only one outcome parallell to their variables. But yes, your math notation is the same thing.
Personally I can’t wrap my head around large mathemetical formula. I think the danger is that math is too abstract, it seems easy to play math with variable A, with “the code”, and forget what it actually represents. For similar reasons, people have approached me taking offense to the idea that any part of the human mind or conversation could be recreated in “a mathemetical formula”.

 

 
  [ # 10 ]

I’d agree with 8pla: an interpreter is an implantation form. A rules engine can be implemented as an interpreter, but it could also be compiled. A chatbot could be designed as an interpreter or you could hardcode it and compile everything.

 

 
  [ # 11 ]

Well myself no programmer… so don’t know much but I think in my opinion there no difference in Chatbot Interpreter and rules engine if not taken in specific sense. A interpreter also works as per some rules. Doesn’t matter if we use it in the sense of basic or java language interpreter itself. Interpreter just means which interpret some code or text whatever (in general sense). But the job of interpretation can’t be done randomly. It’s a systematic process which obeys certain rule. Even natural language obeys rules just in more general form than hard core mathematics.

As far as natural language or language is concern. We always follow some rules while constructing or interpreting a dialogue or text. Without which everything is just garbage in the first place. Rules are not just about 2 + 2. Rule can be anything i.e a formal dress for some occasion kinda rule too and are more important in NLP case then in pure mathematics.


Marcus Endicott says…

One of the lessons I learned in Bangalore was that if your algorithms are sound then the programming language becomes irrelevant.  Sound algorithms can be implemented in more or less any programming language..


I beg to disagree to some extend on this. Algorithm has nothing to do with any programming language. Its just plain logic or set of rules to follow to achieve some objective. So programming language becoming irrelevant or not is irrelevant in itself. Like even pseudo code fulfils all the requirement needed to construct a algorithm even if it naive in a sense. So the thing is, once you have something clear in your mind about what and how to do it. Naturally programming language doesn’t count that much here at this stage. But its relevance only kicks in, when you take up the things for final implementation. So you go for your choice of things. You might know some language so it becomes a choice. So does some language if it provides some benefits in coding or library wise. I mean these are decisions have nothing to do with actual algorithm thing. The algorithm you thought about to achieve whatever objective. It’s about matter of choice.

But maybe you mean something else here by just chatbot or language interpreter. I just don’t know anything about except a bot called Alice wink And that to in general way ...not read its engine code… couldn’t do it with my capacity of things (novice programmer) ...smile.

But sure mathematics and general algebra has much to do with NLP thing if not all. Our mind is a rule based engine in a sense. Not strict mathematical type of ..but more liberal and broader and in general sense. At the base level ours is still a very efficient pattern recognition and comparison machine. But its new rule could be just a new pattern rather than any typical mathematical formula. We form upper level rules on top of that basic consciously or maybe something not so consciously. But it is this simple pattern recognition and comparison mechanism that gives us the ability to deal or survive in unpredictable environment. Cause you just have to detect difference or similarity and it become yet another rule.


And I think the basic level mathematics or set theory is very much used in normal talks. Just it is used in more general form and we selectively use it on certain conditions. i.e. A normal set theory can’t be used liberally on the word level within a sentence but are tactically used at entity level. In raw essence a sentence is just a collection of some entities in some ordered form. But it looks like that more of because you tend to see it through one language. There is certain way of saying things in language but if you take up all languages as whole or some free-form language this phenomena is more noticeable then in English. More when we do day to day talking than when we write things. A verb or noun positions could be easily interchanged and they mean the same things occasionally. Actually its call freezing of time within a frame or lets say one sentence. When you do uttering a sentence time doesn’t change. You just stating things without any regard to time factor most of the time if not all. Especially within a sentence.

i.e. you describe a scene with 3 or 4 sentences. Like…

Ram was running on the road. A truck was coming from opposite direction. And was coming too fast….

Most probably they can be ordered in anyway, until of it makes this time factor change or some other reason kicks in. Like in this case third sentence can’t be put before 2nd one untill you expect to annoy somebody ..smile. That is, you can’t state a property of something before you say what thing it is. wink. So comes into play other conditions or reasons to make thing stiff. Not good with my English I am, But I hope you get much stimulant to work out what I meant to say here. And that’s how I think our mind make use of as well ...stimulation element. You just have to systematic with your approach, that’s all. Logical I mean.


So its all about…

A rule is only as good as it is applied sensibly. wink


So whether you call your thing a interpreter or rule based engine or something. You can’t make a interpreter without any rules, can you? More or less of it can vary. So if this the criteria of differentiation then ..what can I say ..else both mean same thing to me.

And let me add a last line. The power of pattern recognition is not fully utilized if not done comparison. Doesn’t need to be in strict literal sense ..smile. But its at this level the simple pattern becomes a rule by itself. The more finer pattern you can decipher (knowledge) the more powerful your analysis becomes. And I think that’s the problemo with normal AIML based bots. They have to use it in some more refined and powerful way then just matching the bunch of text and outputting predetermined not so flexible output. Sure one can do it within the AIML frame work as he/she can do it any other way he/she likes. You just do thing in more systematic way and your chatbot becomes a expert system in itself. General one I mean! smile

But by the way AIML is import/export format isn’t it ..that’s what XML is I suppose….smile.

 

Lastly, Hiya guys to all of you! for who may know me and for who don’t smile


NickyBlue

(Note: Anyway rules are good for there own reasons… A purchi (cheat paper) is far more better than long hours of pure training sometimes ..smile)

 

 

 
  [ # 12 ]

And yes in some time to come I wud be brain storming - how to implement algebra or general mathematics to basic NLP task.

Things I am interested in are…

Boolean algebra

Basic algebra (a+b = b+a) sort ofs

Set theory etc at this time.


So any word how to will be very much appreciated. The bot I intend to make ..this time experimental works at char level at lowest level. That’s the basic entity for it until we introduce audio/visual system. Then obiviously sample patterns would be at lowest level. But lets say as for now its aware of individual char level not just word or sentence or other logical or semantic entity.

Thanking you!

 

 

 

 

 
  login or register to react