AlloyDB AI brings generative AI directly to your operational data in AlloyDB for PostgreSQL and AlloyDB Omni. By integrating AI model inference, PostgreSQL vector search, hybrid search, and agentic interfaces directly into the database engine, AlloyDB AI enables your database to process and react to data using AI models. You can build low-latency and production grade AI applications without the complexity, latency, and cost of managing separate transactional, full-text, and vector engines.
AI search →
Combine PostgreSQL vector search, keyword search, and reranking. Get 10x faster ScaNN search with Adaptive Filtering, and 4x faster HNSW with AlloyDB's Columnar Engine.
AI functions →
Run in-database model inference and embedding generation directly in SQL. Use smart batching, local proxy models, and TimesFM forecasting to accelerate and scale AI features.
AI tooling →
Ground AI agents in real-time records. Build with MCP, manage memory, and use LangChain or LlamaIndex. Enable conversational analytics and natural language queries using the QueryData API.
Generative AI capabilities in AlloyDB
AlloyDB AI organizes its features into three pillars to make it easier to build AI applications.
AI search
AlloyDB AI provides a unified search experience by combining high-performance vector search, keyword full-text search (FTS), structured SQL filtering, and reranking within a single database engine. For more information, see AI search.
- Fast vector search: Perform PostgreSQL-compatible filtered vector search up to 10x faster than standard pgvector using Google's ScaNN index and Adaptive Filtering. Accelerate HNSW queries up to 4x using the built-in Columnar Engine in AlloyDB.
- Unified hybrid search: Process semantic vector similarity and exact keyword searches concurrently using your choice of full-text search indexes such as BM25, RUM, GIN and reranking models for reciprocal rank fusion, semantic cross-encoders, and LLM-based reranking.
- Automated ScaNN indexes: Use Auto mode to automatically configure and maintain ScaNN indexes for your workload, which eliminates manual tuning.
AI functions
Run AI models directly within your SQL queries to analyze data, generate text, or predict trends. AlloyDB AI handles the model connections, so you don't need external orchestration tools or complex code. Because everything runs inside the database, you don't have to export your data to external vector engines. For more information, see AI functions.
- Embedding functions: Generate query embeddings for semantic search at
runtime using the
ai.embedding()function, and bulk generate millions of embeddings in minutes usingai.initialize_embeddings()andai.refresh_embeddings(). - Task-specific functions: Run semantic evaluations using
ai.if()andai.rank(), determine user sentiment usinganalyze_sentiment(), and summarize text usingsummarize(). - Smart batching: Optimize query performance and lower network latency using
Smart Batching for AI
Functions to achieve up faster inference than row-at-a-time
calls (supports
ai.if()andai.rank()). - Proxy models: Train high-accuracy, local surrogate models using
Optimized
Functions to run
ai.if()evaluations faster and at a lower cost than remote LLM calls. - TimesFM forecasting: Predict future trends directly from your database
tables using the built-in time-series forecasting function
ai.forecast().
Agent development, RAG, and built-in interfaces
AlloyDB AI grounds your AI agents in real-time database records through built-in interfaces. For more information, see AI tooling.
- Remote MCP server: Connect autonomous AI agents to your database using a fully managed Model Context Protocol (MCP) server integrated with Identity and Access Management (IAM) authentication, Agent Registry, and Model Armor.
- Agent memory: Store your agent's conversation history, knowledge context, and state using hybrid search for low-latency retrieval.
- Open framework ecosystem: Ground your agentic workflows using official AlloyDB integrations for LangChain, LlamaIndex, and the MCP Toolbox for Databases.
- QueryData: Allow business users and analysts to query database schemas using everyday language. The QueryData API powers conversational analytics. It uses context sets, which include templates, facets, and value search queries, to translate natural language into secure SQL queries.
Use cases
AlloyDB AI lets you build many types of generative AI applications directly on your database.
|
Search and information retrieval |
Retail search: Serve highly relevant product search results to your users with low latency by using the best of keyword lexical matching, semantic search, and intelligent reranking with AlloyDB's hybrid search capabilities. Clinical trial matching: Accelerate medical research and patient enrollment by matching patients to active clinical trials, blending structured medical metrics with unstructured doctor notes and clinical symptoms. Patent search: Streamline intellectual property research by combining exact patent classification code lookups with abstract conceptual similarity searches, and automatically summarize matched filings for legal teams. |
|
Generative AI and agents |
Retrieval-augmented generation (RAG): Automate the embedding generation and indexing of unstructured documents directly within your database to build high-performance RAG knowledge bases. Intelligent customer support: Resolve customer queries using keyword and semantic search. Retrieve troubleshooting steps, and use agent tools to securely access purchase history for personalized support. Conversational BI and natural language to SQL reporting: Empower non-technical business users to run complex database queries using natural language, and dynamically translate plain-English questions into secure SQL queries. |
|
Analytics and inference |
Transaction enrichment and fraud detection: Parse and enrich raw, messy credit card transaction memos into clean, structured merchant and risk data in real time, and execute predictive checks directly in SQL. Manufacturing preventive maintenance: Predict and minimize machinery downtime by forecasting sensor failures directly on time-series telemetry data, and match equipment anomalies with repair tickets and equipment manuals using hybrid search. Automated feedback and sentiment analysis: Process and analyze raw customer reviews, survey answers, or call logs directly inside your SQL database using built-in AI functions to extract sentiment and generate summaries without external ETL pipelines. |
Customer stories
Learn how customers use AlloyDB AI to build generative AI applications.
ID.me scales and fights AI fraud
Learn how ID.me uses AlloyDB AI and to scale digital identity for 160M members and detect AI-driven fraud in real-time.
Nuro drives autonomous innovation with AlloyDB AI
Learn how AlloyDB AI enables Nuro to perform complex similarity searches on vector embeddings, supporting continuous improvement.
Inside Target's search bar overhaul
From query to cart: Inside Target's search bar overhaul with AlloyDB AI.
Latest videos
Watch the latest videos about AlloyDB AI.
Latest blogs
Read the latest blogs about AlloyDB AI.
URBN modernizes retail infrastructure with AlloyDB
Learn how URBN (parent company of Urban Outfitters, Anthropologie, and Free People) modernizes infrastructure to elevate employee creativity and global shopper experiences using AlloyDB and Gemini.
Enhancing iEEG seizure identification and similarity search with Google Cloud
Learn how NeuroPace searched for more than a million iEEG records to identify similar records, in milliseconds using AlloyDB AI.
Supercharge pgvector: 4x Faster HNSW with AlloyDB
Learn how AlloyDB accelerates pgvector HNSW query performance by up to 4x using the built-in Columnar Engine.