Back to Platform Overview
RegGuard v2pgvector 768-dimLLaMA-3.1 RAG

Regulatory RAG & Guardrails

Audits and validates financial transactions against strict regulatory directives. Utilizes pgvector similarity search over curated RBI, FEMA, and PMLA policies with Groq LLaMA-3.1 generating exact compliant verdicts and highlighted references.

273Regulatory chunks indexed across RBI, FEMA, PMLA, and wallet policy documents
0.89Reference confidence threshold before a verdict can auto-route downstream
7dPMLA suspicious transaction reporting window encoded into audit guidance
1hRedis response cache TTL for repeat policy questions and audit narratives

A policy engine with receipts

RegGuard is designed to keep compliance decisions inspectable: every verdict carries source chunks, confidence, and a clean escalation path for uncertain cases.

Curated Policy Corpus

Source text is split into traceable chunks with circular IDs, dates, and jurisdiction tags so answers cite the policy surface that produced them.

Verdict Guardrails

The model is constrained to COMPLIANT, NON-COMPLIANT, or NEEDS AUDIT, reducing vague language and making queue routing deterministic.

Citation Reranking

Generated responses are checked against retrieved source chunks so unsupported claims lose confidence before the result reaches an analyst.

Knowledge Base Registry

RBI Master Directions124 chunks
VectorizedUpdated: 2026-04-12
FEMA Notification 20(R)87 chunks
VectorizedUpdated: 2026-03-01
PMLA Rules & Guidelines62 chunks
VectorizedUpdated: 2026-05-18

Query Configuration

Similarity Threshold0.75
Embedding Modelnomic-embed-text-v1.5
Synthesis LLMllama-3.1-70b-groq

Manual Override Warning: Compliance verdicts generated by RegGuard RAG are advisory. Large transactions flagged as Non-Compliant are piped into the Kafka artha.compliance.reject topic to be processed by a compliance specialist within the JPMC GCC routing queue.

How a compliance question becomes an auditable verdict

Source-bound answers
01

Intake

Transaction narrative, user segment, geography, amount, and channel metadata enter the compliance request.

02

Retrieve

pgvector similarity selects the highest-confidence policy passages for the exact regulatory context.

03

Synthesize

Groq-backed generation drafts a concise verdict bound to those passages and the selected threshold.

04

Escalate

Kafka topics route rejected or uncertain cases into manual compliance review with correlation metadata.

Vector Search & LLM Prompt Template

# pgvector cosine similarity search over circulars async def retrieve_docs(query_emb: list[float], limit: int = 2): async with db.pool.acquire() as conn: query = "SELECT text, source_id, 1 - (embedding <=> $1) as score FROM regulatory_chunks WHERE 1 - (embedding <=> $1) >= $2 ORDER BY embedding <=> $1 LIMIT $3" return await conn.fetch(query, query_emb, threshold, limit) # System prompt for compliance verdict synthesis const SYSTEM_PROMPT = `You are a strict financial auditor. Validate the transaction request using only the provided reference circulars. Output either COMPLIANT, NON-COMPLIANT, or NEEDS AUDIT, and justify the verdict based solely on the sources.`