Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Financial Risk Intelligence Engine (Advanced Java RAG)

Java 25 Spring Boot Docker License: MIT

An enterprise-grade Retrieval-Augmented Generation (RAG) pipeline designed to analyze complex banking disclosures and Expected Credit Loss (ECL) methodologies. This system solves the hallucination problem in financial AI by grounding every response in verified institutional documents (IFRS 9 / IASB).

image image

🏗️ Technical Architecture

The system implements a sophisticated multi-stage RAG workflow:

  1. Query Transformation: Uses a "Thinker" LLM to reformulate conversational context into standalone, optimized search queries.
  2. Intelligent Routing: A custom routing layer that automatically distinguishes between general user greetings and technical financial queries.
  3. Vector Retrieval: High-dimensional semantic search via ChromaDB with a minimum similarity score threshold to ensure high-precision grounding.
  4. Response Guardrails: System-level instructions enforce strict source citation and prevent the model from speculating beyond the provided context.

🚀 Key Features

  • Dynamic Ingestion Pipeline: A file-system watcher that automatically detects, parses (Apache Tika), and vectorizes PDF methodology documents in real-time.
  • Source Traceability: Every answer includes a "Sources Used" metadata footer, providing a direct audit trail to the specific banking document used.
  • Industrial Infrastructure: Fully containerized using a Multi-Stage Docker Build with Amazon Corretto 25 and persistent volume mapping.
  • Reactive UI: Built with Javelit (Jt), providing a stateful Java-based frontend with real-time system logs and a document registry dashboard.

🛠️ Tech Stack

Component Technology
Language Java 25 (Preview Features)
Backend Framework Spring Boot 4.0.2
AI Orchestration LangChain4j
Vector Database ChromaDB
Frontend Javelit (Stateful Java UI)
Containerization Docker & Docker Compose
LLM Provider OpenAI (GPT-4o-mini)

📦 Installation & Deployment

Prerequisites

  • Docker & Docker Compose installed.
  • OpenAI API Key.

1. Configure Environment

Set your OpenAI key in your terminal session or a local .env file (ensure it is added to .gitignore):

$env:OPEN_API_KEY="your-key-here"

2. Launch with Docker Compose

The system uses a multi-stage build to compile the Java source and orchestrate the containers in a single command:

docker-compose up --build

🖥️ Access the System

  • Interactive Chat UI:http://localhost:8888

  • System Dashboard: http://localhost:8888/dashboard

📊 Business Context: Why ECL?

Under IFRS 9, financial institutions moved from an "Incurred Loss" to an "Expected Credit Loss" (ECL) model. This shift requires massive technical disclosures regarding forward-looking macroeconomic factors. This tool enables risk analysts and auditors to query thousands of pages of methodology instantly, ensuring compliance and rapid data retrieval.

👨‍💻 Author

Skhumbuzo Bembe Mathematics & Computer Science Graduate Specializing in AI/ML Engineering & Data Pipelines

About

Enterprise-grade RAG pipeline using Java 25 and Spring Boot to analyse banking methodology disclosures (IFRS 9), implementing automated metadata enrichment and high-precision retrieval.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages