AI Cloud Architect

Introducing new AI functions for AlloyDB: ai.classify and ai.extract

GoogleAnnouncement by Paul RamseyGoogle Cloud Blog (AI & machine learning)

Transactional databases store vast amounts of unstructured text — clinical notes, customer reviews, support tickets, invoices, and property descriptions. Historically, working with this text meant building complex application code: You had to export data from the database, call external model endpoints, write custom prompt wrappers, parse unpredictable responses, manage retry logic, and update database records. This application-side loop creates operational friction. It introduces query…

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

AlloyDB adds preview SQL functions ai.classify and ai.extract that run Gemini models on text stored in the database, so classification and JSON extraction need no application code.

Who it is for

Teams running AlloyDB on PostgreSQL 18 that process clinical notes, invoices, reviews or contracts inside the database and want to avoid moving data out.

Key points

  • Preview; requires google_ml_integration extension 1.6.1 or later on PostgreSQL 18
  • Requires setting google_ml_integration.enable_preview_ai_functions to TRUE
  • Smart batching groups inputs into micro-batches for WHERE clause expressions, which the post says reduces token spend

The same at other vendors

Same approach

MicrosoftBlog post

PostgreSQL on Azure supercharged for AI

AI:Both add in-SQL calls to hosted LLMs in a managed database so classification and extraction run without app code.

Timeline

  1. Explained inActivating Your Data Layer for Production-Ready AI · Google · Blog post
  2. Listed inGoogle Cloud release notes, October 27, 2026 · Google · Release note
  3. This postIntroducing new AI functions for AlloyDB: ai.classify and ai.extract

Go deeper