Zero Labs
Industry News / AI

Semantic Layers May Become the API Layer for AI

Source · Towards AI By Venkata M Sangaraju

From the publisher’s feed, collected in the ZeroLabs newsroom.

IntroductionWith the rapid growth of AI in analytical workflows, enterprises are facing a common problem. It’s not hallucination. LLMs are now smart enough to ground their responses accurately based on data and dashboards. The real challenge is getting the correct number for a given metric. The root cause of this inconsistency is the distributed and siloed nature of analytics workflows.Self-service analytics, once considered the holy grail of analytics, is now becoming its kryptonite. As enterprises grow, so does the number of business units and teams performing analytics. Each team ends up defining key metrics — such as Revenue or Active Users — in its own way.This approach worked well when dashboards created by development teams were simply consumed by dashboard readers. However, once those same dashboards and models are exposed to AI agents, users can end up seeing different numbers depending on which dashboard or model the agent accesses.Why This HappensIt’s not that the data is missing. In most cases, the numbers already exist somewhere in the data warehouse.The real problem runs much deeper.Metric logic gets duplicated everywhere — across dashboards, SQL notebooks, BI tools, and ad-hoc queries. Over time, every team and every tool starts defining the same metrics slightly differently. Marketing creates one version of “Active Users,” Product defines it another way, and Finance adds its own interpretation.As this continues, business meaning starts to fragment. What should have been a shared definition slowly turns into multiple interpretations, each shaped by the priorities and incentives of different teams.For example, imagine three teams inside the same company trying to measure “Active Users.”The Marketing team defines it as:SELECT COUNT(DISTINCT user_id)FROM website_eventsWHERE event_date >= CURRENT_DATE - 30To Marketing, an active user is anyone who visited the website in the last 30 days.The Product team defines it differently:SELECT COUNT(DISTINCT user_id)FROM app_sessionsWHERE session_duration > 60AND event_date >= CURRENT_DATE - 30For Product, a user is only considered active if they spent meaningful time inside the application.Meanwhile, Finance uses another definition:SELECT COUNT(DISTINCT customer_id)FROM subscriptionsWHERE subscription_status = 'paid'AND billing_date >= CURRENT_DATE - 30Finance only considers paying customers as active users.All three teams are technically measuring “Active Users.” All three numbers are valid in their own context. But once these definitions start flowing into dashboards, AI agents, notebooks, and reports, the organization slowly loses a single shared understanding of the metric.The Rise of Semantic DriftThis problem has a name: Semantic Drift.Semantic drift happens when the same business concept gradually starts meaning different things across an organization. You start seeing variations like:customeractive_customerNet New AccountsPayment VolumechurnAt first glance, they all seem related. In many cases, they’re built on overlapping logic. But once you dig deeper, you realize they’re often measuring different things. Sometimes the differences are subtle. Other times, they’re significant enough to completely change how a metric is interpreted.What begins as small definitional changes slowly compounds over time. Before long, teams across the organization are making decisions based on conflicting versions of the same “truth.”Why AI Makes This Problem Much WorseIn the traditional world, engineering teams build the data sources and dashboards. Analysts or the business users consume the data. If they have a question, they go back to the dev and get a clarification or a report built. While AI solves this problem of back and forth and time delays, it adds another important problem. AI creates execution plans and recursively fires multiple queries to achieve the goal. Even though AI shows what columns, filters and models it is using, there is no way non technical users track it and find out that wrong definition of “active_users” is used.This is the hidden risk many companies are only beginning to recognize.User: “How many active customers do we have?”AI Agent connected to Marketing dashboard:→ 1.4M customersAI Agent connected to Finance model:→ 620K customersNeither answer is technically wrong. The problem is that the organization no longer has a single shared definition of “active customer.”What Is Already Available In The EcosystemThe industry has been trying to solve this problem for quite some time. Over the years, several tools and approaches have emerged to bring consistency to how metrics are defined once and accessed many times.Looker was one of the early pioneers. LookML lets you define metrics and dimensions in a central modeling layer, so every Looker Explore or dashboard can source from the same definitions and guarantee consistency. It is powerful and, by far, one of the biggest USPs of the Looker ecosystem.Then came the dbt semantic layer. dbt allows teams to bring metric definitions directly into their dbt projects. For organizations already using dbt for data transformation and pipelines, it becomes a natural fit to expose those definitions as a semantic layer that can be consumed by tools like Looker or Tableau.There are also several open-source semantic layer tools that are gaining traction and steadily increasing their footprint across enterprises.Cube offers a universal semantic layer that sits between the data warehouse and downstream tools. Its open-source nature, API-first design, lightweight architecture, and ease of deployment are some of its biggest advantages.AtScale also focuses on delivering consistent metrics, especially for large-scale BI environments.Beyond these, there are metric stores that aim to act as centralized repositories for metric definitions. Some teams are turning to data contracts to enforce rules around how metrics should be calculated, while others rely on data catalogs to document what each metric actually means.At Google Cloud Next 2026, Google Cloud announced Knowledge Catalog to address enterprise data fragmentation. As an evolution of Dataplex’s cataloging capabilities, Knowledge Catalog acts as a centralized context layer that aggregates metadata from databases, object stores, and Looker models, exposing them to applications through APIs. When a natural language question is asked, it can intelligently identify the correct data source or verified query pattern to use.However, leveraging this technology requires a strong GCP footprint. Even though it supports federated scanning of external metadata from AWS, Snowflake, or Databricks, the core catalog engine and routing APIs remain tightly coupled to Google Cloud. For companies already invested in the GCP ecosystem, this is still a highly promising direction.At the same time, companies are coming together to build an open semantic standard called OSI (Open Semantic Initiative) to bring consistency across BI tools and AI agents. Think of it as a “Rosetta Stone” for business metrics and definitions. This becomes especially important as organizations try to centralize metric definitions so downstream tools no longer have to reinvent the wheel.One of the hardest problems in semantic layers is figuring out the right approach for parsing SQL. Traditional SQL execution is bottom-up — inner subqueries are evaluated first, and then the query works outward. Business metrics, however, often require a top-down understanding. They need context from the outer GROUP BY clauses or filters to calculate correctly.This mismatch becomes especially painful with nested queries, CTEs, and AI-generated SQL. Semantic SQL and E-Graphs from Cube look promising in addressing this challenge by forcing the agent to construct queries more intelligently. The engine carries the metric definition until it reaches the correct aggregation boundary, and only then expands it into executable SQL.I believe more techniques like these will continue to evolve and eventually give OSI the “brain” required for query rewriting, especially when dealing with messy AI-generated SQL that contains multiple levels of nesting and tool-specific quirks.Semantic LayersHow Companies Will Start Thinking About Next-Generation AI AnalyticsCompanies that are already locked into analytics vendors have started rethinking their approach. Tools like Anthropic Claude and ChatGPT can now perform analysis at the speed of thought without the need for dashboards. Analysts equipped with these AI platforms can uncover insights, identify drivers, and generate visuals and artifacts within minutes.The need for traditional enterprise BI platforms will increasingly come under scrutiny. Even though dashboards are not going away anytime soon, the need of the hour is something that can work across BI platforms, AI agents, and custom applications without having to worry about context, enterprise knowledge, consistent definitions, or business logic.I feel an open source semantic layer is the one thing that fits this description well.The companies that succeed with enterprise AI won’t just have better models. They’ll have a shared semantic layer that every dashboard, agent, and application can trust.Semantic Layers May Become the API Layer for AI was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.