The following examples show how language models can be integreated into Sisense from a UI-friendly perspective. We leverage Blox and Custom Code Transformation to show a number of examples how language models can be used to enrich your data or improve your analytics.
Table of Contents
- An active Sisense account with a live model on Snowflake. No need to have write permission on Snowflake read will be good enough. How to add a model.
- OpenAI API key
- Log in to your Sisense instance (as a "Data Admin" or above)
- Enable Blox from the Admin/Add-Ons page:
- Enable Custom Code and Custom Transformation:
- Open any widget in edit mode
- Click on the menu items and click the “Add Transformation”:
- Select "Import Notebook"
- Drag or select the installation notebook to the import screen
- Insert 'Install' in operation section, and your OpenAI API key in AIAPIKEY section: Important Note: The same notebook performs both Install and Uninstall operations - verify the required operation was selected
- That’s it! you did it! If you refresh the analytics page you should see a new dashboard: “Blox AI”
We provide 5 examples of using a language model within Sisense:
- Search: Enrich your data
- Suggest Relation: Suggest relationships between tables
- Connect Relation: Connect relationships between tables (based on the suggestions)
- Widget Summary: Return a short summary based on the data of a single widget in a dashboard
- Dashboard Summary: Return a short summary based on the data from all widgets in a dashboard
For a full review, please see the custom_code_notebooks section
Search is used to enrich your data by prompting the language model and integrating the results back into Sisense. The results are presented as a widget in the dashboard as well and being stored in a new table.
The search result will be stored in a Snowflake table
- Edit the
Table Name
field and enter the name of the table that will hold the result - Write your prompt under
Your Message
, for example:
Please provide industry segmentation for each of the following companies: [dashboard: opportunity widget: customers column: company]
- Click on
Search
- A widget with the found results will be displayed
Use the AI model to search the correct join relation between the new generated table and the existing tables
- Edit the
Table Name
field and enter the name of the table should be connected - Click on
Suggest Relation
- A list of possible relations should be shown
This functionality should be used after using Suggest Relation
- Click the radio button on the desired suggested relations
- Click on
Connect Relation
- Go to the data model (under
Data
tab), you should see the table is now connected using the selected relations
Generate a summary based on the data presented in the widget Do one of the following:
- Edit dashboard's data source and select the data source containing the target widget
- Prefix the prompt of the next step with "model {Name of the data model that the target widget uses} {dashboard {Name of dashboard that contains the widget}"
- Edit the prompt with "widget {Target Widget Title}"
- Click on
Widget Summary
Generate summary based on the data presented in all the widgets in the dashboard.
Do one of the following:
- Edit dashboard's data source and select the data source containing the target dashboard
- Prefix the prompt of the next step with "model {Name of the data model that the target dashboard uses}"
- Edit the prompt with "dashboard {Target Dashboard Title}"
- Click on
Dashboard Summary
- A response containing a short summary should be displayed