AI-Driven Collateral Allocation Optimization in Fintech

mercado_libre · Finance · 2025 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.2 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Collateral allocation optimization

Mercado Pago needed to allocate millions of loans across billions in credit lines under complex contractual, market, and regulatory constraints.

Constraints:

Architecture

Enigma is intentionally not an LLM agent. Mercado Pago’s production system uses mathematical optimization: loan data and configuration settings from Google Cloud Platform flow into an Enigma optimization model that combines linear programming, Google OR-Tools, and an in-house grouping heuristic. The model outputs refined loan selections, reports, and visualizations for the Collateral Management team, while AI agents are only described as future exploration for analytics, strategic-constraint proposals, and contract-to-constraint translation.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  loan-data-and-configuration-inputs["loan data and configuration inputs"]
  enigma-optimization-model["Enigma optimization model"]
  google-or-tools["Google OR-Tools"]
  grouping-heuristic["grouping heuristic"]
  reports-and-visualization["reports and visualization"]
  collateral-management-team["Collateral Management team"]
  loan-data-and-configuration-inputs --> enigma-optimization-model
  enigma-optimization-model --> google-or-tools
  enigma-optimization-model --> grouping-heuristic
  enigma-optimization-model --> reports-and-visualization
  reports-and-visualization --> collateral-management-team
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
loan data and configuration inputs Google Cloud Platform-sourced loan portfolio data and credit-line configuration settings. Enigma optimization model
Enigma optimization model Linear-programming model that selects loans for credit lines under contractual and strategic constraints. loan data and configuration inputs, Google OR-Tools, grouping heuristic, reports and visualization
Google OR-Tools Optimization library used to search possible allocation solutions through commercial/open-source solvers. Enigma optimization model
grouping heuristic In-house clustering technique that combines similar loans to reduce execution time while preserving accuracy. Enigma optimization model
reports and visualization Auditable output layer showing allocations, metrics, and decision support to the Collateral Management team. Enigma optimization model, Collateral Management team
Collateral Management team Business users who configure constraints, evaluate reports, and manage collateral allocation decisions. reports and visualization

Data flow

Loan data and credit-line configuration are gathered from Google Cloud Platform. Enigma feeds those inputs to an optimization model using OR-Tools and a grouping heuristic, evaluates loans against risk, amount, contractual, and strategic constraints, then outputs selected loans plus reporting/visualization for the Collateral Management team.

4 supporting quotes
“the process begins with gathering essential inputs, primarily loan data and configuration settings, both sourced from Google Cloud Platform.”article, stated
“Once the inputs are collected, they flow into the heart of the system: the Optimization Model.”article, stated
“This model employs advanced optimization techniques to analyze the loans based on various criteria and constraints.”article, stated
“As the optimization process completes, Enigma generates outputs that include a refined selection of loans. These results facilitate comprehensive reporting and data visualization.”article, stated

Why this architecture

The problem is a constrained optimization problem over millions of loans and billions of dollars of credit lines, so linear programming and OR-Tools fit better than an agentic LLM. The grouping heuristic is the critical scalability adaptation: raw exact optimization over individual loans became computationally explosive, while clustering similar loans preserved execution time and usability.

4 supporting quotes
“To achieve optimal allocation, we employed linear programming, a mathematical method used to optimize a function subject to constraints.”article, stated
“To facilitate this process, we used Google OR-Tools, an open-source optimization library developed by Google AI.”article, stated
“One of the primary challenges we encountered was the vast size of Mercado Pago’s loan portfolio, which includes millions of individual loans.”article, stated
“To address this issue, we developed an in-house grouping heuristic that enables us to strategically combine loans with similar characteristics into clusters.”article, stated

Models used: Google OR-Tools · linear programming · traditional optimization, not LLM

Scale

Alternatives considered (roads not taken)

Linear optimization over every individual loan without grouping

Rejected because: The portfolio size caused exponential execution-time growth, so the team clustered similar loans.

“This sheer volume introduced significant complexity in the selection process, causing an exponential increase in execution time as the portfolio size grew”article, stated

Current production AI-agent allocation manager

Rejected because: Agents are framed as future exploration, not the current production Enigma system.

“we’re exploring the potential of AI agents to take collateral allocation management at Mercado Pago to the next level.”article, implied

Patterns

structured-output-contract (optimization)

Contractual and strategic requirements are translated into explicit linear constraints and reports.

“g the allocated amount and minimizing funding cost), along with various constraints (including contractual and strategic conditions), using linear expressions.”article, stated

cost-aware-routing (operations)

The optimizer chooses allocations to maximize amount and minimize funding cost.

“This approach is particularly well-suited to our problem because it allows us to model an objective function to optimize (such as maximizing the allocated amount and minimizing funding cost), along with various constraints (including contractual and strategic conditions), using linear expressions.”article, stated

Tradeoffs

Optimization exactness versus runtime.

Chose in-house grouping heuristic over evaluating every individual loan directly.

Rationale: Grouping reduces problem size enough for daily operation while preserving overall allocation quality.

“To address this issue, we developed an in-house grouping heuristic that enables us to strategically combine loans with similar characteristics into clusters.”article, stated

Gotchas (what bit them)

Raw linear optimization over millions of loans did not scale.

Root cause: The NP-complete selection problem grew exponentially with portfolio size.

Resolution: Group similar loans into clusters before optimization to preserve runtime while maintaining performance.

“This sheer volume introduced significant complexity in the selection process, causing an exponential increase in execution time as the portfolio size grew (as illustrated in Image 1).”article, stated

Evaluation

The article describes scalability, robustness, transparency, and operational fit rather than LLM metrics.

Metrics: millions of loans · few-hour daily window · auditable reports

“One of the primary challenges we encountered was the vast size of Mercado Pago’s loan portfolio, which includes millions of individual loans.”article, stated

Outcomes

Primarily classical optimization, not an LLM/agent implementation; marked non-agentic.

“It's important to note from the outset that this case study is primarily about classical optimization methods rather than LLM deployment, but it provides valuable insight into how financial institutions are contemplating the transition from traditional AI/ML approaches to incorporating gene”summary, implied