Enterprise ERP AI Assistant & Grounded RAG for 10,000+ Daily Users
Designing and shipping a multi-tenant AI copilot embedded inside core financial and operational ERP workflows — with strict permission-trimmed retrieval, source citations, and deterministic tool execution.
Engineering Context & Problem Statement
Finance, accounting, and operations teams inside a large-scale enterprise ERP platform needed natural-language assistance across complex ledgers, tax rules, product documentation, and multi-step operational workflows — without ever risking hallucinated figures or unauthorized cross-tenant exposure.
Naive vector-only RAG failed on exact invoice codes, statutory clauses, SKU identifiers, and ERP screen terminology, while unconstrained LLM prompts struggled with strict tenant isolation and deterministic API actions.
System Architecture & Technical Decisions
Hybrid Lexical + Dense Retrieval with Reranking
Combined BM25 exact-term matching (for account codes, tax IDs, and ERP field names) with dense semantic embeddings and Reciprocal Rank Fusion, followed by cross-encoder reranking over top candidates.
Pre-Retrieval Tenant & Role ACL Enforcement
Security trimming was enforced inside the query filter before chunks ever reached the LLM context window, guaranteeing that the model could only reason over records the authenticated user already had ERP permission to view.
Deterministic .NET Tool Calling & Citation Grounding
Built typed C# / .NET orchestration services with JSON-schema tool contracts, confidence thresholds, and mandatory inline citations — abstaining cleanly when source evidence was insufficient.
Embedded React Copilot UX
Delivered context-aware streaming React panels inside existing ERP screens so users could inspect cited source documents and confirm state-changing actions with human-in-the-loop approval.
Governance, Safety & Operational Reliability
- Strict tenant and RBAC isolation enforced at index and query level prior to prompt construction.
- Prompt-injection and PII scrubbing guardrails with structured audit logging per conversation turn.
- Automated golden-dataset regression suite tracking faithfulness, citation recall, and p95 latency.
- Graceful provider failover, token budget caps, and circuit breakers protecting core ERP SLAs.
Measured Production Impact
- Scaled reliably to 10,000+ daily active enterprise users across finance and operational modules.
- Substantially reduced repetitive tier-1 support tickets and time spent searching ERP documentation.
- Maintained full auditability and zero cross-tenant authorization incidents in production.