Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

💳 Financial AI System – Complaint Classification & AI Agent

👩‍💻 Overview

This project is an end-to-end AI system for financial text analysis and intelligent automation.

It combines:

  • NLP-based classification of financial complaints
  • Machine Learning pipeline (TF-IDF + Linear SVM)
  • Data engineering and balancing of large-scale datasets
  • AI Agent layer for structured decision-making and logging

⚙️ Project Structure

1. Complaint Classification Model

  • Processes real-world financial complaint data
  • Performs text cleaning and preprocessing
  • Balances dataset across financial categories
  • Trains a supervised ML model (Linear SVM)
  • Evaluates performance using classification metrics

2. AI Agent System

  • Implements a structured AI agent workflow
  • Logs decision-making steps in real time
  • Uses modular components:
    • Text cleaning engine
    • Prediction engine
    • Activity logger
  • Designed for extensibility and production-style architecture

🧠 Machine Learning Pipeline

  • Text Vectorization: TF-IDF (1–2 grams)
  • Model: Linear Support Vector Machine (LinearSVC)
  • Strategy: Stratified train/test split
  • Optimization: Balanced class weights
  • Output: Multi-class financial category classification

📊 Dataset

  • Source: Consumer Financial Complaints Dataset
  • Large-scale real-world financial narratives
  • Processed and balanced across categories:
    • Banking & Cards
    • Debt Collection
    • Loans & Mortgages
    • Credit Services

🧹 Preprocessing Steps

  • Removal of anonymization patterns
  • Text normalization (lowercasing)
  • Punctuation removal
  • Noise filtering
  • Token standardization

🤖 AI Agent Layer

The system includes an AI Agent architecture that:

  • Tracks execution steps with logging
  • Processes input through modular components
  • Loads trained ML models dynamically
  • Provides structured inference flow

📈 Results

  • High performance across multiple financial categories
  • Robust classification on real-world noisy data
  • Stable generalization using SVM with TF-IDF features

🛠 Tech Stack

  • Python
  • Pandas / NumPy
  • Scikit-learn
  • Matplotlib / Seaborn
  • HuggingFace (agent layer)
  • Joblib

🚀 How to Run

pip install -r requirements.txt
jupyter notebook

Run notebooks in order:

  1. Financial_Complaints_Classification_Modeling.ipynb

  2. Financial_AI_Agent_Deployment.ipynb

📌 Highlights

  • End-to-end ML pipeline
  • Real-world financial dataset
  • AI agent architecture
  • Production-style modular design

📫 Author

Yael Shraga Computer Science Student | Systems & AI Developer


About

Financial AI Agent is an end-to-end ML/GenAI pipeline that automatically classifies and routes financial customer complaints using an optimized SVM. It then leverages a GPT-2 LLM to dynamically generate context-aware, professional response drafts.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages