Finance ops · Production

MercadoLibre's Financial Data Enrichment: from handcrafted regex to LLMs and custom semantic embeddings in LATAM

The problem

MELI's transaction categorization relied on handcrafted regex rules and manually-reported MCC codes that produced frequent inconsistencies, required constant country-specific updates, and could not scale to the daily volume of new financial data across LATAM's diverse languages.

First attempt

MELI's first deployed categorization model, built entirely on regex and MCC rules, was limited to debit transactions in Portuguese and proved impossible to maintain as data volume grew.

Workflow diagram · grounded in source
1
Raw transaction data arrives
trigger
“Financial Data Enrichment — the process of turning raw transaction data into structured insights”
2
LLM categorizes transaction
ai_action
“GPT-3.5 Turbo arrives — cost-efficient and accessible through a public API. Suddenly, what once felt like an educated guess became a model that could deliver over 80% accuracy with the right setup, far surpassing our regex-based approach…”
3
Human-in-the-loop validation
human_review
“designing a human-in-the-loop labeling workflow to scale without sacrificing control or quality”
4
Continuous validation feedback
feedback_loop
“Every GenAI-generated model and decision at MELI goes through a continuous validation process, combining LLM power with expert human feedback”
5
Semantic embeddings classify at scale
ai_action
“we developed our own embeddings, fine-tuning BERT-style (Bidirectional Encoder Representations from Transformers) models on regional financial text”
6
Structured categories output
output
“turning raw transaction data into structured insights”
Reported outcome

Adopting GPT-3.5 Turbo lifted categorization accuracy from around 60% to over 80%, cut operational costs by 75%, and scaled volume from tens of millions per quarter to tens of millions per week.
Custom BERT-style embeddings then pushed accuracy to 90% with an additional cost reduction of more than 30%, a 10x increase in scalability, and near real-time processing.

Reported metrics
categorization accuracy — LLM phaseover 80%
Categorization accuracy — regex baselinearound 60%
operational cost reduction — LLM phase75%
Transaction volume scalefrom tens of millions per quarter to tens of millions per week
Show all 9 reported metrics
categorization accuracy — LLM phaseover 80%
categorization accuracy — regex baselinearound 60%
operational cost reduction — LLM phase75%
transaction volume scalefrom tens of millions per quarter to tens of millions per week
categorization accuracy — embeddings phase90%
operational cost reduction — embeddings phasemore than 30%
scalability increase10x increase in scalability
accuracy improvement — total points30 points
GPT-4o-mini cost vs GPT-3.5 Turbo60% cheaper
Reported stack
GPT-3.5 TurboGPT-4o-miniGeminiClaudeBERT-stylePythonFuryDataMesh
Source
https://medium.com/mercadolibre-tech/la-nueva-babel-financiera-ense%C3%B1ar-a-la-ia-a-hablar-dinero-en-latinoam%C3%A9rica-4605235e3aac
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

Adopting GPT-3.5 Turbo lifted categorization accuracy from around 60% to over 80%, cut operational costs by 75%, and scaled volume from tens of millions per quarter to tens of millions per week.

What tools did this team use?

GPT-3.5 Turbo, GPT-4o-mini, Gemini, Claude, BERT-style, Python, Fury, DataMesh.

What results were reported?

categorization accuracy — LLM phase: over 80%; Categorization accuracy — regex baseline: around 60%; operational cost reduction — LLM phase: 75%; Transaction volume scale: from tens of millions per quarter to tens of millions per week (source-reported, not independently verified).

What failed first in this deployment?

MELI's first deployed categorization model, built entirely on regex and MCC rules, was limited to debit transactions in Portuguese and proved impossible to maintain as data volume grew.

How is this finance ops AI workflow structured?

Raw transaction data arrives → LLM categorizes transaction → Human-in-the-loop validation → Continuous validation feedback → Semantic embeddings classify at scale → Structured categories output.