Vector assist overview

Vector assist is an AlloyDB for PostgreSQL extension that provides a declarative SQL framework for deploying and managing vector search workloads. Instead of manually configuring embedding generation, index parameters, and query tuning, you declare your workload requirements—such as the target table, source text column, and recall goal—by using SQL functions.

Based on your vector specification, vector assist uses an auto-tuning algorithm to generate optimized SQL recommendations with explanations that you can review, modify, and apply. This workflow helps you prototype and deploy production-ready semantic search applications with minimal manual setup.

How vector assist works

Vector assist requires you to define your vector specifications. The framework uses these vector specifications, also known as the vector spec, to generate the steps required to create a vector index. Vector assist outputs the steps required to deploy your vector workload as recommendations. Each time you modify your vector spec, vector assist regenerates the recommendations.

Once you generate the vector index using these recommended steps, you can use vector assist to generate optimized search queries.

Vector assist specification

Setting up your vector index specification, or vector spec, is the first step in using vector assist. A vector spec is an object where you define the intent and requirements for your vector workload. It includes all necessary information, including the following:

  • Tables and relevant columns (text or vector)
  • Embedding model preferences (if using embedding generation)
  • Preferred index type: HNSW or IVFFlat. ScaNN isn't supported.
  • Target recall for search queries
  • Memory limitations

You define the vector spec using the vector_assist.define_spec function, and you can modify it at any time. The system assigns each specification a unique ID and stores it in a table called vector_assist.VECTOR_SPECS.

Vector assist infers the specification inputs and an optimized auto-tuning algorithm that computes optimal index configuration. Although vector assist uses these values to simplify the development process, you can still customize them to match your preferences.

Vector assist recommendations

After you define the vector spec, vector assist processes your input and generates recommendations. These recommendations are an ordered list of useful steps, typically SQL commands, that you must execute to deploy your vector workload per your specifications. Each recommendation includes the following:

  • The SQL query to run.
  • A detailed explanation of what the query does and why it's recommended.
  • Information about potential trade-offs or costs, such as estimated index size or build time.

Vector assist stores recommendations in a table called vector_assist.RECOMMENDATIONS, and you can review, modify, and apply them individually, or as a whole.

Each time you modify the vector spec for your workload, vector assist regenerates the recommendations to comply with the updated specifications.

Limitations

When using vector assist with your AlloyDB instances, consider the following limitations:

  • Vector assist only supports PostgreSQL versions 17 and later.
  • Although vector assist supports all pgvector versions, we recommend using the most recent version for optimal performance and feature support. For more information, see the pgvector changelog.
  • If your instance uses the google_ml_integration extension to generate embeddings, then its restrictions also apply when you use vector assist. For more information, see Register and call remote AI models in AlloyDB overview.
  • Vector assist only supports HNSW and IVFFlat index types. ScaNN index types aren't supported.
  • Vector assist only supports text embedding models for auto-generating embeddings and uses the text_column_name as the input parameter. If your vector workload requires a multimodal embedding model, use the google_ml_integration extension, or another extension to manually generate these embeddings before using vector assist to enable semantic search on these embeddings.

What's next