Configuring CADDI - Creating Chat Bots

Introduction 

Conversational AI for Data-Driven Insights (CADDI) makes it effortless to interact with your data, understand it, and extract reliable insights by using plain English. This article explains how to configure a CADDI chatbot.

Overview

  • Create a chatbot
    • Select tables and columns.
  • Train bot section
  • Detailed Question
    • Logs Generation & SQL Query
    • Different Generated Views
    • Profiling & Filtering
      • Date type column
      • Decimal type column
      • Integer type column
      • String type column
    • Saving the Question as Context
    • Giving Feedback
    • Generating Answers Based on Different Tools
      • SQL Query Tool
      • Data Understanding Tool
      • General Knowledge Tool
  • Add a Concept
  • Basic CRUD Operations
  • Manage access to the bot.

Detailed Steps

1. Creating a Chat Bot

Chat bots can be found on the Sources Detail page. Any Source that will have Chat Enabled will have the Chat Bot Tab. Chat Access can be given to any source through the Module Settings. For more information, click on User Role and Module Settings

 

Chat Bot Tab can be found on the detail page of the source for which Chat is enabled. 
`

datasource.png

The "Chat Bots" tab can be seen next to the "Settings" Tab. On clicking on Chatbots, a new Chatbot can be created:
createchatbot.png

When a new Chat Bot is created, the user is landed on the Definition Tab of the Chatbot. In a Data source, there can be several Tables. Users can either use all the tables in the chatbot or user can limit the chatbot to some specific sources by adding tables from the Available Tables.
tableforchat.png

Any added table shows up in "Tables For Chat". Users can also preview the Table to see the data inside it:
viewtable.png

User can also see individual columns and their profiling by clicking on the "Manage Fields" option. Here Users can select or unselect columns of any Table:
managefields.png

After Adding the necessary Tables, the user can click on the "Done" and "Save" button to save the changes:
Done_save.png

2- Train Bot

After the user has selected specific tables and saved the changes, along with the "Definition" Tab, the "Train Bot" tab can be seen. On clicking the "Train Bot," user can see the "Generate Questions" button up front and the Chat bar below that where questions can be typed:
generate questions.png

On clicking Generate Questions, some sample questions show up. Users can use these questions for analysis:

On the Chat Bot, two types of questions can be asked which are:

1- Typed Question

2- Detailed Question

3- Detailed Question

A detailed question is one for which:

  1.  SQL Code and Logs are generated 
  2.  Visualized Grid, Charts, and Pivot Information are generated
  3.  Context can be set up and Profiling Information is provided
  4.  Positive or Negative feedback can be given for further improvement (Training)

3.1- Logs Generation & SQL Query

The Logs, in simpler words, are the information related to when a question is asked and what goes to the Backend in textual form. By default, the logs are not turned on. To turn the logs on, the user will have to enable them from the Chat Preferences:

Once the logs are turned on any question is asked the Logs will be printed, and SQL query generated for that question will be printed below the Logs:

sqls.png

The Log details and the SQL code can be hidden from the Hide Code/Log icon located below the answer output:

3.2- Different Generated Views

CADDI generates three different views:

The Grid View shows the data in tabular form of the columns that are fetched from the SQL query:


Along with the 3 different views there will be a gear icon of Settings which is present when this is clicked settings tab opens up with further three options:

  1. General 
  2. Chart (Learn more in Chart Settings in CADDI)
  3. Field (Explained in Profiling & Filtering below)

The General tab contains the toggle button of "Human readable format". By default, this option is turned off:

When this option is turned on then it helps in better reading of the data. For example, if there are large values like in thousands or millions then it will show in much more readable format:

3.3- Profiling & Filtering

Profiling shows the distribution of different values of a column which helps in a better understanding of the data. Users can apply filters on the Grid through profiling by selecting particular values. The profiling of any column is opened by clicking the column heading in the grid. When the profiling of any column is opened then the "Settings ---> Field" tab is opened up.

When no column is selected and from "Show settings", the "Field" option is selected then no profiling of the column will be shown. Instead, it will show this:

3.3.1- Date type column

For any date type column user can set different date formats according to the requirement. 

Once any date format is selected then in the grid that particular date format will be applied:

           Note: When any date format is selected then it applies to every question that was previously asked or will be asked 

The Grid can be filtered from the visual distribution section. A handle is provided which helps in applying filters according to different values. Once the values are selected then the grid on the left will be filtered accordingly:

3.3.2- Decimal type column

The Profiling of any column that has the data type can be opened by just clicking on the column heading in the grid. The difference is that there are some additional changes provided in its profiling. Users have the option to set decimal values after the point according to the requirement:

Filters can be applied from the visual distribution section. For this particular example, the handle is not present below the distribution bars because if the distinct values for the columns are less than 20 then there will be no handle provided, users can click on the bars to fill in "Minimum" and "Maximum" values.

3.3.3- Integer type column

The Profiling can be opened by clicking on the column heading. For the columns having data type there are no additional options, there will be just visual distribution present from where "Minimum" and "Maximum" values can be selected:

Here in the above example, the handle is provided below the distribution bars because, for this particular column, the distinct count exceeds 20. The logic that handle should be present or not is the same for columns having data type "Decimal" and "Integer".

3.3.4- String type column

The Profiling can be opened similarly by just clicking on the column heading present in the grid. The visual distribution for the string-type columns is a little different from other data types. Filters can be applied by selecting different bars and on the grid the filters will be applied accordingly:

3.4- Saving the Question as Context

The question that is asked that can be added as context or any specific filter applied on the grid can also be added from the Context icon on the top right of the question:


The added context can be seen on the top left of the chat bar below. Users can add more than one context from different datasets. If the context is no longer needed, then it can be removed from Clear Context.

Next Time when any question related to the dataset is added as context this context will be incorporated into the questions also:
first_part.png

added_context.png

3.5- Giving Feedback

Often times there will be some questions that may not get answered, or the answer was not according to the user expectations. To tackle this problem, the concept of giving Feedback is introduced. The feedback can be positive if the user is satisfied with the answer:

 

But there will be times when the user will not be satisfied with the answer or the query generated for that question is wrong, due to which the question may give an error. In this case, the user can give negative feedback:


In the negative feedback, the user can select an option like whether the Didn't get the right data. Didn't visualize properly or Other. In addition, the user can explain in plain English about how the question should be approached, or the user can write the correct SQL query that should have been generated:

When the feedback is submitted, this feedback is taken into consideration when the next question will be asked. This is the kind of training that we are doing, so the accuracy of results can be improved over time.

3.6- Generating Answers Based on Different Tools

Often times users will require some questions to be answered in a visualized form and there would be scenarios where users would want just typed answers. For this purpose before asking a question user can select the tool that will generate the answer based on the selected tool. The three tools are located at the top right of the chat bar:

There are 3 different types of Tools that can be selected before writing up any question:

  1. SQL Query Tool
  2. Data Understanding Tool
  3. General Knowledge Tool

3.6.1- SQL Query Tool

By default when any chat bot is opened the selected tool is the "SQL Query tool":

When the tool chosen is "SQL Query Tool" then when the user asks a question from any dataset then for that answer, SQL code and answer in visualized form (Charts and Grid) will be given. The questions asked by using the "SQL Query Tool" are detailed type questions that were explained in the article above.

For Technical users, they can verify which tool is being used. If the selected tool is "SQL Query Tool" then on the Log details it can be seen:

3.6.2- Data Understanding Tool

The Data Understanding Tool can be used where the user wants some information about some columns present in the dataset e.g. range of values or different distributions of column. In this tool SQL Code and Visualized Grid will only be generated if necessary otherwise the answer is usually given in typed form where visualization is not required:

3.6.3- General Knowledge Tool

This tool can be used if the user wants to ask questions that are not related to the datasets present in the Data Catalog application. Any general knowledge questions can be asked by using this tool. One use case of this tool can be for example there are some definitions for some columns for a particular dataset but user wants to know the industrial definition then this tool can be handy. This tool is located next to the Data Understanding tool:

4- Add a Concept

In the CADDI chatbot detail page, users can refine and enhance the chatbot's performance through the Training tab. This feature allows users to add and manage concepts that impact the chatbot's responses, as well as handle feedback to ensure continuous improvement. In the CADDI chatbot detail page, there is a Training tab where users can train the chatbot. From the Training tab, users can add different concepts that impact the results of CADDI. For a step-by-step guide on how to train your CADDI chatbot effectively go to the following article Training a CADDI Chatbot.

 

5- Basic CRUD Operations

On the top right of the Chat Bot, some basic operations can be pretty handy for the users. There are two filters which are:

  1. Asked By
  2. Status

The "Asked By" gives the option of filtering the questions that are asked by different users in the chat bot. All the different users who have asked the questions in the chat bot can be seen in this filter:

There is another filter "Status" that will filter the questions according to different question types. The following are the filter values:

  1. All 
  2. To Review 
  3. Failed to Generate
  4. Approved
  5. Rejected 
  6. Concepts 

 

With the two filters, there are three dots, users have the option of "Refresh All", which refreshes all the questions and Expand/Collapse All, which will expand or collapse all the questions present in the chatbot.

The user has the option of Duplicating & Deleting the Chat bot. If the user wants to work on the same chatbot, but the user does not want to affect the original chatbot so the chatbot can be duplicated. If the user wants to delete the chatbot, then the option is available along with the duplicate button.

Some more basic information about the Source and Chat bot can be found below the Chat bot name, like questions asked, tables, and Chat exclusion criteria, which are mentioned in the Module Settings for this source. The link to the Module settings article can be found here
exclusion critera.png

 

6- Manage Access

By default, when any chatbot is created, then it is private, and it is indicated by a "lock" icon present in front of the name of the chatbot. Users have the option of sharing the Chat bots with other users or user groups through Manage Access:
ManageAccess.png

On clicking Manage Access, a modal opens up where the user can enter any user group or users with whom he wants to share the chatbot. 2 types of Access can be given which are:

  1. Chat Only
  2. Edit

chatonly_edit.png

"Chat Only" access means that the user will only have access to CAADI chat (Talk to your Data). In "Chat Only", the user will not have any access to the chatbot, which is present on the Sources Detail page. Once the user shares the chatbot and gives "Chat Only" Access, another user will receive an email, and a link will be provided.

chatonlyshare.png

email.png

The Link provided in the email takes the user to CAADI chat (Talk to your Data). For more information about CAADI chat (Talk to your Data), go through the article here

chatnew.png

When the chatbot is shared with Access as "Edit," then the other user will have edit access to the Chat bot that is present on the source detail page. When the chatbot is shared with other users with access as "Edit", then the user will receive an email with a link.

shareedit.png

email.png

The above link takes the user to the "Definition" Tab of the Chat bot. This user can also make changes in the original chatbot since he has edit access:

editlink.png

Once the user has given "Chat Only" access or "Edit" access, then on Manage access, there is another option of "Remove Access", which basically will remove the Chat and Edit access to the other user:
removeaccess.png

All the editors of the chatbot can change permissions for other users except for the creator of the chatbot.

For here the above user is an Editor of the chatbot, this user can add new users and remove access from already existing users but the permissions of the bot creator can never be changed   

 

                    

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk