Skip to content

stanX19/GlassScore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GlassScore

Solution Overview

Problem: Traditional credit scoring systems are often "black boxes," relying solely on rigid financial history and failing to capture the full picture of an applicant's trustworthiness. They struggle with thin-file applicants and lack transparency.

Target User: Financial institutions, loan officers, and credit analysts seeking a more holistic and explainable risk assessment tool.

Fix: GlassScore is an advanced, multi-modal credit scoring platform that combines traditional Machine Learning with Large Language Models (LLMs) and real-time Web Search. It provides a transparent, explainable, and comprehensive credit score by analyzing structured data, personal statements, and external digital footprints.

Demo Video

Watch on YouTube

Slides

GlassScore Presentation (PDF) | View on Canva

Snapshots

Landing page

Login

Info page

Fill applicant data Applicant Info filling Upload related docs Upload docs in bulk

Evaluation

Streaming Evidence Initial ML result Negative Evidence streaming Positive Evidence streaming

Clear citation Clear citation

LLM Summary LLM Summary

Evidence Override Protocol Evidence Override Protocol

Getting Started

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • API Keys for OpenAI/Google Gemini and Tavily.

Installation

  1. Clone the repository:
    git clone https://github.com/stanx19/GlassScore.git
  2. Navigate to the root directory:
    cd GlassScore

Backend Setup

  1. Navigate to the backend directory:

    cd backend
  2. Create and activate a virtual environment:

    python -m venv venv

    Windows

    .\venv\Scripts\activate

    Linux/Mac

    source venv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Set up environment variables:

    cp .env.example .env

    Remember to fill in the API keys for OpenAI/Google Gemini and Tavily accordingly.

  5. Run the server:

    uvicorn main:app --reload

Frontend Setup

  1. Navigate to the frontend directory:
    cd frontend/GlassScore
  2. Install dependencies:
    npm install
  3. Start the development server:
    npm run dev

Tech Stack

  • Frontend: React, TypeScript, Vite, Axios, Tailwind CSS.
  • Backend: Python, FastAPI, Uvicorn.
  • AI & ML: LangChain, OpenAI GPT-4 / Google Gemini, Scikit-learn, SHAP, Tavily Search API.
  • Database: PostgreSQL (Production) / In-Memory (Dev).

System Architecture

GlassScore operates on a modern client-server architecture:

System Architecture

Data Flow:

  1. Input: User submits loan application data (structured) and supporting documents/statements (unstructured).
  2. Processing:
    • ML Engine: Predicts default risk using historical loan data.
    • LLM Engine: Analyzes text for behavioral risk markers (e.g., gambling references, inconsistencies).
    • Web Engine: Verifies claims against live web data (e.g., employment verification).
  3. Output: Real-time stream of "Evidence" points (Positive/Negative) that dynamically adjust the GlassScore.

Key Features

  • Multi-Modal Evaluation: Seamlessly integrates structured financial data (Random Forest Model), unstructured text analysis (LLM), and real-time web verification.
  • Pipeline: Automated preprocessing pipeline including median imputation for numerical values and one-hot encoding for categorical variables.
  • Real-Time Streaming: Results are pushed to the frontend instantly as they are processed, providing immediate feedback.
  • Explainable AI (XAI): Every score adjustment is backed by specific evidence, citations, and reasoning.
  • Interactive Dashboard: A modern, responsive UI that visualizes the scoring process and allows deep dives into specific risk factors.
  • Dynamic Risk Assessment: Adapts to new information found during the web search and text analysis phases.

Machine Learning Model

GlassScore employs a robust Random Forest Classifier to predict loan default risk based on historical data.

  • Algorithm: Random Forest Classifier (Scikit-learn).
  • Training: Optimized using RandomizedSearchCV with 3-fold cross-validation for hyperparameter tuning.
  • Features:
    • Numerical: Age, Income, Employment Length, Loan Amount, Interest Rate, Loan/Income Ratio, Credit History Length.
    • Categorical: Home Ownership, Loan Intent, Loan Grade, Default History.
  • Explainability: Integrated SHAP (SHapley Additive exPlanations) values to provide local interpretability, explaining exactly why a specific applicant received a certain risk score (e.g., "High Loan Amount" or "Low Income").

Innovation & Differentiation

  • Beyond the FICO Score: Moves beyond simple number crunching to understand the context of a borrower.
  • Agentic Verification: Uses autonomous agents to verify user claims on the web, reducing fraud risk.
  • Transparent Decisioning: Unlike traditional models, GlassScore tells you why a decision was made.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published