News · Google Cloud · 2 min read
Event date: · Published:
Google Cloud adds ai.classify and ai.extract to AlloyDB AI
Google Cloud launched ai.classify and ai.extract, two SQL functions in preview that let developers classify text and extract structured JSON directly inside AlloyDB using Gemini models.
Google Cloud introduced two new SQL functions, ai.classify and ai.extract, for the AlloyDB AI query engine, detailed in a blog post published on November 12, 2026 by Paul Ramsey on the Google Cloud blog.
What changes in AlloyDB AI
- Two new SQL functions,
ai.classifyandai.extract, launch in preview inside the AlloyDB AI query engine. - Using them requires the
google_ml_integrationextension at version 1.6.1 or higher on AlloyDB, which runs on PostgreSQL 18. - Developers must set the flag
google_ml_integration.enable_preview_ai_functionstoTRUEto turn the functions on. ai.classifysupports single label and multi label classification, category descriptions passed as 2D arrays, and few shot prompting.ai.extractconverts unstructured text into structured JSON using a schema or a field list.- Both functions accept
TEXT,TEXTarray, orREFCURSORinputs, so they can process a single row, an array, or a cursor of rows.
What it means for people who build with AI
For developers building data pipelines, this brings AI classification and extraction into the database as native SQL calls, cutting out a separate API round trip for common RAG and data enrichment tasks. Both functions run through Gemini Enterprise Agent Platform models inside AlloyDB, and a smart batching feature, formerly called AI Function Acceleration, groups inputs into micro-batches to cut token spend and speed up inference compared with evaluating one row at a time.
Availability
ai.classify and ai.extract are available now in preview, gated behind the google_ml_integration.enable_preview_ai_functions flag and the updated extension version. The announcement was published on the Google Cloud blog on November 12, 2026.
Sources
- Introducing new AI functions for AlloyDB: ai.classify and ai.extract (Google Cloud, November 12, 2026, official)
Written with AI assistance, strictly from the sources listed above. Before it went live, automated checks verified its dates, sources and every language edition.