Giter Club home page Giter Club logo

generative-ai-poc's Introduction

Generative AI POC

This POC was created to test the integration between the power of AI (Gemini AI) that generates BigQuery SQL queries and the Google Cloud BigQuery API to request data in the backend and return it as charts in the frontend.

I'm currently using two prompt generators and calling them BigQueryAnalyst and DataAnalyst, which will be responsible for generating the prompts and structuring the data for the end user asking the question.

More about it

This application provides users with seamless access to vast datasets through a user-friendly interface. Advanced AI capabilities allow users to input their desired data queries, and the system autonomously generates SQL queries tailored to their specifications. Leveraging the colossal storage and processing power of BigQuery, the application swiftly retrieves the requested data.

It empowers users with deeper insights into the retrieved data. After executing the SQL query, the AI elucidates the query's structure and purpose, offering users a better understanding of the data retrieval process. The application then visualizes the obtained data in an intuitive bar chart format, crafted using React and Recharts, enabling users to grasp key trends and patterns at a glance.

In summary, our application seamlessly integrates powerful technologies to streamline data access, analysis, and visualization, empowering users to extract meaningful insights effortlessly

Demo

simplescreenrecorder-2024-05-02_01.07.47-ezgif.com-crop-video.mp4

Stack

  • Frontend
    • React
    • Recharts
    • Gemini API model `gemini-pro`
    • LangChain
  • Backend
    • NodeJS
    • Google Clound BigQuery API

Getting Start

  1. To have a Google Cloud Account
  2. Add a public bigquery dataset
  3. Generate a keyfile.json (https://cloud.google.com/iam/docs/keys-create-delete)
  4. Generate a Gemini API key (https://aistudio.google.com/app/apikey)
  5. Create a .env file at root folder following these variables
REACT_APP_GOOGLE_API_KEY=your-api-key
REACT_APP_GOOGLE_CLOUD_PROJECT_ID=your-project-id
REACT_APP_PROJECT_ID=bigquery-public-data
REACT_APP_DATASET_ID=google_analytics_sample
  1. Install packages at root folder npm install
  2. Start backend at /server folder node server.js;
  3. Star frontend at root folder npm start;

Improvements

  1. Well-defined prompts are the key to good AI outcomes. Here's an article that can be used as a reference to create suitable prompts for each database: https://answerrocket.com/resources/leveraging-ai-for-sql-code-generation-guide/.

  2. To generate graphics, it's necessary to employ a multifaceted process, combining data, visualizations, and interactivity to present information clearly and concisely. We can use Looker as an example for this. read more here.

generative-ai-poc's People

Contributors

interaminense avatar

Stargazers

Márcio Fonsêca avatar

Watchers

 avatar  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.