Run powerful AI models registered through model endpoint management directly within your database using SQL operators. The AlloyDB AI functions (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 like ai.if() (Preview) for intelligent filtering and ai.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.
            
          
Embedding and prediction functions
            
            Use SQL functions like google_ml.embedding() to generate vector embeddings or google_ml.predict_row( to invoke predictions from any registered model, all within your database.
            
          
How the AI functions works
When you embed an AI operator like ai.if(), ai.rank(), or ai.generate() into your SQL query, the AI functions (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 AI functions 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
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.
AlloyDB AI operators and reranking
Deploy AlloyDB AI with AI operators. Use them for tasks such as semantic search, joins, and result ranking.
Model endpoint management
Build richer generative AI experiences using model endpoint management.