Skip to content

Latest commit

 

History

History
202 lines (144 loc) · 7.92 KB

File metadata and controls

202 lines (144 loc) · 7.92 KB

LinkedIn Sisense-open-source




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
  1. About The Project
  2. Getting Started
  3. Usage


About The Project

Product Screenshot

(back to top)

Built With

  • Sisense API
  • Python Python
  • Sisense Blox
  • Sisense Custom Code Transformations

(back to top)

Getting Started

Prerequisites

  • 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

Installation

  1. Log in to your Sisense instance (as a "Data Admin" or above)
  2. Enable Blox from the Admin/Add-Ons page: Blox
  3. Enable Custom Code and Custom Transformation: Custom Code
  4. Open any widget in edit mode
  5. Click on the menu items and click the “Add Transformation”: Transform
  6. Select "Import Notebook"
  7. Drag or select the installation notebook to the import screen
  8. Insert 'Install' in operation section, and your OpenAI API key in AIAPIKEY section: open in jupyter Important Note: The same notebook performs both Install and Uninstall operations - verify the required operation was selected
  9. That’s it! you did it! If you refresh the analytics page you should see a new dashboard: “Blox AI”

(back to top)

Usage

We provide 5 examples of using a language model within Sisense:

  1. Search: Enrich your data
  2. Suggest Relation: Suggest relationships between tables
  3. Connect Relation: Connect relationships between tables (based on the suggestions)
  4. Widget Summary: Return a short summary based on the data of a single widget in a dashboard
  5. 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

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

Search result

Suggest Relation

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

Relations

Connect Relation

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

Widget Summary

Generate a summary based on the data presented in the widget Do one of the following:

  1. Edit dashboard's data source and select the data source containing the target widget
  2. 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

Dashboard Summary

Generate summary based on the data presented in all the widgets in the dashboard.

Do one of the following:

  1. Edit dashboard's data source and select the data source containing the target dashboard
  2. 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

Dashboard

(back to top)