Showing posts with label safe reduction. Show all posts
Showing posts with label safe reduction. Show all posts

Tuesday, April 21, 2009

AIML Superbot Upgrade

The AIML Superbot is a convenient way to create your own unique bot personality. The Superbot contains the top 10K most activated AIML patterns in the ALICE brain, with blank templates. Organized in a spreadsheet, the Superbot allows you to sort the AIML data by pattern, template or activation count.

The Superbot has now been upgraded to included the Safe AIML Reductions. These reductions can be used with any bot, and avoid the dreaded "infinite recursion in AIML" error message. The AIML Superbot is now available with the Safe AIML Reductions together as one package, for the same price of $999. To order click here.

The Safe AIML Reductions are not included with the Superbot-1K offer.

Sunday, March 29, 2009

Safe AIML Reductions

The ALICE A.I. Foundation is pleased to make available a set of over 20,000 AIML reduction categories that can be used with any bot. These reductions simplify a huge range of natural language inputs. These categories:

Resolve Synonyms: Map inputs "Hello", "Hi there", "Howdy" etc. onto "Hi".

Simplify Inputs: Convert "I am feeling very happy right now" to "I am happy".

Divide and Conquer: Split "Yes my name is Jim" into "Yes" and "My name is Jim".

The Safe AIML Reductions contain only reduction responses and is stripped of all ALICE bot personality content. You can use the Safe AIML Reductions with any AIML chat bot. The Safe AIML Reductions will save a lot of time when you are developing a unique chat bot personality.

The Safe AIML Reductions avoid the dreaded "Too much recursion" error message in AIML by using <srai>'s that eventually terminate. The Safe AIML Reductions are delivered to you in the form of AIML files.

The Safe AIML Reduction set is available for $399 with a commercial license and $249 for non-commercial use by hobbyists, students, youth, seniors or disabled.





Safe AIML Reductions v1.0Commercial License$399






Safe AIML Reductions v1.0 -
Special Offer
Non-commercial use$249






Saturday, March 28, 2009

Safe Reductions and Dangerous ones

In order to help people make their own chat bots, with their own unique personalities, we would like to leverage as much of the ALICE bot as possible. The ALICE bot contains a large number (around 20,000) of symbolic reduction categories that use <srai>. Generally speaking, these reductions should be applicable to all English speaking bots. They take care of such things as associating synonyms, transforming inputs into simpler forms, and splitting inputs into smaller chunks. Fortunately, it is fairly straightforward to extract these from the ALICE brain into a set of distinct reduction categories, and then try to use them with other bots.

A simple and useful application of the reduction categories by themselves is a bot called the Summarizer. The purpose of the Summarizer is to simplify paragraphs and reduce the number of words. The Summarizer works not by reducing the number of sentences, but by applying as many AIML reductions as possible to reduce the number of words in each sentence. The ultimate default category in the Summarizer with <pattern>*</pattern> simply echos back the input. When the Summarizer can find no more reductions, it prints out the result. The following are some examples of the types of simplifications found by the Summarizer:

I AM FEELING VERY TIRED RIGHT NOW --> I AM TIRED
IN FACT HE HAS GONE TO ANOTHER COUNTRY --> HE WENT ABROAD
YOU CAN REST ASSURED WHAT HE SAYS IS ABSOLUTELY CORRECT --> HE IS CORRECT

When we first created the Summarizer bot, the first step was to export the AIML reductions from the ALICE bot. Although the extraction was straighforward, we quickly noticed an unexpected problem. The ALICE bot contais reductions such as

<category>
<pattern>WHO IS * WALLACE</pattern>
<template><srai>WHO IS RICHARD WALLACE</srai></template>
</category>


The author's original intention for this category is clear. There conversation logs contain inputs such as "Who is DrRichard Wallace", "Who is Richrd Wallace" and "Who is Docter Wallace". The botmaster would like to capture all of these inputs to be classified the same as "Who is Richard Wallace". In the context of the ALICE bot, it is far less likely that the input will be "Who is Henry Wallace" or "Who is William Wallace". Given the topics ALICE talks about, an approrpiate startegy for the bot is to guess that the client intended to ask "Who is Richard Wallace?"

Once this category is extracted to the Summarizer bot however, there is a problem. The base category with the pattern WHO IS RICHARD WALLACE no longer exists. Suppose the input is now "Who is Richard Wallace?" AIML will match the input with <pattern>WHO IS * WALLACE</pattern> and then recursively try to match "WHO IS RICHARD WALLACE" again, leading to infinite recursion.

Therefore it became necessary to filter out these "dangerous" AIML reductions. How can we identify reductions that might lead to infinite loops? Technically it is mathematically impossible to prove that a reduction will lead to an inifinite loop (otherwise we would have solved the unsolvable Halting Problem). What we can do however is identify a set of reductions that are "safe", i.e. guaranteed to eventually produce an output by applying only a finite number of reductions.

A "safe" reduction is one that takes an input, and then calls <srai> with a shorter input, that is, it reduces the number of words. If every reduction reduces the number of words by at least one, then eventually the number of words has to reach one or zero, and the program will terminate. For example these reductions are safe:

<category>
<pattern>I AM REALLY *</pattern>
<template><srai>I AM <star/></srai></template>
</category>

<category>
<pattern>DO YOU KNOW WHAT * IS</pattern>
<template><srai>WHAT IS <star/></srai></template>
</category>

<category>
<pattern>YES *</pattern>
<template><srai>YES</srai> <srai><star/></srai></template>
</category>

The last example is considered safe because the divide and conqer splits the input into two parts, one of length one, and another with one fewer words than the original input.

Some reductions not considered safe are:

<category>
<pattern>WANT TO *</pattern>
<template><srai>DO YOU WANT TO <star/></srai></template>
</category>

<category>
<pattern>I LOVE *</pattern>
<template><srai>I LIKE <star/></srai></template>
<category>

<category>
<pattern>CAN YOU SPEAK *</pattern>
<template><srai>WHAT LANGUAGES DO YOU SPEAK</srai></template>
</category>

Again, it is not necessarily true that these categories will lead to infinite recursion. But the safe set is guaranteed to terminate, so we are better off using them in our general purpose AIML reduction library.