{"slug": "i-built-an-ai-that-turns-2-hours-of-compliance-paperwork-into-3-minutes-full", "title": "I Built an AI That Turns 2 Hours of Compliance Paperwork Into 3 Minutes — Full Architecture Teardown", "summary": "A developer built an open-source AI tool that reduces compliance paperwork for financial advisors from 2 hours to 3 minutes. The system uses a four-stage pipeline with local Whisper transcription, Claude via OpenRouter for structured extraction, a rule-based compliance engine, and a CRM formatter. It focuses on detecting risk signals and suitability mismatches rather than just transcribing meetings.", "body_md": "Financial advisors have a dirty secret: they spend almost half their working hours not advising anyone.\n\nThe culprit? Compliance documentation. After every client meeting, advisors must document what was discussed, what was recommended, whether those recommendations were suitable, and whether they followed FINRA and SEC rules — all in a format their CRM can ingest.\n\nA 45-minute meeting routinely generates 2 hours of paperwork.\n\nI built an open-source tool that does it in about 3 minutes. Here's exactly how — every architectural decision, every trade-off, and every line of code that matters.\n\nWhen I started talking to advisory firms, I expected \"meetings take too long\" or \"we need better CRM software.\" Instead, every compliance officer said the same thing:\n\n**\"We're not worried about the notes. We're worried about what's NOT in the notes.\"**\n\nThe real pain isn't documentation speed — it's the compliance gap. If a client says \"I can't afford to lose this money\" and the advisor recommends an aggressive growth fund, that's a FINRA 2111 suitability violation. But if the note-taker (usually the advisor, writing from memory hours later) forgets that quote? No record of the red flag.\n\nThis changed my entire system design. It's not a transcription tool with formatting. It's a compliance engine that listens for mismatches.\n\nFour-stage pipeline:\n\n```\nAudio → Transcription → Structured Extraction → Compliance Check → CRM Note\n         (Whisper)          (Claude via            (Rule engine)    (Formatter)\n                             OpenRouter)\n```\n\n**Stack:** Python/FastAPI + React frontend + Whisper (local) + Claude via OpenRouter\n\nTwo key design choices:\n\n**Whisper runs locally.** Advisory meetings contain PII and legally privileged information. Sending audio to third-party APIs isn't optional for most firms — it's a regulatory non-starter.\n\n**Compliance engine is NOT an LLM.** You can't have a probabilistic system making deterministic compliance judgments. The compliance check uses hardcoded rules against structured data. The LLM's job ends at extraction.\n\nThe LLM receives raw transcript text and returns structured JSON. The critical field is `risk_signals`\n\n:\n\n```\n\"risk_signals\": [\n    {\n      \"signal\": \"What was said\",\n      \"severity\": \"low|medium|high\",\n      \"context\": \"Surrounding context\"\n    }\n  ]\n```\n\nMost meeting note-takers extract topics and action items. This system specifically hunts for phrases indicating compliance risk — \"I can't afford to lose this money\" (risk tolerance), \"my wife doesn't know about this account\" (documentation issue), \"just put it wherever you think is best\" (discretionary authority concern).\n\nTemperature is set to 0.1. When extracting compliance-relevant data, you don't want creative interpretation.\n\nThe simplest code in the project. That's the point.\n\nThe suitability check cross-references risk signals against product recommendations:\n\n```\nrisk_averse_keywords = [\"can't afford to lose\", \"conservative\", \"safe\",\n                        \"no risk\", \"preserve capital\", \"nervous\"]\naggressive_products = [\"growth fund\", \"equity\", \"crypto\", \"leveraged\",\n                       \"options\", \"futures\", \"speculative\"]\n\nif has_risk_averse and has_aggressive:\n    status = \"RED\"\n    flags.append(\"SUITABILITY CONCERN: Risk-averse language detected \"\n                 \"alongside aggressive product recommendations\")\n```\n\nIs this keyword matching? Yes. Is it sophisticated? Not really. Is it exactly what compliance officers need? Absolutely.\n\nOutput is a traffic-light system: GREEN / YELLOW / RED. This maps directly to how compliance departments already think.\n\nThe Reg BI check catches the most common examination finding:\n\n```\nhas_alternatives = len(products) > len(recommended)\nif not has_alternatives:\n    status = \"YELLOW\"\n    flags.append(\"Product recommended without documented alternatives\")\n```\n\nNot glamorous. Prevents six-figure fines.\n\nThe code isn't the competitive advantage. Any competent developer can chain Whisper → LLM → rule engine.\n\nThe value is in:\n\nThat's what I do. I automate chaos — messy, manual, regulated workflows that require domain expertise on top of engineering skill.\n\n**Full codebase:** [github.com/archit-akg13/advisor-meeting-notetaker](https://github.com/archit-akg13/advisor-meeting-notetaker)\n\nI'm Archit Mittal. I build AI automation for financial services. If your team spends more time on paperwork than on the work itself, I can fix that → [architmittal.com](https://architmittal.com)\n\n*Follow me on Twitter @automate_archit for daily AI automation tips*", "url": "https://wpnews.pro/news/i-built-an-ai-that-turns-2-hours-of-compliance-paperwork-into-3-minutes-full", "canonical_source": "https://dev.to/automate-archit/i-built-an-ai-that-turns-2-hours-of-compliance-paperwork-into-3-minutes-full-architecture-teardown-20l5", "published_at": "2026-06-20 03:03:34+00:00", "updated_at": "2026-06-20 04:06:53.511394+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "natural-language-processing", "developer-tools", "ai-products"], "entities": ["Whisper", "Claude", "OpenRouter", "FINRA", "SEC", "Python", "FastAPI", "React"], "alternates": {"html": "https://wpnews.pro/news/i-built-an-ai-that-turns-2-hours-of-compliance-paperwork-into-3-minutes-full", "markdown": "https://wpnews.pro/news/i-built-an-ai-that-turns-2-hours-of-compliance-paperwork-into-3-minutes-full.md", "text": "https://wpnews.pro/news/i-built-an-ai-that-turns-2-hours-of-compliance-paperwork-into-3-minutes-full.txt", "jsonld": "https://wpnews.pro/news/i-built-an-ai-that-turns-2-hours-of-compliance-paperwork-into-3-minutes-full.jsonld"}}