This documentation supports the 20.08 version of Live Chat. To view an earlier version, select the version from the Product version menu.

Sample.aiml file


To help you create an AIML file, BMC Virtual Chat includes a sample.aiml file in the \var\programd\aiml\ directory on the BMC Remedy Mid Tier server. This sample file uses common questions that customers might ask, such as a list of holidays, a password reset, and ordering a new computer, among others. You can use the questions in this sample to get started on your own, using the questions provided and updating the responses for your company or using the tags and structures to understand how to use AIML. If you use the sample.aiml file, you will need to change company references, URLs, names of people, product names, and phone numbers. 

This sample file shows the following techniques and structures:

 The sample AIML uses the following possible customer questions.

Click to view questions in sample file

What is my IP?

What is my IP address?

Can you tell me my IP address?

What is the service desk number?

Helpdesk number?

How do I reach helpdesk?

How can I reach servicedesk?

I need help from service desk.

Give me the list of our holidays.

List of holidays please

How to get a new RSA token?

I need a new secure id.

How to get a new secure ID?

new secure ID needed.

How do I reset my password?

How do I change my password?

How can I reset my lotus password?

How to reset my computer password?

How can I change my NT password?

How do I change my password?

How do I reset my sgate password?

How do I reset my PC password?

How to change my computer password?

How to order an iphone?

How can I order an pc?

How do I order a phone?

How to order an computer?

How can I order an new iPhone for my subordinate?

How do I order a new computer?

How to order an new pc?

How to book a cab?

How can I book a conference room?

How to book a travel?

How is IJP?

What is IJP Process?

What is appraisal process?

What is performance appraisal?

What is performance review?

What is appraisal System?

What is performance evaluation?

What is employee appraisal?

Who is appraiser?

Who is appraisee?

Who is our CEO?

AIML structures

The sample.aiml file uses several basic AIML structures.

  • The <category> tag is used as a container for a question and response.
  • The <pattern> tag identifies possible keywords or questions that users might type.
  • The <template> tag contains the response to a question.
  • The <random> tag is used to respond to a user's input with one of multiple possible answers. Each possible response is defined with an <li> tag, such as a list of possible service desk numbers. The <random> tag selects randomly one of its <li> tags to include in the response.
  • The <srai> tag is used in many of the answers, as a way to reuse answer templates. The sample.aiml file heavily relies on reuse because it uses multiple variations on keywords.
  • Several answers, such as the list of holidays, uses an embedded URL

Keyword and wildcard variations

To capture the different ways a user can ask a question, the sample includes variations that allow the key words to be at the start, the end, or the middle of a question. 

As shown in the following example, the keyword can appear by itself (no wildcards), in the middle of a question, or at the end. Patterns with the _ wildcard have higher priority and are checked first.

<category>
<pattern>HOLIDAYS</pattern>
<template>You can find the list of holidays in HR site. Click <a href="https://hr.calbro.com">here</a> to open it.</template>
</category>
<category>
<pattern>_ HOLIDAYS *</pattern>
<template><srai>HOLIDAYS</srai></template>
</category>
<category>
<pattern>_ HOLIDAYS</pattern>
<template><srai>HOLIDAYS</srai></template>
</category>
<category>
<pattern>HOLIDAYS *</pattern>
<template><srai>HOLIDAYS</srai></template>
</category>

List of choices

 In the changing password section, the sample shows the use of a list of options for changing Lotus, Sgate, and Windows NT/PC passwords. The response for password requests is split into four different structures. The first structure (named CMP for Change My Password) defines the available options and asks the user to enter a 1, 2, or 3.

<category>
<pattern>CMP</pattern>
<template>
Which password do you want to change?<br/>
1) Lotus password.<br/>
2) Sgate password. <br/>
3) NT/PC password.<br/>
Enter your choice-1/2/3.
</template>
</category>

Then, each option has its own structure, as shown for option 1 below. The <that> element specifies the required previous. If true, then this structure does two things:

  • The <set> tag sets the name attribute to a value of option1.
  • The <srai> element specifies the ACMP keyword. 
<category>
<pattern>1</pattern>
<that>* Enter your choice-1/2/3.</that>
<template>
<think>
<set name="option1">1</set>
</think>
<srai>ACMP</srai>
</template>
</category>

The third structure uses the value of option1 as a condition to select the password and to set the pass1 value. If the user entered 1 above, pass1 is set to LOTUS PASSWORD. 

<category>
<pattern>ACMP</pattern>
<template>
<think>
<condition name="option1">
<li value="1">
<set name="pass1">LOTUS PASSWORD</set>
</li>
<li value="2">
<set name="pass1">SGATE PASSWORD</set>
</li>
<li value="3">
<set name="pass1">PC PASSWORD</set>
</li>
</condition>
</think>
<srai><get name="pass1"/></srai>
</template>
</category>

The fourth structure use the value of pass1 to retrieve and return the appropriate response to the user. In this example, the response includes the URL and instructions for changing the Lotus Notes password.

<category>
<pattern>LOTUS PASSWORD</pattern>
<template>Go to <a href="http://password">http://password.com</a>, and click Reset next to Lotus Notes.</template>
</category>

The final part includes the possible patterns that users might type to request a password change. As shown in the example below, if the pattern is detected, it then goes to the CMP structure to prompt the user to select the type of password to change. 

<category>
<pattern>CHANGE MY PASSWORD *</pattern>
<template>
<srai>CMP</srai>
</template>
</category>

Related topics (optional)

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*