๐ PiRhoAI - Privacy Focused AI Business Analytics Assistant
Transform your business data into actionable insights with AI-powered natural language Q&A! This is a minimum viable product for MSME analytics using Streamlit, LangChain, and Retrieval-Augmented Generation (RAG).
Live Demo: https://pirhoai.streamlit.app/
๐ธ Screenshots

Note: Add actual screenshots from https://pirhoai.streamlit.app/ to the screenshots/ directory
๐ Features
Core Capabilities
- ๐ Data Integration: Upload local CSV/Excel files or import from Google Drive sharing links
- ๐ค AI-Powered Q&A: Natural language queries supported (English & เคนเคฟเคเคฆเฅ)
- ๐ Smart Analysis: Retrieval-Augmented Generation for accurate, context-aware responses
- ๐ Data Preview: Real-time visual preview with auto-loaded sample business data
- โ๏ธ Multi-Model Support: Switch between local models (Phi-4, Phi-3) or cloud API (Grok-4) for optimal performance
- ๐ Auto Setup: Sample data loads automatically on first run for immediate exploration
๐ Revolutionary Edge AI Technology
- ๐ฑ Cloud-First with Local Fallback: API-based AI (Grok-4) for fast responses, local models when offline or hardware allows
- ๐ง Tiny LLMs for Full Analytics: Complete business intelligence using compact models (3B parameters) with CPU compatibility
- ๐ Privacy & Performance Balance: API mode for sensitive data (no local storage), local models for offline privacy
- ๐ค AI Assistant with Agents: Intelligent workflows adapting to your business patterns
- โก Smart Model Selection: Automatic CPU/GPU detection with appropriate quantization (8-bit GPU, float32 CPU)
- ๐ฐ Flexible Costs: Free tier API usage, or zero-cost local processing
๐ Requirements Validation
Based on comprehensive market research and technical analysis:
๐ฏ Product Mission
Democratizing data analytics for MSMEs by enabling natural language queries without technical expertise.
๐ค Unique Selling Points
- ๐ฑ Your Phone is the GPU: Transform your smartphone into a powerful analytics engine - no expensive hardware needed
- ๐ง Tiny LLMs, Massive Intelligence: Complete business analytics with efficient AI models (3B-7B parameters) that run entirely offline
- ๐ Ultimate Privacy: 100% private analytics - your business data never leaves your device, fully compliant with privacy regulations
- ๐ AI Agent Workflows: Intelligent custom assistants that adapt to your specific business needs and automate routine analytics tasks
๐ก Value Proposition
- Data Sovereignty: Your business data stays completely private and secure
- Zero Infrastructure Costs: Leverage existing phone/desktop computing power
- Offline Functionality: Work without internet for maximum productivity
- Custom AI Workflows: AI agents learn your business patterns and provide tailored insights
๐ Market Fit (Especially in Developing Markets)
- MSMEs drive 40-60% GDP in emerging economies (India, Brazil, Indonesia)
- 90% SMEs lag in analytics adoption; this bridges the gap
- Multi-language support for regional diversity
- Affordable free-tier storage integration (Google Drive)
๐ง Recommended LLM Stack
| Model | Parameters | Best For | Key Strengths |
|โโ-|โโโโ|โโโ-|โโโโโ|
| Phi-4-mini | 3.8B | Primary | Complex reasoning, multilingual, edge deployments |
| Phi-3 | 3.8B | NLP tasks | Coding/reasoning with 128K context |
| IBM Granite 4.0 Tiny | 3B | Compliance | Hybrid efficiency, enterprise security |
โ๏ธ Competitive Analysis
- vs. Snowflake: Hours setup vs. weeks, $20-100/month vs. $200-500+ on 100GB
- vs. Zoho Analytics: LLM-first conversational AI, storage-first integration, disruptive pricing
๐ ๏ธ Setup
Local Development
- Create virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt # Full ML features
# OR
pip install -r requirements_basic.txt # Basic functionality only
- Set environment variables (optional, for API models):
export XAI_API_KEY="your-xai-api-key-here" # For Grok-4 API access (free tier available)
# Local models work without API key, startup may take longer
- Run the application:
streamlit run main.py # Default configuration with API-based AI for fast startup
๐ Data Preparation
The app supports:
- CSV Files: Standard comma-separated values
- Excel Files: .xlsx or .xls formats
- Google Drive: Paste sharing URL for cloud data import
๐ค AI Features (Optional)
For full AI capabilities, install ML dependencies. The app provides graceful fallbacks:
- If ML libs unavailable, data upload and preview still work
- AI responses show helpful messages about installation
- Basic pandas processing ensures core functionality
๐ Deployment
Streamlit Cloud (Recommended)
- Fork this repository
- Connect to Streamlit Cloud
- Set main module as
main.py
with Python 3.13
Vercel (Alternative)
# Requires vercel.json configuration (included)
vercel --prod
Docker (Advanced)
# Coming in future updates
# Supports both basic and ML configurations
๐ Key Files
main.py
: Entry point with UI configuration
src/ui.py
: Streamlit interface with tabs and styling
src/core/rag.py
: Retrieval-augmented generation logic
src/core/llm.py
: LLM integration with multiple model support
src/data/connector.py
: Google Drive and local file connectors
requirements.txt
: Full dependencies with ML packages
requirements_basic.txt
: Minimal setup for demo purposes
๐จ UI/UX Features
- Professional Design: Gradient headers and brown-themed color scheme
- Responsive Layout: Tabs for Analytics vs. Product Briefing
- Interactive Elements: Comparison tables with detailed specs
- Customer Journey Mapping: 5-step onboarding visualization
- Accessibility: Multi-language support and clear navigation
๐ Customer Journey
- Discovery: Find the solution via web/app stores
- Data Connection: Upload files or connect cloud storage
- Exploration: Ask natural questions in preferred language
- Decision Making: Get AI insights to drive business actions
- Growth: Scale with advanced features as business expands
- Setup Time: Under 5 minutes
- Data Processing: Instantaneous for <1GB datasets
- AI Response Time:
- API Mode (Grok-4): <3 seconds (requires internet)
- Local Mode (Phi-3.5): <30 seconds first load, <5 seconds cached (CPU-compatible)
- Memory Usage: ~2GB max (local models), <1GB API mode
- Platform Compatibility: macOS, Windows, Linux with automatic CPU/GPU detection
๐ก๏ธ Privacy & Security
- Local data processing (no uploads to cloud)
- End-to-end encryption for file operations
- No user data stored beyond session
- Compliant with global privacy standards
๐ฎ Future Roadmap
- Advanced visualization charts and dashboards
- Voice input for hands-free operation
- Multi-file analysis and cross-data correlations
- Automated report generation and scheduling
- Integration with accounting software (QuickBooks, etc.)
- Predictive analytics for trend forecasting
- Team collaboration features
- Documentation: Extensive in-app help and tooltips
- Community: Forums for user-shared templates
- Support: Email assistance for technical issues
- Learning: Video tutorials and sample datasets
๐ค Contributing
- Fork the repository
- Create a feature branch
- Make improvements following the existing patterns
- Submit a pull request
๐ License
This project is open-source under the MIT License. Feel free to use, modify, and distribute.
Product Vision: โYour phone becomes your business analystโ - Private, powerful AI analytics using your deviceโs processing power with Tiny LLMs for complete data intelligence. MSMEs get enterprise-grade insights with maximum privacy and zero infrastructure costs through intelligent AI agents and custom workflows.
Auto-updated from PiRhoAI development - https://pirhoai.streamlit.app/