As a PostgreSQL-compatible database, AlloyDB integrates seamlessly with the tools and frameworks supported by PostgreSQL, in addition to other services from the Google Cloud environment.
AlloyDB AI provides a suite of AI and ML features that enable you to build generative AI applications. These features allow you to build applications with capabilities like vector search for semantic similarity, natural language queries, and integration with machine learning models by providers, such as Google, OpenAI, and Anthropic.
To simplify the process of building AI applications, AlloyDB provides the following extensions:
vector extension: The standard
pgvector
PostgreSQL extension is customized for AlloyDB, and referred to asvector
. It supports storing generated embeddings in a vector column. The extension also adds support for scalar quantization features to createIVF
indexes. You can also create anIVFFlat
index orHSNW
index that are available with stockpgvector
.alloydb_scann extension: The
alloydb_scann
extension implements a highly efficient nearest-neighbor index powered by the ScaNN algorithm.You can use the
alloydb_scann
extension with PostgreSQL 14 and 15 compatible databases.google_ml_integration extension: The
google_ml_integration
extension provides the AI query engine feature, which includes functions for generating embeddings, semantic ranking, and implementing AI-based filters, joins and text generation/summarization. This extension also provides functions to register metadata for AI models. The registered metadata is then used to invoke predictions from these models.alloydb_ai_nl extension: The
alloydb_ai_nl
extension enables developers to build applications that accurately and securely answer end user natural language questions about data in the AlloyDB database. This makes the data accessible to users who might not be proficient in writing SQL.
The following are some use cases that these extensions enable:
Perform intelligent SQL queries using AlloyDB AI query engine: Use AI directly within your SQL queries. This allows you to re-rank search results for higher relevance, integrate natural language into your SQL queries, and generate multimodal embeddings for vector search.
Vector search: Use AlloyDB to store vector embeddings and perform highly efficient similarity searches. You can generate a highly efficient nearest-neighbor index powered by the ScaNN algorithm.
Call models using model endpoints: Register AI models as model endpoints and call the endpoints from within AlloyDB to generate embeddings, invoke predictions, or perform similarity searches.
Generate embeddings and invoke predictions: Use Vertex AI text embedding models or registered model endpoints to generate text or multimodal embeddings.
Generate SQL statements from natural language: Add natural language capabilities to your application, and interact with AlloyDB by asking questions in natural language. The natural language questions are then processed by AlloyDB AI to automatically generate an accurate SQL query that retrieve the answer.