For a question such as “How much did we sell yesterday?”, the Taobao technical team found at least three possible answers: gross merchandise value by order, payment value, and net value after refunds. This shows that while AI can already produce executable SQL, the real difficulty in aligning enterprise data lies in metric definitions and calculation standards.

We noticed that the Taobao technical team did not focus on further improving the speed at which models write SQL. Instead, it confirmed metrics, time ranges, and filters before generating a query, then delivered the data sources and calculation conditions alongside the results. This change matters: AI data retrieval is moving from “generating a piece of code” to “completing a verifiable business calculation.”

What This Is

A semantic layer can be understood as a set of business rules positioned between business users and the underlying databases. It tells AI which metric “payment GMV” maps to, which time field to use, how to handle refunds, and which records to exclude, before converting a structured request into SQL.

The specific process begins with an Agent identifying the business scenario and candidate metrics. If “How much did we sell” maps to both order value and payment value, the user is asked to choose. The system then validates the time window, aggregation dimensions, and filters before executing the query against authorized data sources. This separates “the wrong metric was selected” from “the SQL generation or execution failed.”

More importantly, a result cannot consist of a single number. The system must also explain whether days are divided by payment time or order creation time, when the data was current as of, and what rules were applied to refunds. Otherwise, even if a query executes successfully, finance teams cannot confirm whether it is calculating the same accounts.

Industry View

The positive significance of this practice is that it moves part of enterprise data governance into AI conversations. Models no longer have to guess table names, date fields, and business rules on the fly, while engineers can trace issues back to explicit metric definitions. For e-commerce, finance, and operational analysis, this is closer to actual business needs than simply improving SQL-generation accuracy.

The risks are equally clear: a semantic layer itself requires continuous maintenance. Outdated metric definitions, inconsistent standards across business departments, and delayed underlying data can all produce “formally correct” but incorrect answers through a structured workflow. More realistically, this approach depends on the enterprise having already organized its data assets. If metric governance was already chaotic, AI will only expose the conflicts faster.

In addition, greater automation does not eliminate the need for access controls and result review. The system must query authorized data sources and retain audit records. AI can help narrow the scope of an investigation, but it cannot replace finance teams in confirming business definitions.

Impact on Regular People

For enterprise IT: When enterprises deploy AI data assistants, the priority should not be model selection alone. Teams should first verify whether metric definitions, data permissions, and update times are reliable. Building a semantic layer may take more time than connecting a model, but it determines whether the results can be used for business decisions.

For workplace professionals: When operations, sales, and finance teams use AI reports, they should proactively ask: “Which metric, which time basis, and what refund rules?” Asking precise questions about calculation standards is more valuable than merely checking whether SQL runs.

For the consumer market: As merchants increasingly use AI to adjust pricing, promotions, and business analysis, inconsistent metric definitions may also be amplified. What consumers ultimately encounter remains a company’s operating rules, not the speed at which a model generates SQL.