Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 3 min read

# πŸ›‘οΈ Building an Enterprise AML/CFT Risk Intelligence Platform with Gemma 4

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine What I Built I built Risk-Gemma4-Agent, an enterprise-grade Anti-Money Laundering (AML) and Counter-Terrorist F

# πŸ›‘οΈ Building an Enterprise AML/CFT Risk Intelligence Platform with Gemma 4

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

I built Risk-Gemma4-Agent, an enterprise-grade Anti-Money Laundering (AML) and Counter-Terrorist Financing (CFT) risk intelligence dashboard panel. In the spirit of the Ghost in the Machine theme, this system acts as a high-vigilance digital watchdog that uncovers "invisible footprints" and hidden financial patternsβ€”such as micro-smurfing networks and automated velocity layeringβ€”that would otherwise haunt institutional ledger networks undetected.

Demo

The application features a modular, multi-tab Streamlit architecture with an active, real-time workspace. It includes:

  • Live analytical data dashboards with interactive data visualizations.
  • A Conversational Compliance Desk for deep-dive investigation.
  • Bidirectional containment switches allowing immediate system-level account locks and overrides.

Code

You can view the full decoupled system, codebase architecture maps, and Docker setup instructions here:

GitHub logo SRINIVASTA / risk-gemma4-agent

Enterprise AML/CFT risk assessment intelligence platform powered by Gemma 4 (gemma-4-26b-a4b-it) and LangChain Vector RAG, adhering strictly to RBI Master KYC Directions. Built on a modular multi-tab Streamlit architecture featuring granular zero-trust Role-Based Access Control (RBAC).

πŸ›‘οΈ Risk-Gemma4-Agent Panel

πŸ“Š Application Workspace Live Preview

Risk-Gemma4-Agent Dashboard Panel

An enterprise-grade Anti-Money Laundering (AML) and Counter-Terrorist Financing (CFT) risk intelligence dashboard panel. This system couples high-performance automated data processing with deep semantic compliance reasoning via the Gemma 4 LLM architecture (gemma-4-26b-a4b-it) and LangChain Vector RAG stores, adhering strictly to the Reserve Bank of India (RBI) Master KYC Directions.

πŸ—οΈ System Architecture & Session Gateway Lifecycle

The platform is engineered using a modular, decoupled architecture separating stateless analytical data compute layers (gemma4_engine.py) from dynamic, role-restricted presentation layers (app.py and tabs/). The global session management authentication loop is handled persistently through the left sidebar console.

graph TD
    %% Global Session Management Authentication Layer
    subgraph Sidebar Panel Session Gateway
        Auth[πŸ”‘ sidebar: Enter Gemini API Key] -->|Validates API Key| IAM_Gate{πŸ” sidebar: Session Active?}
        IAM_Gate -->|iam_logged_in == False| Login[πŸ”“ Choose Identity & Click Login]
        Login -->|Mounts session_state active_iam_user| Workspace_Unlock[🟒
…

How I Built It

The platform separates stateless backend intelligence from dynamic presentation layers:

  • Cognitive Core Engine: Built around Google's open-weight Gemma 4 (gemma-4-26b-a4b-it) model architecture.
  • Compliance Guardrails & Context: Uses LangChain and FAISS Vector RAG stores to inject chunks of the official Reserve Bank of India (RBI) Master KYC Directions directly into the inference pipeline.
  • Deterministic Pipeline Rules: Employs parallelized Pandas ledger routines to dynamically monitor 48-hour cross-border rolling windows and catch low-value micro-anomalies down to β‚Ή1,000.
  • Access Gateway Control: Locked down securely using tight Role-Based Access Control (RBAC) maps to restrict view capabilities based on clearance tiers.

Why Does Open Innovation Matter?

In highly regulated banking environments, financial entities are strictly prohibited from streaming sensitive customer transaction logs over public, third-party cloud APIs. Open innovation and open-weight architectures change the game entirely:

  1. Data Sovereignty: By leveraging Gemma 4 (26B), financial institutions can deploy this deep reasoning engine completely on-premise or within a secure private cloud, ensuring 100% data residency and compliance with privacy mandates like the DPDP Act.
  2. ** Hallucination Control:** Feeding targeted regulatory snippets via a local FAISS index keeps the open-weight model highly disciplined, ensuring responses are legally grounded without proprietary vendor gatekeeping.
  3. Operational Fitness: Semantic precision and deep trace analysis under legal frameworks completely outweigh sub-second API speeds, making a dedicated local open deployment ideal.

Prize Categories

  • Best Open-Source AI Project Track
  • Best Use of Gemma Track
πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.