AI Models, Software & Research
Google Cloud previewed AlloyDB ai.classify and ai.extract, enabling text classification and structured extraction directly through SQL on PostgreSQL 18.
· ComputeLabs Research · from the November 11, 2026 edition
Google Cloud announced a preview, rather than general availability, of `ai.classify` and `ai.extract` in the AlloyDB AI query engine. The functions are available through the `google_ml_integration` extension, version 1.6.1 or later, on PostgreSQL 18.
The functions support classification and structured extraction through standard Structured Query Language (SQL). Google contrasts this approach with application-side workflows that export text, call external model endpoints, construct prompts, parse responses, manage retries, and write results back to database records.
`ai.classify` supports single-label and multi-label classification, user-defined category labels, and category descriptions supplied through two-dimensional arrays. It also supports inline examples for few-shot prompting and execution over individual text values, text arrays, and cursors.
The functions are supported by smart batching for AI functions, previously called AI Function Acceleration. The supplied example enables preview functions through a configuration setting, but the excerpt provides no quantitative latency, throughput, or cost benchmark and does not include a full specification for `ai.extract`.
Sources
- Google Cloud
- AlloyDB ai.classify
- PostgreSQL 18

