Evolution of ML Platform to Support GenAI Infrastructure

lyft · Tech · 2024 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.6 (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: ML platform evolution for enterprise GenAI

Lyft needed to extend an existing large-scale ML platform to support LLM vendors, client libraries, centralized proxies, evaluations, guardrails, and AI assistants without losing observability, security, and model lifecycle discipline.

Constraints:

Architecture

Lyft reused its ML serving platform by redefining an LLM API proxy as a model. It wrapped vendor client libraries so traffic flowed through Lyft's model-serving proxy, injected API keys server-side, captured granular metadata, applied online PII filtering and output guardrails, logged request/response pairs, ran offline LLM-as-judge evaluations, and began building higher-level assistant interfaces.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  vendor-client-wrapper["Vendor client wrapper"] --> llm-proxy["LLM proxy"]
  llm-proxy --> vendor-llm-apis["Vendor LLM APIs"]
  vendor-llm-apis --> evaluation-hooks["Evaluation hooks"]
  evaluation-hooks --> pii-filter["PII filter"]
  pii-filter --> llm-proxy
  evaluation-hooks --> evaluation-warehouse["Evaluation warehouse"]
  evaluation-warehouse --> assistant-interface["Assistant interface"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Vendor client wrapper Preserves familiar OpenAI/Anthropic-style client interfaces while routing through Lyft infrastructure. LLM proxy
LLM proxy Runs inside the model-serving system and forwards requests to LLM vendors. Vendor LLM APIs
Vendor LLM APIs External API-hosted models used for most Lyft LLM usage. Evaluation hooks
Evaluation hooks Runs online input checks, online/offline output checks, and offline input-output analysis. PII filter, Evaluation warehouse
PII filter Redacts personal data before prompts are sent to vendors. LLM proxy
Evaluation warehouse Stores evaluation actions, prompts, responses, and offline quality results. Assistant interface
Assistant interface Higher-level abstraction for applications more complex than raw LLM calls. —

Data flow

A developer imports a Lyft-wrapped vendor client, builds an LLM request locally, the wrapper routes HTTP through Lyft's ML serving system, the server-side proxy injects credentials and forwards to the vendor, evaluations can filter PII or inspect outputs, request/response pairs are logged, and offline workflows score quality with another LLM.

“we created a wrapper of that package which had the same interface for constructing requests as the public one”transcript, stated
“we overwrote the transport layer to Route the h HTP requests um created by the library to our ml serving system”transcript, stated

Why this architecture

Lyft reused the ML serving platform because its lifecycle, observability, security, compute, and model management primitives still applied when the model was an external API. Wrapping vendor clients let engineers keep familiar libraries while centralizing governance and evaluation.

“model serving platform was running our arbitary code and the model was deferred to an API”transcript, stated
“most of those were still extremely relevant even uh when that model is just an API call”transcript, stated

Models used: OpenAI API · Anthropic API · Databricks Dolly · PII filtering model · LLM-as-judge evaluators · Lyft ML model interface · LLM vendor clients

Scale

Alternatives considered (roads not taken)

Self-host most LLMs.

Rejected because: Lyft quickly found most users wanted vendor API access for the foreseeable future.

“self-hosting was probably not what most of our users wanted from us”transcript, stated

Let developers call vendor APIs directly.

Rejected because: Central proxying provided observability, security, standardized infrastructure, and model-management simplification.

“having observability like operational metrics standardized compute security network infrastructure and uh simplification of Model Management”transcript, stated

Buy a full evaluation platform in 2024.

Rejected because: Lyft decided its immediate requirements could be met with an internal lightweight evaluation framework.

“for 2024 we decided that we could meet the requirements um on our own”transcript, stated

Patterns

model-routing (vendor proxy)

Lyft routes multiple vendor APIs through a centralized LLM proxy inside its ML serving system.

“put our um llm vendors through an uh proxy into our unified ml serving system”transcript, stated

privacy-preserving-processing (PII filtering)

Online evaluations redact PII before sending prompts to external LLM vendors.

“that pii filtering model um removes the pii from the initial prompt”transcript, stated

llm-as-judge (offline evaluation)

Lyft runs LLM-based workflows over logged request-response pairs to flag unhelpful or incomplete answers.

“we use another llm with a tailored prompt to um essentially determine whether uh there are any issues”transcript, stated

observability-tracing (central proxy logging)

The proxy captures granular traffic origin, user, service, environment, prompts, responses, and evaluation actions.

“we could capture their uh username the service that was coming from the environment”transcript, stated

Tradeoffs

Vendor APIs over self-hosted LLMs for most use.

Chose API-mediated vendor access over Lyft-hosted LLM serving as the primary path.

Rationale: Users wanted vendor access, while Lyft could still preserve platform controls through the proxy.

“for the first foreseeable future Lyft would be relying on vendors via an API for the bulk of our llm usage”transcript, stated

Build a lightweight evaluation framework internally.

Chose Hooks for modular online/offline evaluations over A heavyweight external evaluation system.

Rationale: The platform needed immediate hooks for PII filtering, output guardrails, and quality scoring.

“provide the hooks in our platform uh to to have modular um ways to run evaluations on our input puts and outputs both online and offline”transcript, stated

Use both client-side and server-side control.

Chose Wrapped clients plus server proxy over Server-only proxying with unmanaged clients.

Rationale: Owning both sides gave Lyft latitude to modify, log, observe, and add product features where appropriate.

“we had Hooks and we had control over both the client side code and the server side code”transcript, stated

Gotchas (what bit them)

Traditional ML model abstractions did not fit LLM APIs directly.

Root cause: LLM calls had no local model binary and required complex client-constructed natural-language requests.

Resolution: Treat the proxy code as the model under the ML model interface and defer actual model execution to vendors.

“there was no underlying model binary”transcript, stated

Centralizing traffic answers who is using LLMs but not whether usage is good.

Root cause: Proxy logs alone did not evaluate meaning, quality, or safety.

Resolution: Add modular online and offline evaluation hooks for inputs, outputs, and request-response pairs.

“now we know uh who's using the llms but do we know how they're using them and also do we know uh whether the way they're using them is Meaningful”transcript, stated

Vendor clients needed governance without developer friction.

Root cause: Developers expect familiar client libraries, but platforms need proxying, logging, and credential management.

Resolution: Wrap vendor packages with the same interface while overriding the transport layer.

“same interface for constructing requests as the public one but we overwrote the transport layer”transcript, stated

Evaluation

Lyft evaluates LLM usage with online input PII filtering, online output guardrails, offline request/response quality scoring, logged evaluation actions, and LLM-as-judge prompts for helpfulness and information sufficiency.

Metrics: PII removed before vendor call · Online output guardrail result · Request/response quality score · Unhelpfulness flag · Information sufficiency flag · Traffic origin and service metadata · Evaluation actions warehoused

“we have um warehoused uh a warehouse place where we can see what actions our evaluations took”transcript, stated
“is the response unhel to the user and then the other one is does it lack information to fully answer the customer's inquiry”transcript, stated

Outcomes

The talk cites 50+ models, 100+ GitHub repos, 1,000+ unique models, 10,000+ RPS for some models, 50 teams with models, more than half a dozen vendors, and 100% of LLM traffic through the proxy in early 2024.

“evolving their unified model serving infrastructure to accommodate LLM API proxies, building custom client libraries that route traffic through centralized infrastructure”summary, stated
“The results include standardized LLM access across the company with full observability, PII filtering capabilities, quality evaluations using LLM-as-judge patterns”summary, stated