Skip to content

KushalChaudhari-16/Multi-Document-Financial-Analysis-System-with-Temporal-RAG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏦 Financial Temporal RAG System

A sophisticated Retrieval-Augmented Generation (RAG) system designed for financial document analysis with temporal intelligence and memory capabilities.

✨ Features

  • 📄 Multi-Document Processing - Extract and analyze content from financial PDF reports
  • Temporal Intelligence - Understand time-based queries and track financial trends over periods
  • 🧠 Memory-Augmented Conversations - Session management with context awareness
  • 🔍 Cross-Document Analysis - Compare insights across multiple financial documents
  • 📊 Causal Reasoning - Identify relationships and causality in financial data
  • 🎯 Semantic Search - Advanced vector-based document retrieval

🛠️ Tech Stack

Backend

  • Python 3.8+ - Core application logic
  • FastAPI - RESTful API framework
  • Google Gemini 2.0 Flash - Large Language Model
  • ChromaDB - Vector database for embeddings
  • Sentence Transformers - Text embeddings (all-MiniLM-L6-v2)
  • PyMuPDF - PDF processing and extraction
  • LangChain - Document processing and text splitting

Frontend

  • React - Component-based UI framework
  • Vue.js - Progressive frontend framework
  • Bootstrap - Responsive design system

AI/ML Libraries

  • Pytesseract - OCR for image text extraction
  • Pandas - Data manipulation and analysis
  • NumPy - Numerical computations

User Interface Preview

Financial RAG System UI Modern, intuitive interface for seamless financial document analysis

🚀 Quick Start

Prerequisites

  • Python 3.8 or higher
  • Google Gemini API key
  • Node.js (for frontend)

Installation

  1. Clone the repository

    git clone https://github.com/your-username/financial-temporal-rag.git
    cd financial-temporal-rag
  2. Set up Python environment

    pip install -r requirements.txt
  3. Configure environment variables

    cp .env.example .env
    # Edit .env and add your GEMINI_API_KEY
  4. Add financial documents

    # Place your PDF files in the data/ directory
    mkdir data
    # Copy your financial PDFs to data/
  5. Run the system

    # Backend
    python main.py
    
    # FastAPI server (in separate terminal)
    uvicorn app:app --reload
    
    # Frontend (in separate terminal)
    cd frontend
    npm install
    npm start

🔧 Configuration

Key configurations in src/core/config.py:

  • Embedding Model: all-MiniLM-L6-v2
  • LLM Model: gemini-2.0-flash
  • Chunk Size: 1000 tokens with 200 overlap
  • Session TTL: 24 hours
  • Max Sessions: 10

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Google Gemini for providing powerful LLM capabilities
  • ChromaDB for efficient vector storage
  • LangChain community for document processing tools

Star this repo if you find it helpful! | 📧 Issues & Feedback welcome

About

A sophisticated Retrieval-Augmented Generation (RAG) system designed for financial document analysis with temporal intelligence and memory capabilities.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors