All case studies
ProductionWorldLink US · 2025 – present

From an English question to a governed Power BI report

An LLM pipeline that turns a natural-language question into governed SQL, then into a real semantic model and report.

AI Data Engineer: design and implementation

The problem

Business users asked questions in English; getting an answer meant a ticket, an analyst, and days of waiting. Text-to-SQL tools promised to close that gap but stopped at a result set, which is not what anyone actually wanted. People wanted a report they could keep, in the tool they already used.

What I did

Architecture

From a natural-language question to a governed Power BI reportQuestionplain EnglishDatabricks Geniegoverned SQLResult profileshape + typesVisual rulesdeterministicYAMLTMDLPBIRUnity Catalogasker's permissionscardinality · types · time dimension · measures vs dimensionsopens in Power BI
The question becomes SQL inside Databricks Genie, so Unity Catalog governance is inherited rather than reimplemented. The result set is profiled, and a deterministic rules layer, not the model, chooses the visual. Output is a real TMDL/PBIR project someone can open and own.

What went wrong first

The model should not choose the chart

Letting the LLM pick a visual produced confident nonsense: pie charts of time series. Moving selection into deterministic rules over a profiled result set made the output predictable, and made failures explainable.

TMDL is unforgiving

Power BI's project format fails closed: a near-miss produces a file that will not open at all. Generating it reliably meant treating the format as a contract to validate against, rather than a template to fill in.

Governance has to be inherited, not reimplemented

It would have been easier to run generated SQL with a service principal. Routing through Genie instead means the answer respects the asker's own permissions, which is the difference between a demo and something you can deploy.

Results

less manual report creation time
~60%less manual report creation time
query-to-visual accuracy
92%query-to-visual accuracyon the internal evaluation set
governance bypasses
0governance bypassesSQL runs under the asker's own permissions

The point was never to remove analysts. It was to stop them spending their week rebuilding the same four charts, so the questions that actually need a human get one.

Stack

Databricks GenieUnity CatalogPower BITMDLPBIRAgent SkillsPythonLLM orchestration