Skip to content

Aryan7391/Innsight-AI-1

Repository files navigation

🧠 Innsight-AI

Enterprise-Grade Hybrid Business Intelligence System (Fully Local & Modular)

Innsight-AI is a modular Hybrid Business Intelligence AI system that combines structured analytics, business formula computation, and document intelligence into one unified architecture.

It runs fully offline using a local LLM (Ollama) and persistent vector storage, with no cloud APIs or external dependencies.


🚀 Core Capabilities

📊 Structured Analytics Engine

  • Sum / Total
  • Average / Mean
  • Min / Max
  • Count
  • Group-by (Department, Vendor, Category, Date)
  • Automatic graph rendering (Bar & Line)
  • Dynamic column detection (no hardcoding)

🧮 Business Formula Engine

Supports:

  • RevPAR
  • ADR
  • Occupancy Rate
  • ROI
  • Profit Margin

Built using a registry-based extensible formula system.


📚 Document Intelligence (RAG)

  • PDF semantic search
  • Sentence-based chunking
  • Embeddings using SentenceTransformers
  • Persistent ChromaDB vector storage
  • Context-grounded LLM responses

🔄 Smart Query Router

Automatically routes user queries to:

  • Formula Engine
  • Analytics Engine
  • Vector Search + LLM
  • Fallback LLM

Structured queries bypass the LLM entirely for performance.


🏗 System Architecture

Streamlit UI (app.py)
        ↓
Query Router (rag_chat.py)
        ↓
 ┌───────────────┬────────────────┬────────────────┐
 Analytics        Formula Engine    Vector Engine
 (analytics.py)   (business_formulas.py) (vector_store.py)
        ↓
Document Registry (SQLite)
        ↓
Sync Engine (sync_engine.py)

Strict separation of responsibilities across layers.


📂 Project Structure

project_root/
│
├── app.py
├── rag_chat.py
├── analytics_engine.py
├── business_formulas.py
├── vector_store.py
├── sync_engine.py
├── document_registry.py
│
└── storage/
    ├── documents/
    └── chroma_db/

🧰 Tech Stack

Layer Technology
UI Streamlit
Analytics Pandas
Graphing Matplotlib
Embeddings SentenceTransformers
Vector DB ChromaDB (Persistent)
LLM Ollama (tinyllama / phi)
Registry SQLite
Backend Pure Python

No:

❌ LangChain
❌ FAISS
❌ OpenAI API
❌ Cloud services

Fully offline after model download.


⚙️ Setup Instructions

1️⃣ Install Dependencies

Ensure Python 3.10+ and required packages are installed.


2️⃣ Start Ollama

In a separate terminal:

ollama serve

Install model if not already installed:

ollama pull tinyllama

3️⃣ Run the Application

streamlit run app.py

📊 Example Queries

Structured Analytics

  • sum amount by department
  • average profit by vendor
  • count transactions by category

Business Formulas

  • calculate revpar
  • what is occupancy rate

Document Intelligence

  • what is the refund policy?
  • explain data mining

🔄 Folder Synchronization

  • Detects newly added files
  • Prevents duplicate indexing using SHA256 hashing
  • Removes vectors when files are deleted
  • Maintains persistent SQLite registry

⚡ Performance Engineering Highlights

  • Lazy loading of embedding model
  • Lazy initialization of ChromaDB
  • Controlled LLM invocation
  • Batch embedding for efficiency
  • No unnecessary re-indexing
  • Structured queries avoid LLM calls
  • Fully local inference

Optimized for low-resource environments.


🔒 Offline Capability

After:

  • Installing Ollama
  • Downloading embedding model

The system works completely offline.

No internet required.


🎯 Use Cases

  • Hotel Industry BI
  • Financial Reporting
  • Enterprise Analytics
  • Operational Monitoring
  • Hybrid AI Intelligence Platforms

🏆 Hackathon Highlights

  • Hybrid Structured + Unstructured Intelligence
  • Enterprise-style modular architecture
  • Persistent vector memory
  • Auto graph generation
  • Local LLM integration
  • Zero cloud dependency
  • Smart routing for performance

🔮 Future Enhancements

  • Multi-CSV dataset selector
  • Semantic column matching
  • Confidence scoring
  • Role-based access control
  • REST API layer
  • Multi-model routing
  • Dashboard-style UI upgrade

👨‍💻 Author

Aryan
Software Architecture & Hybrid AI Systems Enthusiast


📄 License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages