Data Architecture

The Semantic Layer Generator: When Agentic AI Meets Data Architecture

How a 5-phase autonomous pipeline eliminates weeks of manual data modelling — and why it matters for every analytics team shipping at scale.

Every modern data team faces the same bottleneck: the gap between a normalised database schema and the flat, query-ready tables that analysts actually need. The Semantic Layer Generator is an agentic AI system that closes that gap autonomously — transforming raw schemas and business questions into optimised, production-ready wide-table views in seconds.

The Problem Nobody Talks AboutThe Problem Nobody Talks About

Data warehouses are built by engineers. Dashboards are built by analysts. Between them lies a chasm — the semantic layer — and it’s almost always hand-crafted, poorly documented, and perpetually out of date.

Consider what building a semantic layer actually requires today. A data engineer must deeply understand the normalised schema: every foreign key, every relationship chain, every edge case where a left join becomes an inner join. They must then interview stakeholders to understand the analytical questions the business needs answered. Only then can they begin designing wide tables — denormalised, pre-joined views that flatten a complex relational model into something a BI tool can query without six-table joins.

This process typically takes days to weeks for a mid-complexity schema. And the result? A static artefact that starts decaying the moment the schema changes or a new business question emerges.

The Core Tension

Normalised schemas optimise for data integrity. Analytical queries optimise for speed and simplicity. The semantic layer is the translation layer between these two worlds — and it has been painfully manual for decades.

The downstream costs are significant. When the semantic layer is missing or poorly designed, analysts write ad-hoc queries with redundant joins, dashboards slow to a crawl, Text2SQL tools hallucinate because they can’t navigate complex schemas, and every new business question triggers another round of engineering tickets.

The Business Case

This isn’t just a technical inconvenience — it’s a strategic bottleneck. Organisations that can’t translate raw data into queryable, governed, analyst-friendly tables cannot move at the speed of their own questions.

A well-designed semantic layer delivers three things simultaneously: it makes analysts self-sufficient (no more waiting on engineering for every new slice of data), it makes queries dramatically faster (pre-joined views eliminate runtime join costs), and it makes Text2SQL systems reliable (flat tables with descriptive column names are exactly what language models need to generate accurate SQL).

The question was never whether organisations need a semantic layer. It was whether the process of building one could be automated without sacrificing quality. That’s the question this tool answers.

Why Now? The Convergence Moment

Three capabilities had to mature simultaneously to make this possible.

1. LLMs That Understand Schema Semantics

Modern large language models don’t just parse JSON — they understand what a DEPARTMENT_ID foreign key means, how it relates to an EMPLOYEES table, and why an analyst asking about “salary distribution by role band” needs a join path through SALARIES → EMPLOYEES → ROLES. This semantic reasoning is the foundation the entire pipeline rests on.

2. Agentic Orchestration Patterns

A single LLM call can’t do this well. You need a multi-phase pipeline where each stage’s output feeds the next — analysis, optimisation, design, generation, reporting — with deterministic optimisation steps (pure set-logic pruning) interleaved with LLM-powered reasoning. This is agentic AI in its most productive form: not a chatbot, but an autonomous system that completes a complex engineering workflow end-to-end.

Written by

Subhasis Mukherjee

Data & AI Engineering

I design and build data platforms and AI systems. This blog is where I write down the architectures, trade-offs and lessons learned along the way.

Comments

Questions, corrections and war stories welcome. New comments appear after a quick review.

    Loading comments…

    Leave a comment

    Your name and comment are published once approved. Your email is only used if I need to reply to you privately.