Stay organized with collections
Save and categorize content based on your preferences.
AlloyDB AI is a suite of features included with AlloyDB for PostgreSQL and AlloyDB Omni that let you
apply the semantic and predictive power of machine learning (ML) models to your
data. This page provides an overview of the ML-powered AI functions that are available
through AlloyDB.
Store, index, and query vectors
The stock pgvector PostgreSQL
extension
extension is customized for AlloyDB, and referred to as vector.
It supports storing generated embeddings in a vector column. The extension also
adds support for scalar quantization feature to create IVF indexes. You can
also create an IVFFlat index or HSNW index that are available with stock
pgvector.
For more information about storing vectors, see Store vectors.
In addition to the customized vector extension, AlloyDB
includes the alloydb_scann extension that implements a highly efficient
nearest-neighbor index powered by the ScaNN
algorithm.
You can tune your indexes for a balance between query-per-second (QPS) and recall
with your queries. For more information about tuning your indexes, see Tune
vector query performance.
Generate embeddings and text predictions
AlloyDB AI extends PostgreSQL syntax with two functions for
querying models using the google_ml_integration extension:
You can then apply these vector embeddings
as input to pgvector functions. This includes methods to compare and sort
samples of text according to their relative semantic distance.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-05 UTC."],[[["AlloyDB AI enhances AlloyDB for PostgreSQL and AlloyDB Omni with machine learning capabilities, allowing users to leverage ML models for data analysis and predictions."],["AlloyDB offers two extensions for vector operations: a customized `vector` extension, which is an enhanced version of `pgvector`, and `alloydb_scann`, a highly efficient nearest-neighbor index powered by the ScaNN algorithm."],["The `google_ml_integration` extension provides SQL functions to interact with models, enabling users to generate embeddings from text and invoke model predictions within database transactions."],["AlloyDB can be configured to work with Vertex AI, providing access to models in the Vertex AI Model Garden and the ability to use `textembedding-gecko` English models for embedding generation."],["The `alloydb_scann` extension, which was previously known as `postgres_ann` requires users to drop indexes made with `postgres_ann`, upgrade to AlloyDB Omni version 15.5.5, and recreate them with `alloydb_scann` before use."]]],[]]