Building a Scalable LLM Gateway for E-commerce Recommendations

mercado_libre · E-commerce · 2023 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.4 (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: Enterprise LLM gateway for ecommerce recommendations

Mercado Libre needed to make generative AI available across a large ecommerce and fintech organization while handling request scale, provider limits, non-technical users, model churn, monitoring, cost visibility, security, and a real-time recommendation use case across Latin American languages.

Constraints:

Architecture

Mercado Libre built a centralized LLM gateway on its internal Fury platform to manage, monitor, secure, and control generative AI consumption. The gateway provides one entry point across multiple LLM providers, supports routing, rate limits, fallback logic, centralized billing, security functions, SDK access, and an internal playground for non-technical employees. A production recommendation use case uses LLMs to generate push-notification copy and recommended items from user interactions with marketplace products.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  internal-user[Internal User] --> playground[Playground]
  internal-user[Internal User] --> sdk[SDK]
  playground[Playground] --> llm-gateway[LLM Gateway]
  sdk[SDK] --> llm-gateway[LLM Gateway]
  llm-gateway[LLM Gateway] --> fury-platform[Fury Platform]
  llm-gateway[LLM Gateway] --> llm-providers[LLM Providers]
  llm-gateway[LLM Gateway] --> recommendation-service[Recommendation Service]
  product-interaction-signals[Product Interaction Signals] --> recommendation-service[Recommendation Service]
  recommendation-service[Recommendation Service] --> marketplace-user[Marketplace User]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Internal User Mercado Libre employee or developer consuming generative AI capabilities. Playground, SDK
Playground Internal tool for non-code users to use centralized generative AI solutions. Internal User, LLM Gateway
SDK Developer toolkit that simplifies gateway consumption for code users. Internal User, LLM Gateway
LLM Gateway Centralized management, monitoring, control, security, routing, rate limiting, fallback, and billing layer. Playground, SDK, Fury Platform, LLM Providers, Recommendation Service
Fury Platform Internal platform that let Mercado Libre scale the gateway without worrying about infrastructure details. LLM Gateway
LLM Providers External or managed large-language-model providers behind the gateway. LLM Gateway
Recommendation Service Production use case generating product recommendations and push notifications from marketplace interactions. LLM Gateway, Marketplace User, Product Interaction Signals
Product Interaction Signals Views, questions, and favorites about marketplace items used to trigger recommendations. Recommendation Service
Marketplace User End customer receiving push notifications and landing-page recommendations. Recommendation Service

Data flow

Internal users or applications access generative AI through the gateway or playground. The gateway centralizes communication with LLM providers, applies security, routing, rate limits, monitoring, and billing, and can fall back across providers. In the recommendation use case, marketplace user interactions with an item feed an LLM prompt that generates top-item recommendations and push-notification wording in the user's country language, leading users to a recommendation landing page.

3 supporting quotes
“Li we built a system that provides management monitoring and control to consume gen implementation of this Gateway architecture was possible quickly thanks to our internal platform Fury which allow us to scale the solutions without worrying about some”transcript, stated
“currently we have available four of the most important llm providers that facilitates and unify the user experience”transcript, stated
“we are using the llms to answer the question about what are the top 10 items that you will be interesting in buying Bas it in your preference”transcript, stated

Why this architecture

A gateway fit Mercado Libre's scale because it centralizes access, hides provider differences, enforces security, manages rate limits, exposes monitoring and costs, and supports fallback across providers. The internal Fury platform made it possible to scale quickly, while playground and SDK layers democratized access for both non-technical employees and coders.

3 supporting quotes
“the Gateway acts as a security barrier between different systems and networks it can provide encryption authentication and authorization functions”transcript, stated
“we can optimize performance by performing tasks such as intelligent routine and rate limits this help us to reduce latency and improve application response times leading to a better and user experience facilitate Integrations and interoperability the gway facilitates”transcript, stated
“consume gen implementation of this Gateway architecture was possible quickly thanks to our internal platform Fury which allow us to scale the solutions without worrying about some benefits of having gway architecture it allows centralized management and control of communications between”transcript, stated

Models used: LLM providers · generative artificial intelligence models

Scale

Alternatives considered (roads not taken)

Let teams integrate directly with providers

Rejected because: Direct integration would duplicate provider handling, monitoring, security, rate limits, billing, and model access across the company.

“the Gateway can simplify architecture of our Computing solutions by acting as a single entry point for different systems and applications”transcript, stated
“allows centralized management and control of communications between different systems and applications this is very important for us because we have a big ecosystem of elements flexibility and adaptability the gway can easily adapt to different”transcript, stated

Rely on one provider without fallback

Rejected because: Mercado Libre wanted four providers and fallback logic to guarantee continued service.

“currently we have available four of the most important llm providers that facilitates and unify the user experience in addition we are in capacity to have a fullback system with a logic to guarantee the continued”transcript, stated
“experience in addition we are in capacity to have a fullback system with a logic to guarantee the continued service simplify architecture the Gateway can simplify architecture of our Computing solutions by acting as a single entry point for different systems and applications this reduce complexity”transcript, stated

Expose generative AI only to engineers

Rejected because: The company needed non-technical employees to use generative AI through a playground.

“technology we are more than 50,000 employees who do not necessarily have computer knowledge how to make it available and even worse how to be aware with the large branch of models and the changing Market Day by Day additionally how to have trustability or or of the”transcript, stated
“we develop our own playground as a tool have to centralize Solutions based on gen that can be used by anyone employee”transcript, stated

Patterns

model-routing (platform)

The gateway centralizes access to multiple LLM providers and can route/fallback across them.

“currently we have available four of the most important llm providers”transcript, stated
“fullback system with a logic to guarantee the continued service”transcript, stated

guardrails-io-filtering (security)

The gateway acts as a security barrier with encryption, authentication, and authorization.

“the Gateway acts as a security barrier between different systems and networks it can provide encryption authentication and authorization functions”transcript, stated

cost-aware-routing (cost)

The gateway centralizes consumption and associated cost across different providers and models.

“our Gateway centralized consumption and the associate Coast”transcript, stated

latency-optimization (performance)

The gateway applies intelligent routing and rate limits to reduce latency and improve response times.

“performance by performing tasks such as intelligent routine and rate limits this help us to reduce latency and improve application response times”transcript, stated

prompt-versioning (prompt-operations)

The recommendation use case uses multiple dynamic prompts with prompt versions for experimentation.

“have multiple Proms and made it Dynamic with prom version we able to experiment with new proms”transcript, stated

Tradeoffs

Centralize generative AI access through a gateway

Chose A managed gateway architecture over Direct point-to-point provider integrations.

Rationale: The gateway simplified architecture, centralized control, and reduced direct dependencies between systems.

“acting as a single entry point for different systems and applications this reduce complexity and direct dependency between systems”transcript, stated
“centralized management and control of communications between different systems and applications”transcript, stated

Support multiple providers with fallback

Chose Multi-provider gateway with fallback logic over Single-provider consumption.

Rationale: Multiple providers unified user experience and improved continued service when one provider path is constrained.

“facilitates Integrations of systems and application from different vendors and Technologies”transcript, stated
“option to have a fullback systems centralize building and simplify architecture”transcript, stated

Use LLMs for personalized recommendation pushes

Chose LLM-generated recommendation and notification text over Only existing recommendation algorithms.

Rationale: The team wanted to improve notification algorithms, support dynamic benefits, and increase marketplace pushes.

“take advantage the power of an llms to improve the algorithm of of notifications and increase pushes in our Marketplace”transcript, stated
“be able to offer benefits such as free shipping or interest free installments or any new benefit”transcript, stated

Gotchas (what bit them)

Provider model limits became a production-scale bottleneck.

Root cause: Large request volumes per minute could exceed model limits.

Resolution: Mercado Libre centralized consumption through a gateway with rate limits, routing, and provider management.

“large amounts of request per minute which even exceeds the limits of the models”transcript, stated
“performance by performing tasks such as intelligent routine and rate limits”transcript, stated

Non-technical users could not consume provider APIs directly.

Root cause: More than 50,000 employees did not necessarily have programming knowledge.

Resolution: Mercado Libre built an internal playground and SDK toolkit.

“we are more than 50,000 employees who do not necessarily have computer knowledge”transcript, stated
“we develop our own playground as a tool have to centralize Solutions based on gen that can be used by anyone employee”transcript, stated

Recommendation copy needed regional language variation.

Root cause: Latin American markets use different Spanish variants and Brazilian Portuguese.

Resolution: Prompts were made dynamic and versioned for experimentation across languages and benefits.

“we need to be able to generate boings in the asent OR language of each country in Latin America”transcript, stated
“Spanish or Brazilian Portugese have multiple Proms and made it Dynamic with prom version”transcript, stated

Evaluation

Mercado Libre monitors quality, response times, cost, recommendation quality, and NPS expectations through the gateway and use-case metrics, though the transcript does not describe a detailed offline evaluation harness.

Metrics: quality response times and cost · recommendation quality · NPS · unique gateway users · number of use cases

“how to obtain matrics to monitor quality response times and cost”transcript, stated
“we see improvements in the recommendations and we expect a positive impact in core metrics like in NPS”transcript, stated

Outcomes

The transcript reports more than 50,000 employees, more than 16,000 gateway users in 2023, four LLM providers, and more than 150 use cases.

3 supporting quotes
“in 2023 we have more than 16,000 of Unix users interacting with that”transcript, stated
“today we have more than 150 user case using our Gateway”transcript, stated
“we see improvements in the recommendations and we expect a positive impact in core metrics like in NPS”transcript, stated