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-08-08 UTC."],[[["AlloyDB AI provides machine learning capabilities to your data through its integration with AlloyDB for PostgreSQL and AlloyDB Omni."],["The `vector` extension, a customized version of `pgvector`, allows storing embeddings in a vector column and supports scalar quantization for creating `IVF` indexes."],["AlloyDB's `alloydb_scann` extension, compatible with PostgreSQL 15, offers a highly efficient nearest-neighbor index utilizing the ScaNN algorithm."],["The `google_ml_integration` extension offers `Invoke predictions` and `Generate embeddings` functions to enable model querying and text translation into vectors."],["AlloyDB Omni can be configured to work with Vertex AI, enabling applications to leverage models from the Vertex AI Model Garden and use the `text-embedding-005` English models for generating embeddings."]]],[]]