The AI-powered analytics onboarding system
Onboarding a metric into our enterprise metrics platform required hand-written SQL and YAML configuration, with careful human precision at every step. When upstream metric logic changed, teams redid enormous amounts of work; one team lost a full quarter to exactly that. Strong data engineers were spending their days as careful SQL and YAML editors, which told me the system's design was the problem and added headcount would never fix it.
I mandated an engineering solution with explicit constraints. Humans would stay accountable for correctness and meaning. Automation had to reduce the work without obscuring the logic, and the finished system had to meet production reliability standards.
My team delivered a RAG-grounded pipeline. An engineer types a natural language question, and hybrid keyword and vector retrieval finds the relevant schemas in an Elasticsearch index of approved tables. Claude then generates SQL, which passes through automated validation covering schema correctness, join validity, NULL handling, and a confidence score. From the validated SQL the system extracts governed measures and dimensions, then produces standards-compliant YAML and opens a pull request into the governed metrics repository. The whole workflow is surfaced through a Backstage developer portal plugin.
The guardrails mattered as much as the generation. The LLM could only reference schemas in the approved index, and column pruning ran as a deterministic Python function because for schemas we own, column importance is a known quantity that belongs in rules. Pull request creation was automated while approval stayed with a human engineer on every artifact.
Onboarding collapsed from days to hours and freed more than $2M in annual engineering capacity.