Monday, December 24, 2007

Parsing the Turing Test: Book Published

Six years in the making, the book Parsing the Turing Test has finally been published by Springer Netherlands. The book, edited by Robert Epstein, Gary Roberts and Grace Beber, is an impressive collection of 29 chapters by various authors on, as the subtitle says, "Philosophical and Methodological Issues in the Quest for the Thinking Computer."

The sponsor of the real-world Turing Test, Hugh Loebner, contributed a chapter, as did prior winners of that prize Thomas Walen, Robby Garner, Jason Hutchins, Richard Wallace and Kevin Copple. Philosophical chapters were contributed by such luminaries as John Searle, Noam Chomsky, Paul Churchland and Jack Copeland. Turing's original 1950 paper on the Imitation Game is reprinted as well.

This book, which also includes a contribution from the late Chris McKinstry, brings together philosophical and practical ideas for passing the Turing Test. Or if not passing it, placing the Test in a historical, philosophical and engineering context. No other work has merged the wide variety of today's Turing Test constituency

Browse the abstracts or order the book at: http://www.springerlink.com/content/r42614/

Note: although the author of this blog contributed a chapter to the book, we receive no royalties or affiliate payments for its publication.

Multiple Keywords in AIML

Have you ever wanted to convert an FAQ question to AIML, only to be confounded by the overly specific wording of the FAQ question?

For example,

Q: How do I unsubscribe from the email?
A: Unsubscribe and change preferences at http://list.pandorabots.com/mailman/listinfo/pandorabots-general

Most of us are familiar with the four AIML category approach to recognizing single keywords in the input:

<category><pattern>UNSUBSCRIBE</pattern>
<template>Unsubscribe and change preferences at
http://list.pandorabots.com/mailman/listinfo/pandorabots-general
</template>
</category>
<category><pattern>_ UNSUBSCRIBE</pattern>
<template><srai>UNSUBSCRIBE</srai></template>
</category>
<category><pattern>_ UNSUBSCRIBE *</pattern>
<template><srai>UNSUBSCRIBE</srai></template>
</category>
<category><pattern>UNSUBSCRIBE *</pattern>
<template><srai>UNSUBSCRIBE</srai></template>
</category>

But in many cases, the single keyword approach is too general. There may be a comepting FAQ question that uses the same keyword, such as "How do I unsubscribe a bot?" To make the input match more specific, we would often like to use a pair of keywords.

To make the bot respond to a wide set of variations of the input, we would like it to give the same answer to any input that contains the keywords. In this example, the two keywords might be "UNSUBSCRIBE" and "EMAIL". We would like the bot to give the same answer to any input that contains this pair of keywords, inlcuding for example "I want to unsubscribe from email," "Unsubscribe me from email," and "Email unsubscribe."

To accomplish this in AIML, we use a base category and a set of symbolic reductions, just as in the case of the single keyword match. The base category uses a simple pattern containing just the keywords:

<category>
<pattern>UNSUBSCRIBE EMAIL</pattern>
http://list.pandorabots.com/mailman/listinfo/pandorabots-general
</template>
</category>

Generally speaking, when dealing with a long, very specific FAQ question, it is better to try to summarize the input pattern in one to three keywords. This makes writing symbolic reductions easier and less error prone.

In our example, the symbolic reductions include combinations of the keyword and wildcards. For each pair of keywords ordered ("UNSUBSCRIBE", "EMAIL") and ("EMAIL", "UNSUBSCRIBE") There are 7 combinations of keywords with at least one wildcard. There is one extra category to reduce the atomic pattern "EMAIL UNSUBSCRIBE" to "UNSUBSCRIBE EMAIL":

<aiml>
<category><pattern>_ UNSUBSCRIBE * EMAIL *</pattern>
<template><srai>UNSUBSCRIBE EMAIL</srai></template></category>
<category><pattern>_ UNSUBSCRIBE * EMAIL </pattern>
<template><srai>UNSUBSCRIBE EMAIL</srai></template></category>
<category><pattern>_ UNSUBSCRIBE EMAIL *</pattern>
<template><srai>UNSUBSCRIBE EMAIL</srai></template></category>
<category><pattern>_ UNSUBSCRIBE EMAIL </pattern>
<template><srai>UNSUBSCRIBE EMAIL</srai></template></category>
<category><pattern> UNSUBSCRIBE * EMAIL *</pattern>
<template><srai>UNSUBSCRIBE EMAIL</srai></template></category>
<category><pattern> UNSUBSCRIBE * EMAIL </pattern>
<template><srai>UNSUBSCRIBE EMAIL</srai></template></category>
<category><pattern> UNSUBSCRIBE EMAIL *</pattern>
<template><srai>UNSUBSCRIBE EMAIL</srai></template></category>
<category><pattern>_ EMAIL * UNSUBSCRIBE *</pattern>
<template><srai>UNSUBSCRIBE EMAIL</srai></template></category>
<category><pattern>_ EMAIL * UNSUBSCRIBE </pattern>
<template><srai>UNSUBSCRIBE EMAIL</srai></template></category>
<category><pattern>_ EMAIL UNSUBSCRIBE *</pattern>
<template><srai>UNSUBSCRIBE EMAIL</srai></template></category>
<category><pattern>_ EMAIL UNSUBSCRIBE </pattern>
<template><srai>UNSUBSCRIBE EMAIL</srai></template></category>
<category><pattern> EMAIL * UNSUBSCRIBE *</pattern>
<template><srai>UNSUBSCRIBE EMAIL</srai></template></category>
<category><pattern> EMAIL * UNSUBSCRIBE </pattern>
<template><srai>UNSUBSCRIBE EMAIL</srai></template></category>
<category><pattern> EMAIL UNSUBSCRIBE *</pattern>
<template><srai>UNSUBSCRIBE EMAIL</srai></template></category>
<category><pattern> EMAIL UNSUBSCRIBE </pattern>
<template><srai>UNSUBSCRIBE EMAIL</srai></template></category>
</aiml>

You can do the same thing with three keywords. For example suppose the FAQ question is "I am still getting Pandorabots email and a I want to unsubscribe." The keywords in this case might be "UNSUBSCRIBE PANDORABOTS EMAIL". This time there are 95 combinations of keyword order and wildcards. Here are the first and last few:

<aiml>
<category><pattern>_ UNSUBSCRIBE * PANDORABOTS * EMAIL *</pattern>
<template><srai>UNSUBSCRIBE PANDORABOTS EMAIL</srai></template></category>
<category><pattern>_ UNSUBSCRIBE * PANDORABOTS * EMAIL </pattern>
<template><srai>UNSUBSCRIBE PANDORABOTS EMAIL</srai></template></category>
<category><pattern>_ UNSUBSCRIBE * PANDORABOTS EMAIL *</pattern>
<template><srai>UNSUBSCRIBE PANDORABOTS EMAIL</srai></template></category>
<category><pattern>_ UNSUBSCRIBE * PANDORABOTS EMAIL </pattern>
<template><srai>UNSUBSCRIBE PANDORABOTS EMAIL</srai></template></category>
<category><pattern>_ UNSUBSCRIBE PANDORABOTS * EMAIL *</pattern>
<template><srai>UNSUBSCRIBE PANDORABOTS EMAIL</srai></template></category>
<category><pattern>_ UNSUBSCRIBE PANDORABOTS * EMAIL </pattern>
<template><srai>UNSUBSCRIBE PANDORABOTS EMAIL</srai></template></category>
<category><pattern>_ UNSUBSCRIBE PANDORABOTS EMAIL *</pattern>
<template><srai>UNSUBSCRIBE PANDORABOTS EMAIL</srai></template></category>
<category><pattern>_ UNSUBSCRIBE PANDORABOTS EMAIL </pattern>

...

<category><pattern> EMAIL * PANDORABOTS * UNSUBSCRIBE *</pattern>
<template><srai>UNSUBSCRIBE PANDORABOTS EMAIL</srai></template></category>
<category><pattern> EMAIL * PANDORABOTS * UNSUBSCRIBE </pattern>
<template><srai>UNSUBSCRIBE PANDORABOTS EMAIL</srai></template></category>
<category><pattern> EMAIL * PANDORABOTS UNSUBSCRIBE *</pattern>
<template><srai>UNSUBSCRIBE PANDORABOTS EMAIL</srai></template></category>
<category><pattern> EMAIL * PANDORABOTS UNSUBSCRIBE </pattern>
<template><srai>UNSUBSCRIBE PANDORABOTS EMAIL</srai></template></category>
<category><pattern> EMAIL PANDORABOTS * UNSUBSCRIBE *</pattern>
<template><srai>UNSUBSCRIBE PANDORABOTS EMAIL</srai></template></category>
<category><pattern> EMAIL PANDORABOTS * UNSUBSCRIBE </pattern>
<template><srai>UNSUBSCRIBE PANDORABOTS EMAIL</srai></template></category>
<category><pattern> EMAIL PANDORABOTS UNSUBSCRIBE *</pattern>
<template><srai>UNSUBSCRIBE PANDORABOTS EMAIL</srai></template></category>
<category><pattern> EMAIL PANDORABOTS UNSUBSCRIBE </pattern>
<template><srai>UNSUBSCRIBE PANDORABOTS EMAIL</srai></template></category>
</aiml>

Using this set of symbolic reductions, the bot will answer the same thing to a variety of inputs such as:
"How can I unsubscribe to Pandorabots email?"
"I am getting email from Pandorabots and I want to unsubscribe."
"Unsubscribe me from Pandorabots email."

For three keywords X, Y and Z, the 95 combinations come from 6 different possible orderings of the keywords (X Y Z, X Z Y, Y X Z, Y Z X, Z X Y, Z Y X ) times 16 different possible insertions of wildcards (from X Y Z to _ X * Y * Z), minus one because we use X Y Z itself as the pattern for the base category.
 

blogger templates | Make Money Online