Skip to content
Theme
OnDevice Tools

SoftwareDeveloper Tools

Custom evaluation metrics for Google NL2SQL agents

The Google Cloud Blog explains how custom evaluation metrics can help teams assess NL2SQL data agents built with Agent Development Kit.

Illustration of a Google Agent Development Kit evaluation screen for SQL data agents

Key takeaways

  • Standard SQL checks can flag valid agent behaviour.
  • Custom metrics can compare query results more fairly.
  • Built-in and custom metrics can work together.
  • Teams should test for accuracy before production.
In this article
  1. What changed
  2. Standard tests and limits
  3. How to build a custom metric
  4. Who is affected
  5. Why it matters

What changed

Illustration: AI, Google logo, cloud, Google Cloud logo and the labels Nl2sql, SQL Evaluation, Teams

The Google Cloud Blog shared a post about custom evaluation metrics for NL2SQL data agents. The article was published on 1 December 2026. It focuses on data agents built with Google's Agent Development Kit. These agents connect to SQL warehouses and answer from live data.

The post says such agents inspect schemas and check queries. It adds that standard evaluation tools may not fit them well. The source is marked as unverified, so these details remain claims.

Standard tests and limits

Built-in Agent Development Kit criteria can help. One criterion checks tool use. Another compares responses. The post says these checks can penalise valid SQL variations.

Exact tool argument matching may compare raw SQL text. A response score may use word overlap. Result table checks can compare columns and rows rigidly.

The post lists five common SQL evaluation traps. These cover column aliases, column order, row order, data types and extra context columns. The team notes these issues can cause false negatives.

How to build a custom metric

The Agent Development Kit lets teams add a custom Python metric. They register it in the custom_metrics field of an evaluation config. The post suggests pairing the evaluator with realistic test fixtures.

The custom metric can normalise gold and predicted results. It can align columns and compare rows in an order-independent way. It can return a pass or fail result. The post describes this as a way to avoid brittle checks.

Who is affected

The post focuses on enterprise NL2SQL teams. It mentions cloud data warehouses such as BigQuery. It also points to developers who build data agents. The need for better measures may affect those groups.

Why it matters

The post says teams can mix built-in and custom metrics. The layers include trajectory evaluation, deterministic semantic comparison and rubric based scoring. This mix may give a fuller view of agent quality.

The aim is to judge accuracy and reliability before production. The post advises teams to design metrics that match SQL semantics. It says custom metrics can replace rigid string or table checks.

Sources

  1. Designing Custom Evaluation Metrics in ADK for NL2SQL Data AgentsGoogle Cloud Blog

Tags

Spotted a mistake? See our corrections policy. Read how News by OnDevice works in our editorial policy.