Chatbot Technology Comparison

From Blue Mars Developer Guidebook

Jump to: navigation, search

The technology behind Avatar Reality's chatbot is much more sophisticated than that normally deployed on business sites or available in the general marketplace. Writing a chatbot is hard.


What makes our chatbot technology special?


Prior chatbot technology was designed over a decade ago and is based on old technological assumptions – low cpu, low memory, and simple system design.


A.L.I.C.E. and the AIML technology underlying her exemplify this old school. Writing rules in AIML is cumbersome, requires support tools to manage it, and is not very expressive. All it does is handle literal word pattern matching. It takes huge numbers of patterns to try to match simple things. CHAT-L matches patterns of meaning (sets of words). Consider this example. Suppose you want to detect that someone likes a particular food. In AIML that would require something like:

  • I * like * steak
  • I * like * french fries
  • I * enjoy * steak
  • I * enjoy * french fries
  • ... and on and on for tens of thousands of patterns

In CHAT-L, it would be:

  • I * ~like * ~food

which means I some approximation of liking (include like love enjoy favor have-deep-appreciation-of lust-after ...) some specific food (of thousands).


PersonalityForge is a significant improvement over A.L.I.C.E., being more expressive, but it still is based on old understandings of technology and chat.


Nature of Chat

Chat is not just receiving an input and generating an output. Chat is generally a volley of words between two participants where facts and opinions are exchanged. The exchange is important. One does not like to give out much information if one is not receiving some back, particularly personal information. Hence a common flow is for one side to volunteer something and, after perhaps optional followup or questions about it, the other side then returns with a similar bit of information. An equivalent flow is for one side to ask a question, the other answers it and either flips that question back or expects the originator to automatically provide the equivalent information.


Chat is predictable in that topics tend to last for a bit, going into deeper and deeper material after skimming off the common initial information. “Where do you live” can eventually lead to “What tourist attractions are there?”


Chat is interesting in that it is unpredictable and goes off on unexpected tangents. I say “I like onions” and you react with a rant about “The Onion”, some liberal writer’s magazine.

Consider this brief example from a chat with Suzette:

  • S: I sometimes enjoy pretending I am a tour guide.
  • U: do you like paris
  • S: No I prefer New York.
  • U: and paris hilton
  • S: I have heard of Paris Hilton. I don't care about her.
  • U: she nice
  • S: Glitterati are just silly things to care about.

The AR Advantages

Integration with additional technology - Avatar Reality's chatbot takes advantage of modern hardware and is a mashup of current technologies. It integrates knowledge representation, inferencing, and SQL and parsing directly into the scripting language.


Support for a theory of chat - The engine directly supports the above understanding of chat behavior. It can initiate new topics, carry out the narrative of the topic, and yet interrupt the topic with prompt answers to questions.


Because topics have lists of associated vocabulary, the system can decide which topic a sentence more closely resembles, and thus begin its quest for a response in the most likely topic first.


The actual control structure for chat is itself data and can be manipulated by the chatbot to create different personalities or to simulate different conditions. For example, the chatbot could be generally well-focused and responsive and pretend to have several drinks. It changes its control flow and now for some amount of volleys it becomes scattered, loses track of what it is saying, etc. And then slowly comes out of that and back to normal.


Multiple passes - Our chatbot technology supports multiple pass processing. Most chatbot technologies walks down a decision tree to find a pattern match and then are done. There is a single result and a single output. With AR chatbot technology the system can process the user's input multiple times. This allows you to create multiple different mechanisms using different data to process the input. One of the passes may generate additional information for later pattern matching. Another may find a response. Another may then look at the input and proposed output, and decide to add personality flavoring to the output (additional sentences) or adjust weights that represent the chatbot's attitude toward the user or the topic. For example, if the user input was:

I love your cats.


One script processing pass may classify this as a statement of liking of something of the chatbots. Another pass may generate a reply

  • Cats are great.

A third pass may decide to up its liking measure for you since you both share an interest in cats. And if it finds that liking you has crossed a magic threshhold where it now considers you a best friend, it might add in the comment

  • I love it that we share this in common.

So the final output becomes

  • I love it that we share this in common. Cats are great.


Concise patterns - Our system supports very concise representation of patterns. One rule in our CHAT-L language can equal 4 or 400 AIML rules or 4000. This comes from allowing users to write functions to express common multiple ways of saying something. And using sets of words instead of single words. For example in CHAT-L you can write a rule that reacts to every conceivable name of a color or every kind of animal. This can only be done with individual rules in AIML. For example the rule:

  • s: (you * ~like * _~food) Isn't that amazing. I eat _#0 every day.

would react to instances of the user saying he {likes, enjoys, prefers, relishes, ...) any food, whereas AIML would require a rule per each food item. ~like is a synonym set for words that mean like (including desire, love, enjoy). ~food covers all food items listed in the Wordnet dictionary plus supplemental words (like Cheerios).


Support for meaning - Our system supports writing patterns that actually get at intended meaning. Other chatbot languages do not support describing what should NOT be in an input. Negative words often invert the meaning of a sentence. And sometimes the addition of a word to a phrase changes its idiomatic meaning drastically. Negative space in sentences is just as important as it is in art. And while chat languages allow you to specify wildcards between words, that match any number of words, no other language has the notion of a short-range wildcard. For example, imagine a pattern and output:

  • ( I * like * you) Thank you.

This uses normal wildcards and is really the best AIML could do, except it is a lot more cumbersome to write their equivalent). It can match I really like you. Unfortunately, it can also match I really like sushi, does that make sense to you. This is a horrible match.

A short range wildcard matches only up-to-two words, requiring the pieces you are trying to match to be close together.

  • ( I *~ like *~ you) Thank you.

This pattern would not match the sushi input. Of course it would match I do not like you. but we can improve the pattern to prevent negative matches.

  • (![not never] I *~ like *~ you) Thank you.

Now, using the ! operator to exclude inputs with the not or never in them, we have a pretty reliable match to our intent.


Short range wildcards and being able to describe the negative space of an input provide powerful support for meaning. But there's more. We support matching sets of words, like synonyms. So we can improve the pattern again by

  • (![not never] I *~ ~like *~ you) Thank you.


Introspection - Our system has access to internal statistics and data about why it made its decisions. It's important to know, for example, that the user has been asking question after question w/o contributing anything in return. Or that the user has conversed for a long time with the chatbot. Or that the user's input consists primarily of 1-3 words, indicating they are not fully engaged in the chat. Or that the system's generated reply was a quibble because it found nothing substantive to say. Scripts can take advantage of all these things. For example with this rule:

  • u: (%avgwords=1 %rand>5) ^set(%avgwords 5 ) Think you could start contributing to this conversation?

the system comments if the user tends to reply in monosyllables.

Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools