Build generative AI applications using AlloyDB AI

AlloyDB AI provides an integrated suite of AI and machine learning (ML) capabilities in AlloyDB for PostgreSQL that lets you build generative AI applications using your operational database data. You can run high-speed vector similarity searches, translate natural language questions into SQL queries, and invoke foundation models from Gemini Enterprise Agent Platform, OpenAI, and Anthropic directly from SQL.

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 as vector. It supports storing generated embeddings in a vector column. The extension also adds support for scalar quantization features to create IVF indexes. You can also create an IVFFlat index or HNSW index that are available with stock pgvector.

  • 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, 15, 16, 17, and 18.

  • google_columnar_engine extension: ScaNN index can be loaded into the columnar engine for further accelerating the vector search.

  • google_ml_integration extension: the google_ml_integration extension provides AI 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. For next-generation text-to-SQL workflows and AI agent integration, we recommend using QueryData.

The following are some use cases that AlloyDB AI and these extensions enable:

What's next