Client: Regulated FinTech firm (India, RBI-regulated) · 14 product lines
Engagement: 6-week AI automation deployment · February–March 2026
The Challenge
The compliance team produced 12+ regulatory reports monthly — drawing from five core systems and consuming 200+ analyst hours. Reports required manual cross-referencing, formatting, and validation. The team had no path to scale without doubling headcount.
Approach (3-Layer Agent Architecture)
Week 1 · Process mapping + data inventory
Inventoried all 12 report types. Mapped data lineage across the core banking system, treasury platform, and three regulatory APIs. Defined input/output schemas precisely.
Weeks 2–3 · Agent design
Layer 1 (Deterministic Boundary): structured extraction agents using LangChain + Claude 3.7 Sonnet, bounded to schema-validated outputs. Layer 2 (Validation Gate): schema + cross-reference + range checks. Layer 3 (Audit Trail): every decision logged to S3 Object Lock.
Weeks 4–5 · Integration + testing
Connected to 5 source systems via secured APIs. Validated against 6 months of historical reports. Achieved 99.8% accuracy; falls back to human review on validation failure.
Week 6 · Production deployment
Deployed with full audit trails, anomaly detection, and human-in-the-loop fallbacks. PagerDuty alerting on validation gate failures.
Sample: Validation Gate Pattern
from pydantic import BaseModel, Field, validator
from typing import List
class ComplianceReport(BaseModel):
"""Output schema enforced before any LLM result leaves the system."""
report_id: str = Field(..., regex=r'^RPT-d{8}-d{4}$')
period_start: str # ISO date
period_end: str
total_transactions: int = Field(..., ge=0)
flagged_transactions: List[dict]
reconciliation_total: float
@validator('reconciliation_total')
def must_match_source(cls, v, values, **kwargs):
# Cross-reference: must equal sum from core banking
source_total = fetch_core_banking_total(
values['period_start'], values['period_end']
)
if abs(v - source_total) > 0.01:
raise ValueError(
f'Reconciliation mismatch: agent={v}, source={source_total}'
)
return v
def run_agent_with_gates(payload):
"""Three-layer agent: bounded LLM → validate → audit."""
raw = bounded_llm_call(payload) # Layer 1
try:
result = ComplianceReport.parse_obj(raw) # Layer 2
audit_log(payload, raw, result, status='PASS')
return result
except ValidationError as e:
audit_log(payload, raw, None, status='FAIL', error=str(e))
escalate_to_human(payload, raw, e)
return None
Results
| Metric | Before | After |
|---|---|---|
| Analyst hours / month | 200+ | ~40 (review only) |
| Report accuracy | 96.2% (human) | 99.8% |
| Audit trail | Manual notes | Cryptographically-hashed, immutable |
| Q1 2026 audit findings | — | Zero |
“What used to take our team 200+ hours per month now runs automatically overnight. The audit trail Ohveda built was praised by our regulator as best-in-class.” — Priya Nair, VP Operations