Chatbot Creation Options

Chatbot Creation Options

Chapter 2 Chatbot Creation Options Abstract and then matched in order against the nodes of the tree. When input finds a match, the bot will execute Chapter 2 of Library Technology Reports (vol. 49, no. an action, such as responding or opening a web page. 8), “Streamlining Information Services Using Chatbots,” introduces AIML and ChatScript, the two most viable lan- guages for creating a chatbot. While their basic structure Simple AIML Editor and syntax are markedly different, either may be used http://riotsw.com/sae.html effectively, and both offer their own advantages. here are a number of coding options available AIML does have some drawbacks, however. AIML’s to use in creating your own bot. The markup or pattern matching is relatively weak, which means the ReportsLibrary Technology Tscripting language you choose will depend on content you create has the potential to match a range your skill and experience, the amount of time you have of input and return incorrect or meaningless responses. available, and the functionality you’re trying to create. While authoring content is easy, a large amount of con- At present, the best choices are AIML (Program Z or tent is needed to create a convincing bot, somewhere Program O) and ChatScript. We’ll examine each in turn. in the range of 60,000+ categories. Each question or concept in the bot’s knowledge base requires multiple categories to match permutations of the question and AIML (Artificial Intelligence Markup to ensure a correct response. For instance, there are Language) many ways to ask, “What time does the library open?”: alatechsource.org AIML is the starting place for many who are interested “When do you open?” in chatbots or natural language processing. AIML was “When are you opening today?” created in 1995 by Dr. Richard Wallace and is the “What time do you open?” basis for numerous chatbots, including the original “Will you be open today?” Emma the Catbot, the University of Nebraska’s Pixel, November/December 2013 November/December Adeena Mignona’s Zoe, and Steve Worswick’s Mitsuku. You can easily add to this list. AIML’s great virtue is its simplicity; it’s easy to A category is required to match each variation: learn and to implement. AIML is an XML dialect, so if you’re familiar with XML or HTML, you’ll be able to <Code Sample> learn AIML quickly. You can write AIML using Note- <category> pad, WordPad, or a spreadsheet-style AIML editor <pattern>WHAT TIME DOES THE like Simple AIML Editor from RIOT Software. AIML is LIBRARY OPEN</pattern> based on pattern matching. Essentially, the data mak- <template><srai>HOURS</srai> ing up an AIML bot’s “brain” take the form of a very </template> large decision tree. User input is first preprocessed </category> 11 Streamlining Information Services Using Chatbots Michele L. McNeal and David Newyear <category> Pandorabots’ free service was home to more than <pattern>WHEN DO YOU OPEN 166,000 botmasters and 201,000 AIML chatbots.1 If </pattern> you would like to start with AIML and would like <template><srai>HOURS</srai> to avoid the technical issues involved with setting </template> up your own chatbot server, Pandorabots is a fine </category> choice. Free and paid hosting are both available. The free server is a good place to start and experiment. <category> The paid server has great reliability. Either will make <pattern>WHEN ARE YOU OPENING setting up your bot and adding it to a web page easy. TODAY</pattern> The Pandorabots site has excellent documentation <template><srai>HOURS</srai> and support, including an extensive series of YouTube </template> tutorials covering AIML basics, AIML predicates, </category> ReversedAIML, adding SitePal avatars, AIML target- ing, bot properties, and other topics. Pandorabots’ <category> excellent account interface gives access to conversa- <pattern>WHAT TIME DO YOU OPEN tion logs, including a time stamp and the user’s IP </pattern> address, the bot’s AIML set, a training interface, Pan- <template><srai>HOURS</srai> dorawriter (which converts dialogue into AIML), and </template> the HTML files used to embed the bot into web pages </category> (see figure 2.1). Editing the AIML set, uploading or downloading files, and reviewing conversations are <category> all made quite easy. <pattern>WILL YOU BE OPEN TODAY </pattern> <template><srai>HOURS</srai> Pandorabots </template> www.pandorabots.com </category> <End Code Sample> You can create multiple bots, so it’s possible to In order to understand how an input will match stage or test your changes before making them live or fail, you need to be familiar with all of the catego- to the public. You can start with no AIML content ries dealing with each question or concept in the bot’s or choose among several pre-authored AIML sets: knowledge base. One cannot look at an individual Standard AIML (2001), A.L.I.C.E. (2002), Annotated AIML category and know what input it will match. A.L.I.C.E. AIML (2003), Christian Drossmann’s stand- Writing code to distinguish between fine shades of alone German AIML, or Sandro Pons’s Italian AIML meaning can be tricky, and the time required to set. Pandorabots works closely with SitePal, so adding maintain and debug an AIML knowledge base can be avatars and text-to-speech is simple if you wish to give considerable. Before you become too discouraged, your bot a face and voice. keep in mind that AIML has been used to create suc- In April 2012, Pandorabots released CallMom, cessful library bots. There are ways to reduce devel- a mobile, voice-activated virtual assistant app for November/December 2013 November/December opment and maintenance time, such as by modifying Android that can be configured to use any existing an existing AIML set, infoTabby or A.L.I.C.E., and by Pandorabot. You can download CallMom through writing your code to be as efficient as possible. We’ll Google Play at no charge. CallMom is open source and cover the details of writing efficient AIML in chapters supports a number of additional AIML tags. We will 3 and 4. discuss CallMom and mobile apps in a later chapter. Over the years, a variety of AIML interpreters, alatechsource.org or engines, have emerged using Java, Ruby, Python, C++, C#, Pascal, and others. For our purposes, the CallMom on Google Play two best choices for creating a library bot are AIML https://play.google.com/store/apps/details?id=com. Program Z and AIML Program O. pandorabots.callmom AIML Program Z Because of AIML’s simplicity, the small financial investment needed to implement it, and the availabil- AIML Program Z is the proprietary language of ity of the free hosting provided by Pandorabots, we Library Technology ReportsLibrary Technology Pandorabots, one of the oldest and largest chatbot will be using AIML Program Z for the examples in later hosting services in the world. As of February 2012, chapters of this report. 12 Streamlining Information Services Using Chatbots Michele L. McNeal and David Newyear Figure 2.1 An example of some of the documentation and support offered by Pandorabots. Copyright 2013 Pandorabots. Portions re- produced with permission. AIML Program O The Program O website contains demos, down- loads, an installation guide, and support, including a Program O is an open-source, web-based application FAQs page, forum, and contact information. written in PHP using a MySQL database. You can access and download Program O from the Program O ReportsLibrary Technology website. Older versions of Program O lacked some of Program AB/AIML 2.0 the functionality of Program Z, but this gap has been greatly reduced with the release of version 2.0. Pro- Program AB is a compiler supporting AIML 2.0 and gram O has the same advantages and disadvantages as is written in Java. AIML 2.0 was released in January program Z; you will have to set up the engine on your 2013 by the ALICE A.I. Foundation2 and represents an own server and will need to have PHP and MySQL run- attempt to address some of the limitations of earlier ning on that server. A good knowledge of PHP and AIML versions while maintaining the simplicity of the MySQL is helpful, but not entirely necessary. As you language. Some of the new features are will be installing Program O on your own webspace, it is more complicated than using Pandorabots, but • Wildcards that match 0 or more words alatechsource.org can offer greater flexibility for experienced webmas- • Highest priority matching to assign top match- ters. The University of Nebraska’s Pixel is an excellent ing priority to selected words example of a library bot written in Program O; Morti • AIML sets to match input with sets of words is another well-written Program O chatbot. and phrases (similar to ChatScript concepts, see below) November/December 2013 November/December • AIML Maps to map set elements to members of Program O website other sets http://blog.program-o.com • looping • local variables Pixel http://pixel.unl.edu It is also possible to define and use custom tags. The full AIML 2.0 working draft and specifications are Morti available online. At this time, implementation of AIML www.geekcavecreations.com/Morti 2.0 is limited to Program AB and the CallMom Basic app. A new Pandorabots server that will support all 13 Streamlining Information Services Using Chatbots Michele L. McNeal and David Newyear Figure 2.2 The Program O download page. Copyright 2013 Elizabeth Perreau and The Program O Project. Used with permission. AIML Cons the features of AIML 2.0 is under construction. • Relatively weak pattern matching • Can be time-consuming and difficult to maintain AIML 2.0 Working Draft • A large number of categories are needed to create https://docs.google.com/document/d/1wNT25hJRyupc a robust bot.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    7 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us