Back office ops · Production

Metric Semantic Layer: How Lyft Governs and Scales Key Data Definitions

The problem

As Lyft scaled, different teams were using different definitions for the same metrics with no centralized version control or shared standard, causing outdated metric definitions to creep into decision-making.

Workflow diagram · grounded in source
1
Metric defined in YAML and SQL
integration
“we used YAML configurations. YAML representation provides both flexibility in — and readability of — the metric definition. The core definition is stored in the SQL jinja templates”
2
Owner approval of changes
human_review
“All changes to a metric's definition must be approved by both the Business and Operational Owners”
3
Automated downstream propagation
output
“updates are deployed periodically to all dependent applications through automated code refactors so that they receive the latest updates”
4
User submits natural-language metric query
trigger
“We created an MCP (Model Context Protocol) with tools to access the MSL library and lets users ask natural-language questions about metrics”
5
AI retrieves from metric knowledge base
ai_action
“this configuration serves as a comprehensive knowledge base for AI Agents and Skills”
6
LLM-as-judge evaluation
validation
“guardrails baked in for evaluation of the results from the MCP using evaluation techniques like ground truth and LLM as a judge”
Reported outcome

Lyft's MSL provides a single source of truth for metric definitions, and the AI MCP layer enables natural-language queries answered with greater accuracy and fewer hallucinations, integrating with Claude, Cursor, and Hex.

Reported metrics
Metric query accuracygreater accuracy and fewer hallucinations
Reported stack
YAMLJinjaPythonAirflowAmundsenMCPClaudeCursorHex
Source
https://eng.lyft.com/metric-semantic-layer-how-lyft-governs-and-scales-key-data-definitions-56bee3643c29
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

Lyft's MSL provides a single source of truth for metric definitions, and the AI MCP layer enables natural-language queries answered with greater accuracy and fewer hallucinations, integrating with Claude, Cursor, and…

What tools did this team use?

YAML, Jinja, Python, Airflow, Amundsen, MCP, Claude, Cursor, Hex.

What results were reported?

Metric query accuracy: greater accuracy and fewer hallucinations (source-reported, not independently verified).

How is this back office ops AI workflow structured?

Metric defined in YAML and SQL → Owner approval of changes → Automated downstream propagation → User submits natural-language metric query → AI retrieves from metric knowledge base → LLM-as-judge evaluation.