Fandom

Artificial Intelligence

AIML

59pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

The Artificial Intelligence Markup Language (AIML) is a standard XML format for defining a chat bot's responses.

The XML dialect called AIML was developed by Richard Wallace and a worldwide free software community between 1995 and 2002. AIML formed the basis for what was initially a highly extended Eliza called "A.L.I.C.E." ("Artificial Linguistic Internet Computer Entity").

Free AIML sets in several languages have been developed and made available by the user community. There are AIML interpreters available in Java, Ruby, Python, C++, C#, Pascal, and other languages. A semi-formal specification and a W3C XML Schema for AIML are available.

TagsEdit

Main ElementsEdit

  • <aiml> - root element
  • <topic name="X"> - allows grouping of categories that only apply to an active topic variable
  • <category> - a question/response (pattern/template) pair
  • <pattern> - a question search pattern, including * and _ wildcards
  • <that> - only matches the pattern if the chat bot's previous response was match the "that" search pattern
  • <template> - a response, including scripted markup

Template ElementsEdit

  • <star index="N"/> - replaced with value of * in pattern (or Nth *)
  • <that index="M,N"/> - replaced with value of bot's previous response (or Mth previous response, and N sentence of the response)
  • <input index="N"/> - replaced with value of users's input (or Nth *)
  • <thatstar index="N"/> - replaced with value of * in "that" (or Nth *)
  • <topicstar index="N"/> - replaced with value of * in topic (or Nth *)
  • <get name="XXX"/> - replaced by the value of the variable
  • <bot name="XXX"/> - replaced by the value of the bot specific variable
  • <sr/> - short form for <srai><star/><srai> (replaced with response to value of * from pattern)
  • <person2/> - converts the text (or <star/>) between 1st and 2nd person (I <-> he, etc.)
  • <person/> - converts the text (or <star/>) between 1st and 3rd person (I <-> you, etc.)
  • <gender/> - converts the text (or <star/>) between male and female (he <-> she)
  • <date/> - replaced with the current date and time
  • <id/> - replaced by the client id or ip address
  • <size/> - replaced with the size of the AIML set (number of categories)
  • <version/> - replaced with the AIML program version
  • <uppercase> - converts the text to uppercase
  • <lowercase> - converts the text to lowercase
  • <formal> - converts all words in the text to be capitalized
  • <sentence> - converts the first word in the text to be capitalized
  • <condition name="X" value="Y"> - defines an "if" condition based on comparing the value of a variable to a pattern
  • <condition name="X"> - case statement
  • <condition> - multi-valued if/else statement
  • <random> - choose on of the nested <li> values at random
  • <li name="X" value="Y"> - used in random and condition tags
  • <li value="Y"> - used in random and condition tags
  • <li> - used in random and condition tags
  • <set name="XXX"> - set the value of a variable
  • <gossip> - logs the text
  • <srai> - recursively evaluates the text and replaces it with the response
  • <think> - evaluates the nested statements but does not output any result
  • <learn> - loads an AIML file
  • <system> - evaluates a System command
  • <javascript> - evaluates Javascript

DocumentationEdit

BlogsEdit

AIML SetsEdit

AIML ProgramsEdit

AIML Hosting PlatformsEdit

Also on Fandom

Random Wiki