A semantic layer is a set of definitions sitting between the database and the person asking: a list of metrics with an unambiguous calculation, the dimensions they may be sliced by, the relationships between entities, and descriptions in the language the company actually speaks. The model then does not write a query from scratch – it selects from a closed set of concepts.
The effect shows in the numbers. In the dbt Labs benchmark from 2026, grounding in a semantic layer raised accuracy from 90,0% to 98,2% for Claude Sonnet 4.6 and from 84,1% to 100% for GPT-5.3-Codex. It is worth knowing the scale of that measurement: eleven questions run twenty times each on a single insurance dataset. That is a strong directional signal, not proof of universal effectiveness – which is precisely why it is worth measuring the same thing on your own data.
A far more interesting result comes from the same study. Before data models were added, both approaches performed moderately: 64,5% for text-to-SQL and 72,7% for the semantic layer. Adding just three models lifted both sharply. That is the strongest argument in the whole discussion: the work that genuinely improves answer quality is data modelling, not tool selection.
A semantic layer has one more benefit rarely mentioned in an AI context: it forces definitional disputes to be settled. To build one, somebody has to decide what revenue is. That is often the hardest part of the project and simultaneously the part that pays off whether or not anyone ever asks the model a question.