Conversational AI for the Table AI Assist Tool
The Table AI Assist tool uses conversational AI technology to make you feel close to the data.
You can have an interactive dialogue with the tool, where a sequence of natural language prompts is used to query or interact with the database. The tool adapts to what you are asking, picks up on context, and provides relevant responses. For example, if you are a risk analyst working in a banking firm, you can ask, “Is this transaction authorized by you?”, and follow up with context aware security question. The tool can verify suspicious transaction and flag it. With this feature, the tool continuously learns from interactions and improves the detection accuracy.
Working of the Conversational AI in the Table AI Assist Tool
When using Table AI Assist, you're essentially creating a natural language prompt that translates into a new column in your table. This new column contains the SQL expression that corresponds to your prompt.
You ask a question, prompting data retrieval model to access the table. The retrieval model queries your autonomous database and responds with a refined prompt that augments your original query with supplementary contextual details.
- On the Table AI Assist page, the tables that you have created so far are displayed. Click + New Recipe beside the CITIBIKETRIPDATA_SMALL Table.
You can view the Edit Recipe page.
- Select Add or Replace Column from the + Add Step drop-down field.
- On the Add Step dialog, enter the following prompt in the Ask AI to generate SQL text box area:
Does the trip start in Manhattan?
You can also select + Include Column Details to perform any of the following actions:-
View All Columns: If you are working on adding a step and forget the names of your columns, you can click this button to see a list of all your column names.
Basic Prompt Building: You can click on column names to automatically add them to your prompt, so you do not have to type them out. However, you still need to complete the prompt by explaining what you want to do with those columns.
Add Sample Data to Your Prompt: For example, if you have a
VARCHAR
column that contains dates and you want to add one year to those dates, simply askingAdd one year to my_varchar_date column
might not work because the AI does not know the date format (likeYYYY/MM/DD
orDD/MM/YYYY
). By default, we only send column names and data types to the model, not the actual data.If you use the + Include Column Details option, you can enter the column name and check Include Sample Values. This adds example data to your prompt, like:
Add one year to my_varchar_date column. my_varchar_date sample values: 1995/4/5, 2014/12/31
With this added context, the tool understands how to handle the date strings properly. Sending sample data can also help in other cases, such as redacting sensitive information like phone numbers, credit cards, or emails.
-
-
Click Ask AI.
Selecting Ask AI opens a right pane in the Add Step dialog that displays the newly generated column name, the equivalent SQL code and the new generated
TRIP_STARTS_IN_MANHATTAN
column is displayed in the Data Preview section. You can also rename this column if you want. -
If you want to learn more about the trip, for example, whether it began in
BROOKLYN
, you can continue the conversation in the Refine the returned response or save the step text field.Enter the following prompt in the chat area:Brooklyn?
Click Ask AI.
Note:
Observe that the tool understands the background of the chat from earlier parts of the conversation and responds accordingly, rather than treating each prompt as isolated and displays the modified
CITIBIKETRIPDATA_SMALL
table with newly generatedTRIP_STARTS_IN_BROOKLYN
column - Click Save to save the modified
CITIBIKETRIPDATA_SMALL
with newly addedTRIP_STARTS_IN_BROOKLYN
column.Note:
To save the previously modified tables, be sure to click Save; otherwise, your updates will be lost.You can then proceed further by creating a recipe from the above steps. See Prepare Data Using Table AI Assist Tool for more information on creating a recipe.