What changed
Google Cloud has introduced a method for developers to create custom evaluation metrics for Natural Language to SQL (NL2SQL) data agents. These agents, built using the Agent Development Kit (ADK), are designed to interact with cloud data warehouses like BigQuery. The company highlights that standard evaluation metrics, such as Exact String Match and Naive Table Diff, often fail to account for variations in SQL query formatting and result presentation that are still semantically correct.
What this means in practice
The new approach allows developers to replace rigid string or table checks with more flexible, domain-aware evaluation methods. This is particularly important for assessing the accuracy of SQL queries generated by large language models (LLMs), which may produce variations in column names, order, or formatting that still yield correct results. By using a combination of built-in and custom metrics, developers can better evaluate the performance of their NL2SQL agents across three layers: trajectory evaluation, deterministic semantic equivalence, and rubric-based evaluation. This ensures that the evaluation process is more aligned with the actual needs of users and the semantic meaning of SQL queries.
Limitations and availability
The supplied announcement does not specify the exact release date or availability of the custom evaluation metrics. However, the post outlines five common scenarios where standard metrics fall short, such as the alias problem, permutation problem, sorting problem, data type and precision problem, and the superset problem. Developers are encouraged to examine these scenarios before designing their own custom metrics. The evaluation methods described are part of the ADK and are available to users working with Google Cloud's data warehouses like BigQuery.
