This page describes some AI use cases for AlloyDB for PostgreSQL, with links to codelabs, notebooks, and tutorials that you can use to explore approaches or to help you develop your application.
Use case
Description
Accelerate patent searches and search precision
These codelabs show you how to improve patent research by using vector search along with AlloyDB, the pgvector extension
, embeddings, Gemini 1.5 Pro and Java Agent Development Kit.
Generate multimodal Embeddings in AlloyDB
This codelab demonstrates how to use AlloyDB AI's capabilities for semantic search using multimodal embeddings.
Learn about how to perform different types of searches, including text-based semantic search, image search by image, and image search by text, as well as a hybrid approach that combines different search types.
Learn about how to perform different types of searches, including text-based semantic search, image search by image, and image search by text, as well as a hybrid approach that combines different search types.
- Codelab: Multimodal Embeddings in AlloyDB
Generate SQL using AlloyDB AI natural language
This codelab provides a step-by-step guide on how to use AlloyDB AI's natural language feature to generate SQL queries.
The codelab uses a fictional ecommerce dataset to demonstrate how you can ask questions in natural language (English) and have AlloyDB AI translate them into SQL.
The codelab uses a fictional ecommerce dataset to demonstrate how you can ask questions in natural language (English) and have AlloyDB AI translate them into SQL.
Apply semantic filters and rerank vector search results to improve search quality
This codelab shows you how to use AlloyDB AI features like AI Query Operators, model endpoint management
, and vector search
to help you improve your search quality and use semantic filters.
Learn how to use AI Query operators for semantic filtering to unlock new experiences in SQL. Rank vector search results using LLMs and semantic ranking models to improve the accuracy of your vector search. This tutorial uses a Vertex AI semantic ranking model in AlloyDB and Vertex AI generative AI models .
Learn how to use AI Query operators for semantic filtering to unlock new experiences in SQL. Rank vector search results using LLMs and semantic ranking models to improve the accuracy of your vector search. This tutorial uses a Vertex AI semantic ranking model in AlloyDB and Vertex AI generative AI models .
- Codelab: AlloyDB AI Operators and Reranking
Build an AI-powered outfit recommendation app with AlloyDB and serverless runtimes
The following codelab shows you how to build an AI-powered outfit recommendation app with AlloyDB AI and serverless runtimes. It explains how users can upload a picture of clothing and receive AI-driven style recommendations and visualizations.
The codelab uses Google Cloud technologies like AlloyDB AI, Gemini 2.0, and Imagen 3 to create a web application deployed in Cloud Run serverless runtime.
The codelab uses Google Cloud technologies like AlloyDB AI, Gemini 2.0, and Imagen 3 to create a web application deployed in Cloud Run serverless runtime.
Build an application that invokes a database query from your agent or a generative AI application
The following codelab shows you how to build an application that uses Gen AI Toolbox for Databases to perform a simple AlloyDB query that you can invoke from your agent or from a generative AI application.
Build and deploy a personalized fashion styling assistant
The following codelabs show you how to build and deploy a personalized style assistant with Gemini, model endpoint management, vector search, Vertex AI, and agents.
Build an LLM and RAG-based chat application using AlloyDB AI and LangChain
This codelab guides you through deploying the GenAI Databases Retrieval Service and then shows you how to build a sample interactive application using your newly set up environment.
Create a chatbot to answer questions about movies
This tutorial shows you how to build a generative AI chatbot that uses Gemini
, Vertex AI
, and the AlloyDB LangChain integration. You learn how to extract structured data from your database , generate embeddings, and format your data so that you can perform vector search in a Retrieval-Augmented Generation (RAG)
application.
Use a movie database to ground your LLM with information about the most popular films. Grounding helps to ensure that LLM output is accurate and relevant.
Use a movie database to ground your LLM with information about the most popular films. Grounding helps to ensure that LLM output is accurate and relevant.
- Tutorial: AlloyDB LangChain integration
Create a toy store search app
The following codelab shows you how to create a personalized and seamless toy store search experience using contextual search and custom generation of the product matching the search context.
You use pgvector and generative AI model extensions in AlloyDB, a real-time Cosine similarity search, Gemini 2.0 Flash, and Gen AI Toolbox for Databases .
You use pgvector and generative AI model extensions in AlloyDB, a real-time Cosine similarity search, Gemini 2.0 Flash, and Gen AI Toolbox for Databases .
Deploy AlloyDB Omni and a local AI model on Kubernetes
In this codelab you learn how to deploy AlloyDB Omni on GKE and use it with an open embedding model deployed in the same Kubernetes cluster.
Deploy a RAG application with LangChain on Vertex AI
This tutorial shows you how to build and deploy an agent using the Vertex AI SDK for Python and the AlloyDB LangChain integration.
Learn how to use agents and vectors with LangChain to perform a similarity search and retrieve related data to ground LLM responses.
Learn how to use agents and vectors with LangChain to perform a similarity search and retrieve related data to ground LLM responses.
Integrate hybrid search and AI query engine into your search application
This demo illustrates the AI capabilities of Google Cloud AlloyDB, integrating hybrid search including SQL, vector, and full-text search with AI query engine, all applied to a sample ecommerce dataset from Cymbal Shops.
Migrate data from a vector database to AlloyDB
The following tutorial describes how to migrate data from a third-party vector database to AlloyDB leveraging LangChain vector stores.
The following vector databases are supported: Pinecone, Weaviate, Chroma, Qdrant, and Milvus.
The following vector databases are supported: Pinecone, Weaviate, Chroma, Qdrant, and Milvus.
Perform a multimodal hybrid product search
This notebook shows you how to perform a hybrid search in AlloyDB for Cymbal Shops, a fictional retailer with a large eCommerce presence. The notebook combines multimodal vector embeddings, full text search (Generalized Inverted Index), and BM25 sparse embeddings (pgvector 0.7.0+) with Reciprocal Rank Fusion re-ranking for enhanced product search.
Use a similarity search using a vector index to find relevant products
This codelab shows you how to use AlloyDB AI features like model endpoint management
and vector search
to help you find relevant products.
Learn how to generate embeddings using model endpoint management on your database data and use your operational data to perform vector similarity searches. This tutorial uses a Vertex AI embedding model in AlloyDB and Vertex AI generative AI models .
Learn how to generate embeddings using model endpoint management on your database data and use your operational data to perform vector similarity searches. This tutorial uses a Vertex AI embedding model in AlloyDB and Vertex AI generative AI models .
Use MCP Toolbox for Databases with AlloyDB AI to create conversational product searches
Learn how to use the MCP Toolbox for Databases, AlloyDB AI, AlloyDB AI, and vector search to create a Shopping AI Agent designed to transform your retail experience. This tutorial demonstrates the agent's capabilities, from conversational product searches to placing orders.