April 15, 2026
The Semantic Layer Generator: When Agentic AI Meets Data Architecture
Forward deployed engineers

By Nayan Paul
7 min read
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 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.
3. MCP as the Integration Layer
The Model Context Protocol allows the semantic layer generator to exist as a callable tool inside any AI assistant — Claude, a custom agent, or a data platform's copilot. An engineer can invoke it mid-conversation, feed it a schema, and receive production-ready SQL and a design report without context-switching. This is how agentic tools should work: invisible infrastructure, not another dashboard.
Forward-Deployed Engineering: What It Actually Means
The term "forward-deployed" comes from a specific engineering philosophy: instead of building generic platforms and hoping users adapt, you embed engineering capability directly at the point of need. The Semantic Layer Generator embodies this in three ways.
Design Philosophy
Forward-deployed doesn't mean "customised for one client." It means the tool meets you where your problem lives — inside your schema, shaped by your questions, deployed to your warehouse. The engineering is brought to the edge.
Schema-native. The tool doesn't require you to learn a DSL, configure a YAML manifest, or adopt a new platform. You feed it the schema you already have — tables, columns, types, relationships — in plain JSON. It works with your reality, not an idealised abstraction of it.
Question-driven. The entire optimisation pipeline is anchored to the analytical questions you provide. Every wide table that gets generated can trace its existence back to a specific business question. If a table doesn't help answer something, it gets pruned. This is engineering in service of outcomes, not architecture for its own sake.
Production-ready output. The tool doesn't generate a diagram and wish you luck. It outputs Snowflake-ready CREATE OR REPLACE VIEW DDL, a typed output schema for downstream Text2SQL integration, and a self-contained HTML report with column-level documentation. You can deploy the SQL the same day.
The Agentic Design: A 5-Phase Autonomous Pipeline
What makes this tool genuinely "agentic" isn't that it uses an LLM — it's that it orchestrates multiple reasoning and optimisation stages autonomously, with no human intervention between phases. Here's how the pipeline works:
The critical insight in this architecture is the interleaving of deterministic and probabilistic steps. Phases 1, 3, 4, and 5 use LLM reasoning. Phase 2 uses pure Python set logic. This hybrid approach means the pipeline gets the creativity and semantic understanding of language models where it matters, while keeping optimisation rigorous and auditable where precision matters.
The Value It Brings
For Data Engineers
The tool doesn't replace data engineers — it gives them a first draft that would have taken days to produce manually. They can review the generated wide tables, adjust join types, add computed columns, and deploy — focusing their expertise on refinement rather than construction. The HTML report serves as living documentation that previously didn't exist at all.
For Analytics Teams
Flat, pre-joined tables with descriptive column definitions mean analysts can write simpler queries, get faster results, and self-serve without decoding a 15-table ER diagram. The question-coverage matrix gives them a clear map: "this question is answered by this table."
For Text2SQL Systems
This is perhaps the most underappreciated value. Text2SQL models — whether GPT, Claude, or open-source — perform dramatically better against flat schemas than normalised ones. Fewer tables, fewer joins, descriptive column names, and column-level definitions all reduce hallucination and improve SQL accuracy. The output schema JSON is specifically formatted to feed directly into downstream Text2SQL tools, creating a seamless pipeline from raw database to natural language query interface.
For the Organisation
Every hour an engineer doesn't spend manually designing wide tables is an hour returned to building data products, improving pipelines, or tackling genuinely novel problems. The tool converts a recurring cost into a one-time invocation.
A Concrete Example
Consider an HR database with five normalised tables: EMPLOYEES, DEPARTMENTS, ROLES, SALARIES, and LEAVE_REQUESTS — linked by foreign keys in the standard star-schema pattern.
Feed it five analytical questions — average salary by department and role band, employees with the most leave days, quarterly hires by location, salary distribution across bands, and department headcount growth — and the tool produces:
── Results ────────────────────────────────── Source tables: 5 Wide tables created: 4 Views eliminated: 0 (already optimal) Unanswered questions: 0 (100% coverage) ── Wide Tables ────────────────────────────── FACT_EMPLOYEES_FULL → hiring trends, headcount FACT_SALARIES → compensation analysis FACT_LEAVE_REQUESTS → leave patterns DIM_DEPARTMENTS → department dimension
Four views. Zero unanswered questions. Every column traced to its source table. Every view deployable as-is to Snowflake. The entire process took under thirty seconds.
Looking Ahead
The Semantic Layer Generator is a specific instance of a broader pattern: agentic systems that automate well-defined engineering workflows by combining LLM reasoning with deterministic optimisation. The same architecture — analyse, optimise, design, generate, report — applies to ETL pipeline design, API schema generation, test suite scaffolding, and dozens of other "translation layer" problems in software engineering.
What makes this moment unique is that the tools — large language models, agentic orchestration frameworks, and open integration protocols like MCP — have all matured to the point where these pipelines are reliable enough to trust in production. Not as experiments. Not as demos. As infrastructure.
The semantic layer was always the right idea. It just needed a new kind of engineer to build it — one that never sleeps, never forgets a foreign key, and can redesign the entire layer the moment a new question arrives.
Book 1-1 session with me on this or any Agentic topic - Nayan Paul Let us take this conversation deeper. Book a 1-1 30 min session with me on any AI, Gen AI, Agentic AI , Business…