GCP – Vector similarity search for Cloud SQL for MySQL is now GA
If you used the internet today, you’ve probably already benefited from generative AI. Whether it helped you get your work done faster, research home repairs, or find the perfect gift, gen AI is transforming how we get things done. These generative AI experiences use searches against vector embeddings — multi-dimensional representations of data’s meaning — to match your intent with the best answer.
But integrating vector technology into existing applications can be challenging. Many databases have historically not supported vector search, so developers have had to integrate specialized vector databases side-by-side with their existing databases.
Enter MySQL similarity search
Cloud SQL for MySQL now supports vector storage and similarity search, which means you can transform your MySQL databases in place to integrate gen AI capabilities without a specialized vector database. Now generally available, it’s as simple as adding a new column to your existing table and loading in your vector embeddings, which you can generate using your favorite models; for example, you can use Vertex AI’s pre-trained text embeddings models. Once you’ve imported your dataset, you can perform both k-nearest neighbors (kNN) and approximate nearest neighbors (ANN) searches by adding the right index for your use case; these search indexes were developed using Google’s open-source ScaNN libraries. Our GA offering includes the same ACID support and crash recovery for vectors that you expect from a relational database.
- aside_block
- <ListValue: [StructValue([(‘title’, ‘$300 in free credit to try Google Cloud databases’), (‘body’, <wagtail.rich_text.RichText object at 0x3e2d789b3b80>), (‘btn_text’, ‘Start building for free’), (‘href’, ‘http://console.cloud.google.com/freetrial?redirectPath=/products?#databases’), (‘image’, None)])]>
To think about this in action, imagine you’re the developer for a hardware store’s online shopping experience. By integrating ANN similarity search into your catalog, when a shopper asks “what do I need to fix a crack in my dining table?” you can convert this question into a vector embedding and match against all products in your catalog to find items that can be used to fix dining table cracks.
We’ve collaborated closely with companies that rely on MySQL to help them integrate generative AI into their existing applications. For instance, supply chain solution provider Manhattan Associates is exploring similarity search in MySQL to improve search results for customers using its applications.
“Similarity search in MySQL enables us to easily integrate gen AI capabilities into the fleet of applications we’ve built on Cloud SQL for MySQL. For example, we’re exploring how we can use similarity search against product information to render better search results. This can be expanded to various searches across the application solutions we provide.” – Sanjeev Siotia, Executive Vice President & Chief Technology Officer, Manhattan Associates
Get started building
Ready to build generative AI apps on top of your MySQL databases? We have a few solutions to help you get started:
-
Sample app: Lets you customize the datastore for a bot-based app, with Cloud SQL for MySQL as an option. This app uses kNN search as the search type.
-
Code lab: Walks you through the basics of deploying a gen AI app with Cloud SQL and LangChain, a popular gen AI app development framework.
We can’t wait to see what you create!
Read More for the details.