QueryData launches in preview today as a tool for translating natural language into database queries with near-100% accuracy. The service enables developers to build agentic experiences across AlloyDB, Cloud SQL (MySQL and PostgreSQL), and Spanner (GoogleSQL). It builds on Google Cloud's #1 ranking in the BiRD benchmark, a leading natural-language-to-SQL benchmark, combined with Gemini-assisted context engineering.
Hughes Network Systems, a telecommunications leader, has already deployed QueryData in production. "We have transformed user support operations with Google Cloud's data agents. At the heart of our solution is QueryData, enabling near-100% accuracy in production. We are excited about the future of agentic systems!" — Amarender Singh Sardar, Director of AI, Hughes Network Systems
The opportunity for agentic systems: from intent to action
Agentic systems are shifting from advisory roles to active decision-makers. To execute business actions accurately, agents need precise information from operational databases—pricing, inventory, transaction records. Bridging the gap between conversational input and database records becomes essential when requests arrive in natural language. High-quality natural language-to-query capability is critical for enabling agents to take meaningful action.
The developer's dilemma: why natural language for agents with databases is hard
Agents querying enterprise data face three hurdles: accuracy, security, and ease of use. QueryData addresses all three:
-
Accuracy – Inaccurate answers risk poor business decisions, disappointed users, or financial losses. In many industries, 90% accuracy in text-to-SQL translation is insufficient for taking action.
-
Security – Enterprises need auditable, deterministic access controls to ensure each person or agent queries only authorized data. Relying on LLM judgment—probabilistic access controls—falls short. Even low-probability security breaches carry disproportionately high costs.
-
Ease of use – Achieving high accuracy requires developers to provide extensive contextual information about their data, a laborious task. Integration and maintenance of agentic tools adds further friction.
Understanding the accuracy gap
LLMs excel at writing query code, but accurate queries for a given database require more than coding skills and schema parsing:
-
Schemas can be unclear – Developers often use shorthands or abbreviations. What does a column named "product" mean? Product category? A specific model? Abbreviated names like "prod" or "p" compound the problem.
-
Values can be ambiguous – A column named "order return status" with integer values "1", "2", and "3" leaves unclear which represents "returned" or "return initiated."
-
Schemas cover data structure, not business logic – Your business may define "monthly active users" as those who posted at least once, not just logged in, but the database may lack this nuance.
-
Underspecified queries – Natural language questions can be ambiguous, like "latest sales."
How QueryData solves for near-100% accuracy
QueryData leverages the Gemini LLM along with context describing your unique database.
Database context—the code fueling QueryData—consists of descriptions and instructions including:
-
Schema ontology – Information about the meaning of data. Descriptions of columns, tables, and values help QueryData overcome ambiguity by determining what data is needed to answer the question.
-
Query blueprints – Guidelines and explicit instructions for writing database queries to answer specific question types. Templates and facets specify the exact SQL for a given question type.
As a last resort, QueryData detects when a clarifying question needs to be asked.
Deterministic security for your queries
Agentic applications require deterministic, auditable security. Developers can use Parameterized Secure Views (PSVs) to define agent access via fixed parameters like user ID or region. By passing security-critical parameters separately from queries, the application ensures agents can only access authorized data. This prevents agents from querying restricted information, even if they attempt to do so.
PSV support is available today in AlloyDB, with Cloud SQL and Spanner support coming soon.
Ease of use for quality hill-climbing and tool integration
Integrating QueryData into agentic workflows is straightforward. The QueryData API can be used directly or exposed as a Model Context Protocol (MCP) tool via the open source MCP Toolbox for Databases. QueryData automatically works across different database dialects—one API to query them all, no database-specific code required.
QueryData also simplifies context engineering, the process of iteratively evaluating and optimizing context critical to accurate database querying. Developers using QueryData benefit from a robust suite of tools:
-
Out-of-the-box context generation – Upon configuring QueryData, the Context Engineering Assistant, a dedicated agent in Gemini CLI, helps create the initial context set for your database.
-
Evals: Developers can use the bundled Evalbench framework to measure accuracy against use case-specific test sets.
-
Context optimization: The Context Engineering Assistant analyzes evaluation results and suggests refinements to improve performance. By running evaluations iteratively based on these recommendations, you can achieve near-100% accuracy.
Real-world applications built with QueryData
Developers are already deploying QueryData across diverse use cases:
-
Customer-facing applications: A real estate search platform uses QueryData to convert natural language queries into database lookups and automatically schedule property viewings.
-
Internal tools: An AI-powered staffing application queries HR databases to help managers assign employees to shifts based on availability and qualifications.
- Multi-agent architectures: A trade compliance workflow where a primary agent delegates KYC verification to a specialized sub-agent, which queries customer databases to confirm identity and compliance status.
Getting started with QueryData
QueryData is available now for integration into your agentic workflows. Consult the technical documentation for your database platform:
For a practical demonstration, explore the Swiss property search demo shown below (video walkthrough). This independent project illustrates QueryData's capabilities in action: view on GitHub.