The Semantic Layer Is What Makes Natural-Language Analytics Safe
Letting an LLM write SQL against your warehouse is a governance nightmare. Grounding it in a semantic layer turns a liability into a trustworthy analyst.
Natural-language analytics has an obvious appeal: anyone can ask a question and get an answer, no SQL required. It also has an obvious danger. Point a large language model at a raw warehouse and ask it to write queries, and you will get confident answers that are subtly, or catastrophically, wrong. The model will pick the wrong table, join on the wrong key, misunderstand what revenue means in your business, and present the result with total assurance. The fix is not a better prompt. It is a semantic layer.
Why raw text-to-SQL fails in the enterprise
A warehouse is not self-describing. It has tables named after systems, columns whose meaning lives in a data dictionary nobody reads, and business logic that exists only in the heads of a few analysts. Revenue might mean gross bookings in one table and recognized revenue in another. Active user might have three competing definitions. An LLM cannot infer this hidden context, so it guesses, and its guesses are plausible enough to be dangerous.
Worse, raw text-to-SQL has no notion of authorization. The model will happily write a query that reads columns a user should never see. In a regulated environment, that is not a bug, it is an incident. Self-service analytics without governance is not a feature, it is a liability.
The semantic layer as a contract
A semantic layer is a governed model of your business concepts. It defines metrics, dimensions, and the relationships between them in one place: what revenue means, how it is calculated, which tables it comes from, and who is allowed to see it. It is a contract between the messy physical warehouse and the clean conceptual questions people actually ask.
When natural-language analytics is grounded in this layer, everything changes. The LLM no longer writes arbitrary SQL against raw tables. Instead, it maps a question onto certified metrics and dimensions, and the semantic layer compiles that mapping into a correct, authorized query. The model's job shrinks from open-ended code generation to a constrained matching problem, which is exactly the kind of task it does well and safely.
Retrieval grounds the model in truth
To map a question onto the right concepts, the system retrieves relevant definitions from the semantic layer using vector search over their descriptions and synonyms. This retrieval-augmented approach means the model reasons over your actual metric catalog, not its training data. When a user asks about churn, the system retrieves your organization's specific churn definition, with its exact window and exclusions, and grounds the answer in that. The model cannot invent a metric, because it can only select from what the semantic layer certifies.
Show your work
Trust in analytics comes from transparency. Every answer Atlas returns includes the exact query it ran and the lineage of the metrics involved: which tables, which transformations, which owners. An analyst can audit any result in seconds. This does two things. It lets experts verify answers before they propagate into decisions, and it teaches the organization how its own metrics are defined, which raises data literacy over time. An answer you cannot audit is an answer you cannot trust, and in analytics, trust is the entire product.
Security at query time, not as an afterthought
Governance has to be enforced where the query runs, not bolted on at the application layer. Row-level security and column masking are applied at compile time based on the identity of the person asking, so the same question returns appropriately scoped results for a regional manager and a global executive. A user simply cannot phrase a question that returns data they are not entitled to, because the restriction lives below the natural-language interface, in the semantic layer itself.
What natural language does and does not change
It is worth being honest about the limits. A semantic layer plus a grounded model makes analytics accessible and safe, but it does not eliminate the need for data teams. Someone still has to model the business, certify the metrics, and maintain the semantic layer as the organization evolves. What changes is where that expert effort goes. Instead of fielding a queue of ad-hoc query requests, the data team invests in a governed model that answers thousands of questions correctly on its own. The expertise moves upstream, from answering questions to defining the language in which questions can be answered.
The payoff
When it works, the effect on an organization is striking. The ad-hoc request queue shrinks because people answer their own questions. Decisions speed up because the answer arrives in seconds with its lineage attached. And trust rises, because every answer is grounded, auditable, and secured. Natural language is the interface people notice, but the semantic layer underneath is what makes it safe enough to rely on.
James is part of the team building the Medovac platform, turning rigorous data science methods into governed, production-grade software.