Google Cloud объявила о предварительной версии двух SQL-функций для AlloyDB: ai.classify и ai.extract. Они позволяют классифицировать данные и извлекать их в структурированном виде непосредственно в базе с помощью стандартного SQL.[1]
Функция ai.classify распределяет текст по категориям, заданным пользователем, без ручной разработки промптов. Ai.extract преобразует неструктурированный текст в JSON по целевой схеме, которую можно задать с помощью JSON Schema или списка полей.[2][3]
При использовании функций в выражениях SQL WHERE движок базы автоматически объединяет входные данные в микропакеты, прежде чем отправить их моделям Gemini Enterprise Agent Platform, сообщила Google Cloud.[4]
Функции доступны в расширении google_ml_integration версии 1.6.1 или новее на PostgreSQL 18.[5]
Today, we are announcing the preview of two new SQL functions in the AlloyDB AI query engine — ai.classify and ai.extract — available in the google_ml_integration extension (version 1.6.1 or later) on PostgreSQL 18, allowing you to perform classification and structured extraction directly inside your database using standard SQL.
The ai.extract function transforms unstructured text into structured JSON data matching your target schema — specified as a JSON schema or a text list of fields.
When you use ai.classify or ai.extract in SQL WHERE clause expressions, the database engine automatically groups inputs into optimized micro-batches before sending them to Gemini Enterprise Agent Platform models.
Today, we are announcing the preview of two new SQL functions in the AlloyDB AI query engine — ai.classify and ai.extract — available in the google_ml_integration extension (version 1.6.1 or later) on PostgreSQL 18, allowing you to perform classification and structured extraction directly inside your database using standard SQL.