Run powerful AI models registered through model endpoint management directly within your database using SQL operators. The AlloyDB AI query engine (Preview) integrates with Vertex AI to bring intelligent filtering, semantic ranking, and text generation to your operational data in real time.
-
AI-Powered SQL filtering and ranking
Use simple SQL functions for powerful AI tasks. The
google_ml_integration
extension provides operators likeai.if()
(Preview) for intelligent filtering andai.rank()
(Preview) for semantic reranking. -
In-database text generation
Perform transformations for rows in your database. Using the
ai.generate()
(Preview) operator, you can ask a foundation model to summarize a product review, or to transform data directly in your query. -
Direct model integration
Operators call registered model endpoints set up using model endpoint management. Register Vertex AI models like Gemini, or third-party models.
How the AlloyDB AI query engine works
When you embed an AI operator like ai.if()
, ai.rank()
, or ai.generate()
into your SQL query, the AlloyDB AI query engine (Preview) detects it. This engine, available using the google_ml_integration
extension, orchestrates the entire process. It securely packages the relevant row data and calls a pre-registered ML model from providers, such as Gemini, OpenAI, or Anthropic. The ML model evaluates the data and returns a prediction—like true/false
for a filter or a score for ranking. The AlloyDB AI query engine seamlessly integrates this prediction back into your query's execution, returning a standard SQL result set. You get AI-powered insights without ever moving your data.

Learn more and get started
Explore developer resources to build your own natural language query applications with AlloyDB AI.
-
AlloyDB AI vector search and AI operators
Empower small IT teams to harness generative AI with Google Cloud databases.
-
codelab
Deploy AlloyDB AI with AI operators and using them for tasks such as semantic search, joins, and result ranking.
-
Model endpoint management
Build richer generative AI experiences using model endpoint management.