Skip to content

AlexHysel/AmBank-HackLab2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 AmBank Explainable AI Decision Engine

Explainable AI for Loan Applications

Team Thorn | AmBank HackLab 2.0, 2026


i. Chosen Problem Statement

The traditional personal loan approval process is characterized by significant latency, often requiring up to three working days for manual review. This bottleneck not only escalates operational costs and resource allocation but also negatively impacts customer satisfaction. Furthermore, while automated solutions exist, they frequently suffer from a lack of interpretability (the 'black box' problem), failing to provide the transparent reasoning necessary for regulatory compliance and user trust Manual loan reviews cause costly 3-day delays, significantly lowering customer satisfaction. Meanwhile, existing automated solutions lack the explainability required for regulatory compliance and user trust

ii. Explanation of the Solution

AmBank Explainable AI Decision Engine is a distributed intelligence system designed to modernize the credit assessment process. The solution works through an automated Folder-Watcher Architecture that bridges the gap between customer submission and data-driven decision-making.

How it Works:

The workflow begins at the User Portal, where applicants upload their loan documentation in PDF format. Once a file is uploaded, the frontend saves it to a designated "Incoming" directory. A background Processing Engine (the "Worker") monitors this directory in real-time. Upon detecting a new file, the engine triggers a multi-stage pipeline:

  1. Extraction & Parsing: The system utilizes custom parsing utilities to convert unstructured PDF text into a structured JSON schema, ensuring high data integrity.
  2. Machine Learning Risk Scoring: The structured data is fed into an ML model that assesses creditworthiness. Rather than just providing a score, the system calculates feature importance to identify which variables (e.g., debt-to-income ratio, employment history) most influenced the outcome.
  3. LLM Reasoning (GPT-4o): The quantitative data from the ML model is passed to GPT-4o. The AI acts as a digital "Bank Officer," synthesizing the technical score into a natural language justification. It creates a professional, human-readable summary explaining the approval or rejection.
  4. Real-time Synchronization: The final decision, structured data, and AI-generated explanation are pushed to Firebase Firestore.

Key Features:

  • Transparent Decisioning: Every loan decision is accompanied by a "Reasoning" report, eliminating the mystery of AI scoring.
  • Decoupled Dashboard: Bank officers use a dedicated Internal Dashboard to review applications, view credit metrics, and finalize the approval/rejection process.
  • Automated Archive: Processed files are moved to an archive to maintain a clean workspace and an audit trail.

iii. Tech Stack Used

  • Languages: Python 3.10+
  • Frontend & Dashboard: Streamlit
  • Backend Framework: Python (Threading & Watchdog logic)
  • Database: Firebase Firestore (Real-time NoSQL)
  • AI/ML: OpenAI GPT-4o (Reasoning), Pandas/NumPy (Data Processing)
  • APIs: OpenAI API, Firebase Admin SDK
  • Tools: Ngrok (Optional for tunneling), PDFPlumber (Parsing), Pillow (Image/Logo processing)

iv. Demo Video

🔗 Link to Demo Video

v. Presentation Deck

🔗 Link to Presentation Deck


🏗 Running the Project

  1. Terminal 1: The Underwriter Engine
python main.py
  1. Terminal 2: The User Portal
streamlit run user_upload_page.py
  1. Terminal 3: The Internal Dashboard
streamlit run dashboard.py

📂 Project Structure

├── main.py                    # Entry point: Runs the folder-watching loop
├── user_upload_page.py        # Customer portal for PDF uploads
├── dashboard.py               # Bank officer portal for reviews
├── decision_maker.py          # AI logic (GPT-4o) for decision reasoning
├── application.py             # Pipeline orchestration logic
├── config/
│   ├── config.py              # Configuration manager
│   ├── config.json            # API keys and directory paths
│   └── serviceAccountKey.json # Firebase credentials
├── utils/
│   ├── create_pdf.py          # Mock PDF generator for testing
│   └── pdf_parser.py          # PDF to JSON extraction logic
├── storage/
│   └── applications/
│       ├── incoming/          # Landing zone for new uploads
│       └── processed/         # Archive for analyzed files
└── assets/                    # Branding (AmBank & Team Thorn logos)

👥 Team Thorn

  • Alexandr Fomin
  • May Elisa Biusing
  • Nidal Bencheikh Lehocine

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages