FinAIgent is a state-of-the-art, RAG-powered financial assistant designed to provide accurate, context-aware, and multilingual financial advice. Specifically tailored for the Indian context, it supports 10+ regional languages and leverages specialized datasets for scam prevention, government schemes, and personal budgeting.
- 🌐 Multilingual Support: Seamlessly interact in English, Hindi, Marathi, Tamil, Telugu, and more.
- 🔎 Hybrid RAG Architecture: Combines local TF-IDF & KNN-based retrieval with the generative power of Google Gemini (1.5/2.0 Flash).
- 🛡️ Scam & Fraud Protection: Dedicated modules for identifying common financial scams and providing preventative actions.
- 🏛️ Indian Government Schemes: Comprehensive database of welfare schemes, eligibility, and application processes.
- 🎨 Premium Glassmorphism UI: High-end user experience with dark/light modes, animated backgrounds, and responsive design.
- 🚨 Emergency Integration: Quick access to national cybercrime reporting (Helpline 1930).
- 📊 Research-Grade Visualizations: Built-in suite to generate PCA/t-SNE vector space plots, accuracy graphs, and system architecture diagrams.
- ⚡ Adaptive Response Levels: Dynamically adjusts response depth (Low, Medium, High) based on query complexity.
FinAIgent operates on a multi-layered architecture:
- Frontend: Interactive web interface for user queries.
- NLU Layer: Language detection and translation (English processing core).
- Retrieval Engine: TF-IDF Vectorization and KNN (K-Nearest Neighbors) search across curated CSV datasets.
- LLM Integration: Grounded generation via Google Gemini, ensuring responses are both creative and factual.
- Post-Processing: Final translation and formatting to ensure user satisfaction in their native language.
├── app.py # Main Flask API and Core Logic
├── finaigent_visualizations.py # Scientific plotting and analysis suite
├── evaluate_model_graphs.py # Performance evaluation scripts
├── templates/ # Web UI components
├── static/ # Assets and Styles
├── config.py/config_example.py # Configuration management
├── datasets/ # Curated CSV files (Scams, Schemes, Budgeting)
└── visualizations_output/ # Generated analysis reports
- Python 3.9+
- Google Gemini API Key
pip install flask flask-cors pandas scikit-learn google-generativeai googletrans==4.0.0-rc1 langdetect matplotlib seabornCreate a config.py file in the root directory:
GEMINI_API_KEY = "YOUR_API_KEY_HERE"python app.pyThe server will start on http://localhost:5000.
FinAIgent is designed with research in mind. You can generate performance metrics and visualizations using:
python finaigent_visualizations.pyThis produces:
- Vector Space Plots: PCA and t-SNE visualizations of the dataset embeddings.
- Precision-Recall Curves: Retrieval performance analysis.
- Processing Time Breakdown: Efficiency analysis of each stage (Detection, Retrieval, Generation).
We welcome contributions to FinAIgent! Whether it's adding new datasets, improving translation accuracy, or enhancing the UI, feel free to open a PR.
[Insert License Type - e.g., MIT]