Artificial Intelligence Markup Language

Table of contents

Automate your business at $5/day with Engati

REQUEST A DEMO
Artificial Intelligence Markup Language

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.

artificial intelligence markup language
Source: Analytics Vidhya

What are some of the most important Artificial Intelligence Markup Language tags?

Artificial Intelligence Markup Language tags
Artificial Intelligence Markup Language tags

<aiml> tag

<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

<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.

<pattern> tag

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

<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.

Close Icon
Request a Demo!

Get started on Engati with the help of a personalised demo.

Thanks for the information.
We will be shortly getting in touch with you.
Please enter a valid email address.
For any other query reach out to us on contact@engati.com
Close Icon
Congratulations! Your demo is recorded.

Select an option on how Engati can help you.

I am looking for a conversational AI engagement solution for the web and other channels.

I would like for a conversational AI engagement solution for WhatsApp as the primary channel

I am an e-commerce store with Shopify. I am looking for a conversational AI engagement solution for my business

I am looking to partner with Engati to build conversational AI solutions for other businesses

continue
Finish
Close Icon
You're a step away from building your Al chatbot

How many customers do you expect to engage in a month?

Less Than 2000

2000-5000

More than 5000

Finish
Close Icon
Thanks for the information.

We will be shortly getting in touch with you.

Close Icon

Contact Us

Please fill in your details and we will contact you shortly.

Thanks for the information.
We will be shortly getting in touch with you.
Oops! Looks like there is a problem.
Never mind, drop us a mail at contact@engati.com

<script type="application/ld+json">
{
 "@context": "https://schema.org",
 "@type": "FAQPage",
 "mainEntity": [{
   "@type": "Question",
   "name": "What is AIML Fundamentals?",
   "acceptedAnswer": {
     "@type": "Answer",
     "text": "AIML describes a category of information objects called AIML objects and partially describes the behavior of computer programs that process them."
   }
 },{
   "@type": "Question",
   "name": "What are the the most important AIML tags ?",
   "acceptedAnswer": {
     "@type": "Answer",
     "text": "1. <aiml> tag.
2. <category> tag.
3. <pattern> tag.
4. <template> tag."
   }
 }]
}
</script>