# Libraries and Intent Management

## What is an Intent?

An Intent is a fundamental unit in Converse. It represents a piece of information the users can ask for, contains associated answers, and a part of a dialog. It is an intention conveyed in a user message which triggers some action. Each intent triggers a direct answer or guided conversational flow. A guided conversational flow is a series of actions linked together with a set of conditions and triggers another state of action.

## What is a Library?

Libraries are similar to folders where Intents can be kept and organized. You can create new Libraries at any time, and move Intents between them.

It is good practice to name Libraries based on sub-domains of knowledge. For example, a Bot covering the Human Resources domain, there may be Libraries for Recruitment, Onboarding, Leave Policy, and so on.

## Intent Dashboard Overview

Intent Dashboard is the area where intents and libraries are displayed. This is where you can manage the intents assigned to your own bot.

It is divided into 3 main sections:

1. Bot Selector
2. Libraries Side Panel
3. Management and Teaching View

![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpFDXt6J5CiX3bE%2F4.png?generation=1602575515325781\&alt=media)

#### **A) Bot Selector**

Bot Selector is located on the top left side of the navigation bar. It allows you to select the current active bot. Once the bot is selected, it will filter the available libraries assigned to your bot.

Select a *Current Active Bot*

* Displays current active Bot which you have Owner and Edit permissions
* Displays a list of libraries linked to the current active Bot

#### **B) Libraries Side Panel**

This is where the list of libraries and number of intents assigned to the Current Active Bot can be seen.

## Library Management

### Create Library

You can create a new Library by clicking on the ![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpG59eLIhrEvuQ3%2F5.png?generation=1602575514873720\&alt=media) button in the **Libraries Side Panel**. The following Popup will appear:

| ![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpHsJ9twE6Q-yV5%2F6.png?generation=1602575515309798\&alt=media) | <p>Enter Library Name (required)</p><p>Select the Bot you want to create the Library for.</p><p>Click "Create"</p> |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| ![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpIx8th5XPs1V4n%2F7.png?generation=1602575515310853\&alt=media) | Then, the new Library will be created and displayed on the *Library Side Panel*                                    |

### Default Libraries

When a Bot is first created, there will be 2 Default Libraries preloaded.

1. System Library
2. Smalltalk Library

### "System" Library - Configuring Default System Responses

This Library contains special Intents which are automatically triggered by Converse to support default system behaviour (e.g. Initial ‘Hello’ message).

Here are some of the important System Intents you should know:

| **Intent Name**                 | **When is it triggered?**                                                                                                                                                                                              |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Hello                           | When a first-time user opens the chat interface                                                                                                                                                                        |
| Hello again                     | When a returning user opens the chat interface                                                                                                                                                                         |
| NoInfo                          | When the Bot was not able to understand the user’s Intent for the first time                                                                                                                                           |
| NoInfo2                         | Following NoInfo, the Bot was not able to understand the user for the second time in a row                                                                                                                             |
| Escalate                        | <p>Following NoInfo2, the Bot was not able to understand the user for the third time in a row</p><ul><li>Note: At this point, it is best practice to point the user towards some other means of getting help</li></ul> |
| Bye                             | The intent that is triggered when the user says "Bye" or similar, or ends the conversation through any other means                                                                                                     |
| Intent Search Fallback Template | This intent will be triggered when NLU Intent Matcher yielded low-confidence results.                                                                                                                                  |
| WhatAbout Template              | This intent is triggered when the user entered a topic based input, which matched one of the Topic Tags in the Bot's Ontology Knowledge Base                                                                           |

#### "Smalltalk" Library

This Library contains a set of generic responses for common user inputs like

* "Who are you?"
* "Who made you?"
* "Are you a boy or a girl?"

By default, these Intents will be Deactivated. You can quickly activate them in bulk using the Bulk Intent Status Update function (see [Bulk Change Intent Status](#bulk-change-intent-status))

## Management View

This is where the list of Intents of a selected library is displayed. In this area, you can manage and filter the intents, as well as to perform various actions such as create, edit, activate, deactivate, archive, unarchive and delete.

### Filter Intents in a Library

![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJVuCjRsYLnrn9jSaPr%2F-MK_bhRh8XibuCylGo-p%2F-MK_dCKu8JBF3PPWX-3T%2Fimage.png?alt=media\&token=c8f564e8-c484-45ac-b8ad-f2369ea52185)

#### **Filter Intent by text search**

Enter any text in the text field to filter an Intent by text. The following Intent's properties will be searched:

* Intent Name
* All the Training Phrases of the Intent

#### **Filter Intents by Status**

By default, the system will filter for only *Active* Intents. Other options include:

* Inactive
* Active and Inactive
* Archived

#### **Filter Intents by Tags**

* Tags allow you to organize your Intents by topic terms that are meaningful to you. To learn how to Tag Intents, see [Bulk Update Intents Tags](#bulk-update-intents-tags)
* Select the Tag that you want to filter Intents by clicking on the checkbox beside the tag
* You can select more than one tag to filter for at one go

![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpJPSjI3F49JeUT%2F8.png?generation=1602575515309237\&alt=media)![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpKSP7E-fZecjv9%2F9.png?generation=1602575515312796\&alt=media)

#### **Reset Filters**

Click Reset Filters to reset all Filters to their default setting.

### Bulk Update Intents

#### **Bulk Select Intents for Update**

* Use the checkboxes on each Intent row to select the Intent for update

![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpLbtvLwLdWrahW%2F10.png?generation=1602575515334114\&alt=media)

* You can also select All Intents on the Current Page, or All the Intents in the Library

![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpMDIqzp-k-F-7p%2F11.png?generation=1602575514871133\&alt=media)

#### **Bulk Move Intents**

* To move the selected Intents, click on the Folder ![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpNjPoS2yhyM7AQ%2F12.png?generation=1602575514879166\&alt=media) icon
* In the popup that appears, select the Destination Library for the Intents

#### **Bulk Change Intent Status**

* Click on the ![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpORF0vdVNIrFEl%2F13.png?generation=1602575514869675\&alt=media) Icon to change the selected Intents statuses
* In the popup that appears, select the Target Status for the Intents
* Click Update

#### **Bulk Update Intents Tags**

* Click on the ![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpPN4WQ_l5cwS9g%2F14.png?generation=1602575514876074\&alt=media) icon to tag the selected Intents
* In the popup that appears:
  * Add Tags: Search for Tags to add, then press enter
  * Remove Tags: Click on the 'x' button in the Existing Tags section. Note: this will only remove Tags from Intents that had the Tag to begin with.
* Now click on the Apply
* The Updated Tags should be visible in the Intent Dashboard, in the Tags column

#### Bulk Import Q\&A via Excel

You can bulk import Q\&A using an Excel document to existing libraries by clicking ![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpQ3s-QpTrDBaap%2F15.png?generation=1602575514872607\&alt=media) under Intent Dashboard > Management View. This will generate the Intents and Phrases

Before proceeding you should prepare an Excel document with the following columns, adding your own Q\&A into each row of the spreadsheet. A sample Q\&A is provided in the example below:

| Question                     | Answer                                              | Phrase                                                                                                                                        |
| ---------------------------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| What are your opening hours? | Our opening hours are 9am to 6pm, Monday to Friday. | <p>What are your opening hours?</p><p>When can I visit your office?</p><p>Another question variation</p><p>Yet another question variation</p> |

Notes:

* Ensure that column headers are exactly the same as the table above
* Specify each unique question variation on it's own line
* Each Q\&A must have Question, Answer and at least one Phrase

### **Import Intents via Excel**

1. Select Library you wish to import into from the Library Side Panel.
2. Click on the ![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJVuCjRsYLnrn9jSaPr%2Fsync%2F4579939f97cf1f33aa65bac063132933fea037eb.png?generation=1608630549038829\&alt=media) button. The Import popup for configuration and excel uploading will be displayed.

![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpS11v1enwAsDc1%2F17.png?generation=1602575515309350\&alt=media)

1. Select the status of the Intent after the import is complete.
2. Draft - the Content only accessible on the Admin Chat UI, and is not visible to the Public
3. Published - the Intent is immediately available for use on the Public Chat UI
4. Drag the Excel file containing the Q\&A into the dotted box outline or click browse to upload the file.

Before you upload a file:

* Ensure the content label is always present at the top of the column. For example, “Question”.
* Ensure that the content label form has not been changed.
* Ensure not to upload an empty document.![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpTiWUrurZsF3L-%2F18.png?generation=1602575515311634\&alt=media)
* Click ![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpU-nsYZnJa2kty%2F19.png?generation=1602575514878513\&alt=media). A new window displays the following:
* Bulk Import displays the uploaded excel file
* Intents imported with conflicting question text with other intents
* Preview of the list of imported intents for review

![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpVfURFXF3P1s0J%2F20.png?generation=1602575515336970\&alt=media)

1. If there are conflicting question text with other intents, follow the instructions to resolve the conflicts.

![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpWw3YgajJ7dhwy%2F21.png?generation=1602575515387534\&alt=media)

1. Click Continue.
2. Review the content that you want to add in the library.

![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpXnDENchTZwpu3%2F22.png?generation=1602575515303270\&alt=media)

1. A "Creating Intent" notification banner appears while the intents are being imported. Once done, the banner will disappear and your Intents would be imported successfully. ![](https://1381196040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Ftaiger-converse%2F-MJVuHz_bCDmA218kKwc%2F-MJVwIpYgGdskkllEcDh%2F23.png?generation=1602575515336106\&alt=media)

## Teaching View

The Teaching View is where you can train the bot with various phrases to match user’s utterances. Adding phrases is an alternative way of training the bot to ask questions or to understand a new form of questions.

In this view, displays a list of all the questions, answers, and added phrases that belong to that intent. You can also Teach the Bot to understand new variations of user input using the Teaching Tool.

Usage of the Teaching Tool and related functions is explored in depth in [Teaching Your Bot](https://taiger.gitbook.io/taiger-converse/master/essentials/teaching-your-bot).
