GithubHelp home page GithubHelp logo

theodo-group / looker-explore-assistant Goto Github PK

View Code? Open in Web Editor NEW

This project forked from looker-open-source/looker-explore-assistant

0.0 0.0 0.0 14.97 MB

A React Application for interacting with Looker data through natural language.

License: MIT License

JavaScript 3.72% Python 4.39% TypeScript 33.75% CSS 1.17% LookML 0.22% HCL 5.55% Jupyter Notebook 50.64% SCSS 0.04% Shell 0.53%

looker-explore-assistant's Introduction

Looker Explore Assistant

This is an extension or API plugin for Looker that integrates LLM's hosted on Vertex AI into a natural language experience powered by Looker's modeling layer.

explore assistant

Description

The Explore Assistant allows a user to generate a Looker Explore Query via natural language outputted into a visualization. As opposed to writing the raw SQL itself, the LLM is optimized to translate a text input into a Looker explore query. This is important as the LLM does what it's great at, generative content, and Looker powers it with all the underlying data context, metadata and nuances that come with business data and analytics.

Additionally, the extension provides:

  • Question History (this is stored in the browser's localstorage)
  • Categorized Prompts (these can be customized by the use cases of your organization)
  • Cached Explore URL's when clicking from History
  • Structured Logging with Input & Output Token Counts (enables a workflow of log sink to BQ for cost estimation & tracking)
  • Flexible Deployment Options
  • Multi-turn
  • Insight Summarization

Technologies Used

Frontend

Looker

Backend API

Setup

Getting started involves:

The local cloud function backend and example generation require some python packages. It is recommended to create a python virtual environment and install the dependencies:

python3 -m venv .venv
source .venv/bin/activate 
pip3 install -r ./explore-assistant-examples/requirements.txt
pip3 install -r ./explore-assistant-cloud-function/requirements.txt 

Recommendations for fine tuning the model

This app uses a one shot prompt technique for fine tuning a model, meaning that all the metadata for the model is contained in the prompt. It's a good technique for a small dataset, but for a larger dataset, you may want to use a more traditional fine tuning approach. This is a simple implementation, but you can also use a more sophisticated approach that involves generating embeddings for explore metadata and leveraging a vector database for indexing.

Any jsonl file you see in this repo is used to train the llm with representative Looker Explore Query examples. These examples are used to help the understand how to create different variations of Looker Explore Queries to account for requests that might result in pivots, relative date filters, includes string syntax, etc. For convenience and customization we recommend using Looker System Activity, filtering queries for the model and explore you plan on using the assistant with, and then using the top 20-30 queries as your example input output string with their expanded url syntax. Please see the Explore Assistant Training Notebook for creating query examples for new datasets via an automated process.

looker-explore-assistant's People

Contributors

ase1210 avatar balajibr avatar davidtamaki avatar dependabot[bot] avatar drstrangelooker avatar lukafontanilla avatar pjabl avatar qchuchu avatar waziers avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.