Skip to content

Repository files navigation

Oddin Hackathon: Replacing BI and Risk Department with LLM

This project explores the use of Large Language Models (LLMs) to replace traditional Business Intelligence (BI) and Risk department workflows. The goal is to leverage LLMs for querying and interpreting data, providing insights, and integrating these capabilities into user-friendly interfaces like web apps and Slack.

Project Structure

1. Development and Fake Data Generation

The journey began with generating fake data to simulate real-world scenarios. This was done in the development/generate_data directory. The generated data served as the foundation for testing and validating the LLM-based approaches.

2. Naive Approach

The first attempt to use LLMs for BI and Risk tasks is implemented in 1_naive_approach.py. This script demonstrates a basic approach to querying and interpreting data using LLMs. While it worked to some extent, it lacked a user-friendly interface and had limited functionality.

3. Adding a UI with Chainlit

To improve usability, a UI was added using Chainlit in 2_chainlit_test.py. This allowed users to interact with the LLM through a web-based interface. The Chainlit app worked well and provided a more intuitive way to query and analyze data.

4. Slack Integration

Building on the success of the Chainlit app, the functionality was extended to Slack in 3_slack_app.py. This integration enabled users to interact with the LLM directly within Slack channels. While the Slack app worked, it faced challenges related to governance, model teaching, and scalability.

5. Transition to Databricks Genie

To address the limitations of the Slack app, the project transitioned to using Databricks Genie. Genie provides a robust platform for managing data governance and teaching models, making it a more suitable solution for enterprise use cases.

6. Snowflake Cortex

Key Features

  • Data Querying: Use LLMs to generate SQL queries and retrieve data.
  • Data Interpretation: Provide natural language explanations of query results.
  • User Interfaces: Interact with the system via a web app (Chainlit) or Slack.
  • Databricks Genie: Leverage Genie for enhanced governance and model management.

How to Run

  1. Generate Data: Start by generating fake data in the development/generate_data directory.
  2. Naive Approach: Test the basic functionality using 1_naive_approach.py. python 1_naive_approach.py
  3. Chainlit App: Run 2_chainlit_test.py to use the web-based UI. chainlit run 2_chainlit_test.py -w
  4. Slack App: Deploy 3_slack_app.py to integrate with Slack. This is way more complex since you need to create a tunnel to your local machine or deploy it on a server.
  5. Databricks Genie: Use the Databricks Genie integration for advanced features. Sorry my personal account

Lessons Learned

  • Governance is Key: Proper governance and model management are critical for enterprise adoption.
  • Iterative Development: Starting with a naive approach and iterating through UI and integrations helped refine the solution.
  • LLM Potential: is future of BI

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages