如何以 Gemma 4 構建企業級 AML/CFT 風險情報平台
# 🛡️ Building an Enterprise AML/CFT Risk Intelligence Platform with Gemma 4
Risk-Gemma4-Agent 是以 Gemma 4(gemma-4-26b-a4b-it)構建的企業級 AML/CFT 風險情報平台,設有互動數據儀錶板、合規調查工作區及帳戶鎖定功能。
Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼
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:
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
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:
- 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.
- ** 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.
- 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
來源:DEV Community · dev.to
