A database can execute a query successfully and still return an answer to a different question. The difficult part of natural-language data access begins with meaning: which measure the user asked for, which dimensions are relevant, what time period applies, and what data scope is permitted.

Our engineering separates a candidate interpretation from permission to compile it. Business terms are resolved against declared semantic metadata within a selected table scope. The compilation path then checks the requested operation, binding ambiguity and tenant context. A metric being suggested is not, by itself, permission to impose its definition on a query.

Declared metric filters can be applied to the SQL syntax tree. The resulting SQL goes through structural validation again. This separation makes the relevant decisions inspectable: a proposed meaning, a permission decision, an applied constraint, and a validated query are distinct stages.

For an illustrative request such as “monthly order count in 2025,” the period and grouping must survive translation into SQL. A correct-looking SELECT without the year filter is still a different request. AST validation can reject forbidden syntax; semantic evaluation must determine whether the intended question was preserved.