AIML stands for Artificial Intelligence Markup Language. AIML is an XML based markup language meant to create artificial intelligent applications. AIML makes it possible to create human interfaces while keeping the implementation simple to program, easy to understand and highly maintainable.
Artificial intelligence markup language was first developed by Dr. Richard Wallace and a worldwide free software community between 1995 and 2002. It formed the idea for A.L.I.C.E. (Artificial Linguistic Internet Computer Entity), initially a vastly extended version of Eliza, that won several awards. It is offered by the ALICE AI Foundation and is an open source framework for building bots.
AIML contains a collection of rules which define the conversational capabilities of the chatbot. it’s used with a linguistic communication Understanding (NLU) processor which takes AIML rules to investigate and reply to the text queries asked via the chatbot. The more rules we add in AIML – the more intelligent the chatbot is. AIML even characterizes rules for patterns and determines the manner in which to respond to the user accordingly. Artificial intelligence markup language has numerous elements in it, like categories, patterns, and templates.
The categories are the fundamental units of knowledge that the AIML makes use of and are further classified as templates and patterns. The templates represent the questions that the user asks the chatbot, or what the chatbot perceives to be questions that need to be responded to. The templates are the answers that the AIML chatbot remembers on the basis of it’s training which are subsequently modified and presented as replies to the users. Template elements are essentially made up of text formatting for the responses, conditional responses taught to it including several if/else scenarios and random responses which always come in use while the bot is interacting with a user.
AIML based chatbots come under the rule-based chatbots category, however, some level of self-learning feature is feasible.
- AIML is that the language to make a brain for chatbots.
- NLU in chatbots process AIML and their chat behavior is controlled through AIML rules.
- One chatbot application can have multiple sets of AIML and might behave differently.
AIML- based chatbots have the ability to work with a range of input, which basically represents the texts with identical meaning. One of the limitations of AIML chatbots is that if no input pattern is satisfied, the bot will just end up replying with a default statement like “Sorry, Icould not understand your request”.
But if you have given rich AIML rules, it will be possible for you to build a chatbot that can handle a fairly broad range of queries. These bots are particularly useful for domain-specific businesses like banking where the bot could take care of generic queries associated with that domain.
The purpose of AIML is to simplify the task of dialog modeling and make it easier according to the stimulus-response approach. Artificial intelligence markup language is an XML-based markup language and it is a tag-based language. The tags are identifiers that make code snippets and insert commands inthe chatbot. AIML defines a data object class called AIML objects which hold the responsibility for modeling patterns of conversation. AIML objects are ltechnically anguage tags, and every tag corresponds to a language command.
What are the fundamentals of Artificial Intelligence Markup Language (AIML)?
AIML describes a category of information objects called AIML objects and partially describes the behavior of computer programs that process them.
AIML objects are made of units called topics and categories, which contain either parsed or unparsed data. Parsed data is created of characters, several of which form character data, and a few of which form AIML elements.
AIML elements encapsulate the stimulus-response knowledge contained within the document. Character data within these elements is usually parsed by an AIML interpreter and sometimes left unparsed for later processing by a Responder.
What are some of the most important Artificial Intelligence Markup Language tags?
<aiml> tag marks the start and end of a AIML document. It contains version and encoding information under version and encoding attributes. This attribute is optional.
Encoding attributes provide the character sets to be used in the document. As a mandatory requirement, <aiml> tag must contain at least one <category> tag. We can create multiple AIML files where each AIML file contains a single <aiml> tag. The purpose of each AIML file is to add at least a single knowledge unit called category to the chatbot.
<category> tag is the fundamental knowledge unit of a Bot. Each category contains −
- User input in the form of a sentence which can be an assertion, question, and exclamation etc. User input can contain wild card characters like * and _.
- Response to user input to be presented by the chatbot.
- Optional context.
A <category> tag must have <pattern> and <template> tag. <pattern> represents the user input and template represents the bot's response.
The <pattern> tag represents a user's input. It should be the first tag within the <category> tag. <pattern> tag can contain wild card to match more than one sentence as user input.
AIML is case-insensitive. If a user enters “Hello,” “hello,” “HELLO” etc., all inputs are valid and bot will match them against your greeting message.
<template> tag represents the bot's response to the user. It should be the second tag within the <category> tag. This <template> tag can save data, call another program, give conditional answers or delegate to other categories.