Skip to content

ishitagod/Financial-Analysis-ChatBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Financial Analysis Chatbot

A powerful AI-driven tool that analyzes financial datasets and delivers clear, concise insights in everyday language. This chatbot simplifies complex financial ratios and statements, making them accessible to users of all backgrounds.


🚀 Project Overview

The Financial Analysis Chatbot is a capstone project designed to bridge the gap between complex financial data and user comprehension. It ingests financial reports (PDF, text, CSV), processes them using modern AI techniques, and responds to user queries with easy-to-understand explanations and relevant citations.

Key Objectives

  • Simplified Insights: Translate intricate financial ratios and metrics into layman terms.
  • Interactive Chat Interface: Offer a conversational UI for users to ask questions about uploaded financial documents.
  • Robust Backend: Leverage Retrieval-Augmented Generation (RAG) for precise, context-aware answers.
  • Scalability & Flexibility: Support multiple language models and vector databases for future enhancements.

🛠️ Technologies Used

  • Python: Core programming language for backend logic and data processing.
  • Streamlit: Builds the interactive web interface for document upload and chat.
  • LangChain: Manages language model interactions and RAG workflows.
  • HuggingFace Transformers: Hosts and serves models like Falcon 7B Instruct and Mistral 7B.
  • FAISS: Provides fast, local vector storage for embeddings.
  • all-MiniLM-L6-v2: Embeddings model for chunk-level semantic search.
  • PyPDF2: Extracts text from PDF documents asynchronously.
  • asyncio: Handles asynchronous file processing for improved performance.
Additional Support
  • Pinecone / ChromaDB: Optional cloud vector databases for production-scale deployments.
  • Other Models: Easily swap in alternative LLMs (e.g., Mistral) for specialized use cases.

🏗️ System Architecture

  1. Upload & Extract: Users upload files; text is extracted page-by-page or line-by-line.
  2. Chunk & Embed: Extracted text is split into logical chunks; embeddings are generated.
  3. Store & Retrieve: Embeddings are indexed in FAISS (or an alternative DB) for similarity search.
  4. Generate & Cite: On query, relevant chunks are retrieved and passed to the LLM for answer generation. Sources are tagged via metadata.

⚙️ Installation & Setup

  1. Clone the repository

    git clone https://github.com/yourusername/financial-analysis-chatbot.git
    cd financial-analysis-chatbot
  2. Create & activate a virtual environment

    python3 -m venv venv
    source venv/bin/activate  # on Windows: venv\\Scripts\\activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Run the app

    streamlit run app.py
    • Open your browser at http://localhost:8501.

💬 Usage

  1. Upload Documents: Use the sidebar to upload PDF, text, or CSV files containing financial data.
  2. Initialize Chatbot: Click Create Chatbot to process uploads and build the vector store.
  3. Ask Questions: Enter financial queries (e.g., "What is the profit margin?") and receive explanations with sources.

📄 License

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


Acknowledgements


Created with ❤️ by Ishita Godani

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages