Ramp builds in-house RAG model to standardize industry classification on NAICS codes
Ramp's industry classification relied on a homegrown system stitched together from third-party data, Sales-entered data, and customer self-reporting, producing multiple non-auditable sources of truth and overly broad labels that made compliance, credit risk profiling, and sales targeting unreliable. Different teams used incompatible taxonomies, requiring many-to-many mappings between over 100 internal levels and thousands of NAICS or SIC codes.
Migrating to NAICS codes via an in-house RAG model improved classification accuracy, simplified cross-team workflows, and made the system fully auditable and tunable.
Hyperparameter optimization yielded performance boosts of up to 60% in acc@k and 5%-15% improvement in fuzzy accuracy.
Frequently asked questions
What did this team achieve with this AI workflow?
Migrating to NAICS codes via an in-house RAG model improved classification accuracy, simplified cross-team workflows, and made the system fully auditable and tunable.
What tools did this team use?
RAG, LLM, Clickhouse, Kafka.
What results were reported?
Acc@k performance boost: up to 60%; Fuzzy accuracy improvement: 5%-15%; Data quality: significantly upgrade our data quality; Workflow complexity: simplified workflows (source-reported, not independently verified).
How is this compliance monitoring AI workflow structured?
New business enters pipeline → Similarity search retrieves NAICS candidates → First LLM prompt narrows candidates → Second LLM prompt selects final code → Guardrail validation of output codes → Kafka logs intermediate results → NAICS code classification output.