Natural Language Financial Verification System
A production AI system that replaced hours of manual financial verification with natural language Slack commands. Accountants type plain English — the system classifies intent, queries MongoDB, cross-references government financial reports, and returns a formatted audit result, all within seconds.
The system handles two critical monthly workflows: apportionment verification (comparing tax recap values against General Ledger transactions across all 18 counties) and end-of-month balance verification (navigating county web portals via browser automation and running balance checks).
Architecture
- • AI Layer: Claude Haiku for intent classification and routing — natural language command → structured action with sub-100ms decisions
- • Vector Search: Qdrant vector database (2,500+ vectors) — legacy system documentation, Slack history, reference documents — enables contextual knowledge retrieval
- • Orchestration: n8n workflow engine — Slack event ingestion, SSH routing, response formatting, OpenRouter fallback when Claude quota is exhausted
- • Apportionment Check: Node.js + MongoDB — queries apportionmentreports and gldailytransactions collections, compares totals by fund category, returns match/mismatch with details
- • EOM Check: Playwright browser automation — authenticates to county web portals, triggers balance verification, parses results, reports to Slack thread
- • Infrastructure: Runs on a self-hosted Linux server via systemd, SSH-callable from n8n, OpenRouter fallback for model redundancy
What I Built
- • Complete Sentinel AI router — intent classification, county parsing, multi-county batch processing ("apportionment all"), progress reporting per county
- • Apportionment verification engine — queries two MongoDB collections, groups by fund category (General, Motor Vehicle, etc.), returns match status with dollar-level diffs
- • End-of-month Playwright automation — session auth, county-specific navigation, automated balance check trigger, result extraction and formatting
- • Qdrant knowledge base — ingested 10 legacy system reference documents, 2,000+ Slack messages, government financial procedure docs for context-aware responses
- • n8n workflow with SplitInBatches — sequential per-county processing, acknowledgment messages, thread-based result delivery, OpenRouter fallback chain
Impact
<5s
Per-County Verification