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).
The system implements a sophisticated multi-stage RAG workflow:
- Query Transformation: Uses a "Thinker" LLM to reformulate conversational context into standalone, optimized search queries.
- Intelligent Routing: A custom routing layer that automatically distinguishes between general user greetings and technical financial queries.
- Vector Retrieval: High-dimensional semantic search via ChromaDB with a minimum similarity score threshold to ensure high-precision grounding.
- Response Guardrails: System-level instructions enforce strict source citation and prevent the model from speculating beyond the provided context.
- 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.
| 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) |
- Docker & Docker Compose installed.
- OpenAI API Key.
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"The system uses a multi-stage build to compile the Java source and orchestrate the containers in a single command:
docker-compose up --build-
Interactive Chat UI:
http://localhost:8888 -
System Dashboard:
http://localhost:8888/dashboard
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.
Skhumbuzo Bembe Mathematics & Computer Science Graduate Specializing in AI/ML Engineering & Data Pipelines