Skip to content

An editorial team and a community building with AI

← All articles

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.classify and ai.extract, launch in preview inside the AlloyDB AI query engine.
  • Using them requires the google_ml_integration extension 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_functions to TRUE to turn the functions on.
  • ai.classify supports single label and multi label classification, category descriptions passed as 2D arrays, and few shot prompting.
  • ai.extract converts unstructured text into structured JSON using a schema or a field list.
  • Both functions accept TEXT, TEXT array, or REFCURSOR inputs, 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

Written with AI assistance, strictly from the sources listed above. Before it went live, automated checks verified its dates, sources and every language edition.

Google Cloud adds ai.classify and ai.extract to AlloyDB AI | vibecoding.inc