CoolFace
Apppublic

ErdalX/business-analytics-ai-rag-llm-assistant

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes
App README

BUSINESS ANALYTICS AI - LLM - RAG ASSISTANT

Upload your sales data and ask questions about your business! This AI-LLM-RAG application deployed on Streamlit, using ChromaDB for vector storage and GROQ for LLM responses. business-analytics-ai-rag-llm-assistant. AI-powered Business Analytics Assistant using RAG (Retrieval-Augmented Generation), LLMs, and Vector Databases for intelligent business insight generation from retail sales data.



πŸš€ Live Demo

https://business-analytics-ai-rag-llm-assistant-fe5mq66x8qs9hf7fdypwch.streamlit.app/


πŸš€ Project Overview

This project is an end-to-end Business Intelligence + AI application that allows users to analyze sales data using natural language questions. The system combines:

  • β€”Business Analytics
  • β€”RAG Architecture
  • β€”LLM-based Question Answering
  • β€”Vector Search

Interactive Dashboarding

Users can ask questions such as:

  • β€”"Which country generated the highest revenue?"
  • β€”"What were the monthly sales trends?"
  • β€”"Who are the top customers?"
  • β€”"Which products performed best?" The application retrieves relevant business insights from a vector database and generates contextual responses using an LLM.

🧠 Technologies Used

  • β€”AI / LLM / RAG
  • β€”Llama 3.1 (via GROQ API)
  • β€”LangChain
  • β€”ChromaDB
  • β€”Sentence Transformers
  • β€”RAG Pipeline Architecture
  • β€”Data Science & Analytics
  • β€”Python
  • β€”Pandas
  • β€”NumPy
  • β€”Matplotlib
  • β€”Plotly
  • β€”Web Application
  • β€”Streamlit & HF
  • β€”Vector Embeddings
  • β€”all-MiniLM-L6-v2

πŸ“Š Features

  • β€”Interactive Business Analytics Dashboard
  • β€”Natural Language Question Answering
  • β€”KPI Monitoring
  • β€”Revenue Trend Analysis
  • β€”Customer & Product Insights
  • β€”Vector Similarity Search
  • β€”Bilingual Response Support (English & Turkish)
  • β€”Retrieval-Augmented Generation (RAG)

πŸ—‚οΈ Project Structure

Bash

  • β€”business-analytics-ai-rag-llm-assistant/
  • β€”β”‚
  • β€”β”œβ”€β”€ app/
  • β€”β”‚ └── app.py
  • β€”β”‚
  • β€”β”œβ”€β”€ data/
  • β€”β”‚ β”œβ”€β”€ raw/
  • β€”β”‚ └── processed/
  • β€”β”‚
  • β€”β”œβ”€β”€ notebooks/
  • β€”β”‚ β”œβ”€β”€ 01datacleaning_eda.ipynb
  • β€”β”‚ β”œβ”€β”€ 02businessmetrics.ipynb
  • β€”β”‚ └── 03ragpreparation.ipynb
  • β€”β”‚
  • β€”β”œβ”€β”€ requirements.txt
  • β€”β”œβ”€β”€ README.md
  • —└── .env

βš™οΈ Installation

Clone the repository: Bash git clone <your-repo-link> cd business-analytics-ai-rag-llm-assistant Create a virtual environment:

  • β€”Bash python -m venv .venv Activate the environment: Windows Bash .venv\Scripts\activate

Install dependencies: Bash

pip install -r requirements.txt

πŸ”‘ Environment Variables

Create a .env file:

  • β€”Plain text
  • β€”GROQAPIKEY=yourapikey_here

▢️ Run the Application

Bash streamlit run app/app.py

πŸ“ˆ Dataset

## Dataset used:

  • β€”Kaggle Online Retail Dataset
  • β€”The dataset contains transactional retail sales records including:
  • β€”Invoice information
  • β€”Products
  • β€”Quantities
  • β€”Customer IDs
  • β€”Countries
  • β€”Revenue data
  • β€”----

🧩 RAG Workflow

Plain text

  • β€”Business Data
  • β€”β†’ Data Cleaning & Analytics
  • β€”β†’ Insight Summaries
  • β€”β†’ Text Embeddings
  • β€”β†’ ChromaDB Vector Storage
  • β€”β†’ Similarity Retrieval
  • β€”β†’ LLM Response Generation

🌍 Deployment

The application is designed for deployment on:

  • β€”Hugging Face Spaces
  • β€”Streamlit Cloud

🎯 Future Improvements

Advanced KPI dashboards RAG evaluation with RAGAS FAISS support CI/CD pipelines Multi-dataset support Advanced business forecasting SQL agent integration


πŸ‘¨β€πŸ’» Author

Developed by Erdal ERDOĞAN -- Goodman as part of an AI, Data Science and Business Intelligence portfolio project.